)]}'
{"nova/db/sqlalchemy/resource_class_cache.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"454a850c0a3492c174c64cdf0b9839d60900c62c","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    :param cache: ResourceClassCache object to refresh."},{"line_number":46,"context_line":"    \"\"\""},{"line_number":47,"context_line":"    with db_api.api_context_manager.reader.connection.using(ctx) as conn:"},{"line_number":48,"context_line":"        sel \u003d sa.select([_RC_TBL.c.id, _RC_TBL.c.name])"},{"line_number":49,"context_line":"        res \u003d conn.execute(sel).fetchall()"},{"line_number":50,"context_line":"        cache.id_cache \u003d {r[1]: r[0] for r in res}"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5da102_494eaa3b","line":47,"updated":"2016-11-03 16:01:05.000000000","message":"Does it matter to use a session connection or not? The only other place I\u0027ve seen something like this done is here:\n\nhttps://github.com/openstack/nova/blob/master/nova/objects/host_mapping.py#L52\n\nBut that\u0027s using a session.","commit_id":"419cd6a8bc5e833de8d8d686bf7bd9452ed0578f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"6cd27b6aaea1682d0b0fb7523b40ae9d651b78b2","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    :param cache: ResourceClassCache object to refresh."},{"line_number":46,"context_line":"    \"\"\""},{"line_number":47,"context_line":"    with db_api.api_context_manager.reader.connection.using(ctx) as conn:"},{"line_number":48,"context_line":"        sel \u003d sa.select([_RC_TBL.c.id, _RC_TBL.c.name])"},{"line_number":49,"context_line":"        res \u003d conn.execute(sel).fetchall()"},{"line_number":50,"context_line":"        cache.id_cache \u003d {r[1]: r[0] for r in res}"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5da102_22240fae","line":47,"in_reply_to":"ba5da102_2dcde586","updated":"2016-11-04 10:34:12.000000000","message":"After some quality time with the enginefacade, I believe you.","commit_id":"419cd6a8bc5e833de8d8d686bf7bd9452ed0578f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f66c7c2d2907430421331350582e9e0297b2765d","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    :param cache: ResourceClassCache object to refresh."},{"line_number":46,"context_line":"    \"\"\""},{"line_number":47,"context_line":"    with db_api.api_context_manager.reader.connection.using(ctx) as conn:"},{"line_number":48,"context_line":"        sel \u003d sa.select([_RC_TBL.c.id, _RC_TBL.c.name])"},{"line_number":49,"context_line":"        res \u003d conn.execute(sel).fetchall()"},{"line_number":50,"context_line":"        cache.id_cache \u003d {r[1]: r[0] for r in res}"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5da102_e9f3fe70","line":47,"in_reply_to":"ba5da102_494eaa3b","updated":"2016-11-03 16:11:06.000000000","message":"From what I understand of the enginefacade\u0027s reader/writer transaction context manager\u0027s the using(ctx) will use the session object associated with the ctx argument.","commit_id":"419cd6a8bc5e833de8d8d686bf7bd9452ed0578f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"14c099147866cdba57d3f42f7d1df94fc89b2176","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    :param cache: ResourceClassCache object to refresh."},{"line_number":46,"context_line":"    \"\"\""},{"line_number":47,"context_line":"    with db_api.api_context_manager.reader.connection.using(ctx) as conn:"},{"line_number":48,"context_line":"        sel \u003d sa.select([_RC_TBL.c.id, _RC_TBL.c.name])"},{"line_number":49,"context_line":"        res \u003d conn.execute(sel).fetchall()"},{"line_number":50,"context_line":"        cache.id_cache \u003d {r[1]: r[0] for r in res}"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5da102_2dcde586","line":47,"in_reply_to":"ba5da102_e9f3fe70","updated":"2016-11-04 09:45:09.000000000","message":"That\u0027s correct, we are using the same transaction context than if we were using the reader flag that clones the TransactionManager and calling the same contextmanager.\n\nhttps://github.com/openstack/oslo.db/blob/master/oslo_db/sqlalchemy/enginefacade.py#L823","commit_id":"419cd6a8bc5e833de8d8d686bf7bd9452ed0578f"}]}
