)]}'
{"nova/objects/resource_provider.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"408be3d045b63c01a0f5b2c07bd71b5cac02bf23","unresolved":false,"context_lines":[{"line_number":286,"context_line":"    rc_id \u003d _RC_CACHE.id_from_string(inventory.resource_class)"},{"line_number":287,"context_line":"    inv_list \u003d InventoryList(objects\u003d[inventory])"},{"line_number":288,"context_line":"    conn \u003d context.session.connection()"},{"line_number":289,"context_line":"    with conn.begin():"},{"line_number":290,"context_line":"        _add_inventory_to_provider("},{"line_number":291,"context_line":"            conn, rp, inv_list, set([rc_id]))"},{"line_number":292,"context_line":"        rp.generation \u003d _increment_provider_generation(conn, rp)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_3b0830d8","side":"PARENT","line":289,"updated":"2017-11-28 18:32:32.000000000","message":"All this time I figured these were happening for the sake of nested transactions, for reasons I could not discern.","commit_id":"2c7302e33e14bb43b629b40e0933d413dd2d54ed"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"540b808ae870c15a2fe658c1a55f6db2b59cc3a8","unresolved":false,"context_lines":[{"line_number":286,"context_line":"    rc_id \u003d _RC_CACHE.id_from_string(inventory.resource_class)"},{"line_number":287,"context_line":"    inv_list \u003d InventoryList(objects\u003d[inventory])"},{"line_number":288,"context_line":"    conn \u003d context.session.connection()"},{"line_number":289,"context_line":"    with conn.begin():"},{"line_number":290,"context_line":"        _add_inventory_to_provider("},{"line_number":291,"context_line":"            conn, rp, inv_list, set([rc_id]))"},{"line_number":292,"context_line":"        rp.generation \u003d _increment_provider_generation(conn, rp)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_d86267ae","side":"PARENT","line":289,"in_reply_to":"ff82abbf_3b0830d8","updated":"2017-11-28 19:49:14.000000000","message":"Nope, these were happening because that\u0027s what I was used to (explicitly demarcating transaction boundaries using begin() context managers. I just didn\u0027t realize how much oslo_db\u0027s enginefacade and Session objects were doing -- including automatically starting a transaction context manager (calling connection.begin()) when a function has the writer decorator)","commit_id":"2c7302e33e14bb43b629b40e0933d413dd2d54ed"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"48e5def1e79f80b5d9034424b065fa4264e83129","unresolved":false,"context_lines":[{"line_number":373,"context_line":"    # transaction and return an error to the caller to indicate that they can"},{"line_number":374,"context_line":"    # attempt to retry the inventory save after reverifying any capacity"},{"line_number":375,"context_line":"    # conditions and re-reading the existing inventory information."},{"line_number":376,"context_line":"    rp.generation \u003d _increment_provider_generation(context, rp)"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"    return exceeded"},{"line_number":379,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_02fb9846","line":376,"updated":"2017-11-27 21:03:29.000000000","message":"ditto below","commit_id":"8e36431f934b07ba167be7d521cffa6bb3446b2e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"48e5def1e79f80b5d9034424b065fa4264e83129","unresolved":false,"context_lines":[{"line_number":544,"context_line":"    if not to_add and not to_delete:"},{"line_number":545,"context_line":"        return"},{"line_number":546,"context_line":""},{"line_number":547,"context_line":"    if to_delete:"},{"line_number":548,"context_line":"        _delete_traits_from_provider(context, rp.id, to_delete)"},{"line_number":549,"context_line":"    if to_add:"},{"line_number":550,"context_line":"        _add_traits_to_provider(context, rp.id, to_add)"},{"line_number":551,"context_line":"    rp.generation \u003d _increment_provider_generation(context, rp)"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"@base.NovaObjectRegistry.register_if(False)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_a210aca9","line":551,"range":{"start_line":547,"start_character":0,"end_line":551,"end_character":63},"updated":"2017-11-27 21:03:29.000000000","message":"So you\u0027re saying that the transaction semantic here is handled by the method decorator (ultimately via oslo_db.sqlalchemy.enginefacade._TransactionContextManager._transaction_scope)?\n\nHow was it not barfing before?  Is that guy reentrant?","commit_id":"8e36431f934b07ba167be7d521cffa6bb3446b2e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"540b808ae870c15a2fe658c1a55f6db2b59cc3a8","unresolved":false,"context_lines":[{"line_number":544,"context_line":"    if not to_add and not to_delete:"},{"line_number":545,"context_line":"        return"},{"line_number":546,"context_line":""},{"line_number":547,"context_line":"    if to_delete:"},{"line_number":548,"context_line":"        _delete_traits_from_provider(context, rp.id, to_delete)"},{"line_number":549,"context_line":"    if to_add:"},{"line_number":550,"context_line":"        _add_traits_to_provider(context, rp.id, to_add)"},{"line_number":551,"context_line":"    rp.generation \u003d _increment_provider_generation(context, rp)"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"@base.NovaObjectRegistry.register_if(False)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_7871db75","line":551,"range":{"start_line":547,"start_character":0,"end_line":551,"end_character":63},"in_reply_to":"ff82abbf_a210aca9","updated":"2017-11-28 19:49:14.000000000","message":"It\u0027s not reentrant, no. We weren\u0027t using the same transaction... this code was completely ignoring the transaction that was created by the oslo_db writer decorator and creating an entirely different transaction against another connection entirely.","commit_id":"8e36431f934b07ba167be7d521cffa6bb3446b2e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"48e5def1e79f80b5d9034424b065fa4264e83129","unresolved":false,"context_lines":[{"line_number":1794,"context_line":"        # resource is one) but is used in this method to indicate a need for"},{"line_number":1795,"context_line":"        # removal. Providing 0 is controlled at the HTTP API layer where PUT"},{"line_number":1796,"context_line":"        # /allocations does not allow empty allocations. When POST /allocations"},{"line_number":1797,"context_line":"        # is implemented it will for the special case of atomically setting and"},{"line_number":1798,"context_line":"        # removing different allocations in the same request."},{"line_number":1799,"context_line":"        # _check_capacity_exceeded will raise a ResourceClassNotFound # if any"},{"line_number":1800,"context_line":"        # allocation is using a resource class that does not exist."}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_82cec82a","line":1797,"range":{"start_line":1797,"start_character":25,"end_line":1797,"end_character":33},"updated":"2017-11-27 21:03:29.000000000","message":"strike","commit_id":"8e36431f934b07ba167be7d521cffa6bb3446b2e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"4c462df3370ad5c88ba620ad985bbd6e4bec74ff","unresolved":false,"context_lines":[{"line_number":1794,"context_line":"        # resource is one) but is used in this method to indicate a need for"},{"line_number":1795,"context_line":"        # removal. Providing 0 is controlled at the HTTP API layer where PUT"},{"line_number":1796,"context_line":"        # /allocations does not allow empty allocations. When POST /allocations"},{"line_number":1797,"context_line":"        # is implemented it will for the special case of atomically setting and"},{"line_number":1798,"context_line":"        # removing different allocations in the same request."},{"line_number":1799,"context_line":"        # _check_capacity_exceeded will raise a ResourceClassNotFound # if any"},{"line_number":1800,"context_line":"        # allocation is using a resource class that does not exist."}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_18d9af20","line":1797,"range":{"start_line":1797,"start_character":25,"end_line":1797,"end_character":33},"in_reply_to":"ff82abbf_82cec82a","updated":"2017-11-28 19:58:10.000000000","message":"Done","commit_id":"8e36431f934b07ba167be7d521cffa6bb3446b2e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"48e5def1e79f80b5d9034424b065fa4264e83129","unresolved":false,"context_lines":[{"line_number":1796,"context_line":"        # /allocations does not allow empty allocations. When POST /allocations"},{"line_number":1797,"context_line":"        # is implemented it will for the special case of atomically setting and"},{"line_number":1798,"context_line":"        # removing different allocations in the same request."},{"line_number":1799,"context_line":"        # _check_capacity_exceeded will raise a ResourceClassNotFound # if any"},{"line_number":1800,"context_line":"        # allocation is using a resource class that does not exist."},{"line_number":1801,"context_line":"        visited_rps \u003d _check_capacity_exceeded(context,"},{"line_number":1802,"context_line":"                                               [alloc for alloc in"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_a2d3ccd4","line":1799,"range":{"start_line":1799,"start_character":70,"end_line":1799,"end_character":72},"updated":"2017-11-27 21:03:29.000000000","message":"strike","commit_id":"8e36431f934b07ba167be7d521cffa6bb3446b2e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"4c462df3370ad5c88ba620ad985bbd6e4bec74ff","unresolved":false,"context_lines":[{"line_number":1796,"context_line":"        # /allocations does not allow empty allocations. When POST /allocations"},{"line_number":1797,"context_line":"        # is implemented it will for the special case of atomically setting and"},{"line_number":1798,"context_line":"        # removing different allocations in the same request."},{"line_number":1799,"context_line":"        # _check_capacity_exceeded will raise a ResourceClassNotFound # if any"},{"line_number":1800,"context_line":"        # allocation is using a resource class that does not exist."},{"line_number":1801,"context_line":"        visited_rps \u003d _check_capacity_exceeded(context,"},{"line_number":1802,"context_line":"                                               [alloc for alloc in"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_f80bab8a","line":1799,"range":{"start_line":1799,"start_character":70,"end_line":1799,"end_character":72},"in_reply_to":"ff82abbf_78f6bbd9","updated":"2017-11-28 19:58:10.000000000","message":"Done","commit_id":"8e36431f934b07ba167be7d521cffa6bb3446b2e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"540b808ae870c15a2fe658c1a55f6db2b59cc3a8","unresolved":false,"context_lines":[{"line_number":1796,"context_line":"        # /allocations does not allow empty allocations. When POST /allocations"},{"line_number":1797,"context_line":"        # is implemented it will for the special case of atomically setting and"},{"line_number":1798,"context_line":"        # removing different allocations in the same request."},{"line_number":1799,"context_line":"        # _check_capacity_exceeded will raise a ResourceClassNotFound # if any"},{"line_number":1800,"context_line":"        # allocation is using a resource class that does not exist."},{"line_number":1801,"context_line":"        visited_rps \u003d _check_capacity_exceeded(context,"},{"line_number":1802,"context_line":"                                               [alloc for alloc in"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_78f6bbd9","line":1799,"range":{"start_line":1799,"start_character":70,"end_line":1799,"end_character":72},"in_reply_to":"ff82abbf_a2d3ccd4","updated":"2017-11-28 19:49:14.000000000","message":"guh, vim fail... will fix.","commit_id":"8e36431f934b07ba167be7d521cffa6bb3446b2e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9edb96f54844553ee09357a6224c01dbd4113ce7","unresolved":false,"context_lines":[{"line_number":2029,"context_line":"        # /allocations does not allow empty allocations. When POST /allocations"},{"line_number":2030,"context_line":"        # is implemented it will for the special case of atomically setting and"},{"line_number":2031,"context_line":"        # removing different allocations in the same request."},{"line_number":2032,"context_line":"        # _check_capacity_exceeded will raise a ResourceClassNotFound # if any"},{"line_number":2033,"context_line":"        # allocation is using a resource class that does not exist."},{"line_number":2034,"context_line":"        visited_rps \u003d _check_capacity_exceeded(context,"},{"line_number":2035,"context_line":"                                               [alloc for alloc in"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_539102f1","line":2032,"range":{"start_line":2032,"start_character":70,"end_line":2032,"end_character":71},"updated":"2017-12-01 13:07:01.000000000","message":"nit","commit_id":"31751a7149a3bb4b51087aecdc3b14c061c60d9b"}]}
