)]}'
{"nova/api/openstack/placement/objects/resource_provider.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"45b0d784260b64c1f1c4eff3db8f71fd2a3d77c2","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    # thread and we\u0027ll simply return."},{"line_number":140,"context_line":"    with lockutils.lock(_TRAIT_LOCK):"},{"line_number":141,"context_line":"        if not _TRAITS_SYNCED:"},{"line_number":142,"context_line":"            _trait_sync(ctx)"},{"line_number":143,"context_line":"            _TRAITS_SYNCED \u003d True"},{"line_number":144,"context_line":"            return True"},{"line_number":145,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_bae9a6e6","line":142,"updated":"2018-04-02 14:47:07.000000000","message":"I\u0027m thinking maybe we could something here to the effect of:\n\n _trait_sync(ctx)\n # force a commit on the open transaction\n ctx.session.commit()  # or session.flush()?","commit_id":"714afc371c08dec43e988799f16ce1f10111f998"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"92ff5758b75754bef2faee8bdf72dce6b7b19c01","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    # thread and we\u0027ll simply return."},{"line_number":140,"context_line":"    with lockutils.lock(_TRAIT_LOCK):"},{"line_number":141,"context_line":"        if not _TRAITS_SYNCED:"},{"line_number":142,"context_line":"            _trait_sync(ctx)"},{"line_number":143,"context_line":"            _TRAITS_SYNCED \u003d True"},{"line_number":144,"context_line":"            return True"},{"line_number":145,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_2d92424d","line":142,"in_reply_to":"bf659307_2d31e2a3","updated":"2018-04-02 15:48:13.000000000","message":"Well, this works.\n\nBut...\n\nIt could have unintended side effects in the future if the encompassing transaction is doing other writes.  That bug will be really tough to reproduce (and will therefore likely remain latent for a long time).\n\nSo...\n\nIs there a way for me to create a whole new transaction just for the trait sync?","commit_id":"714afc371c08dec43e988799f16ce1f10111f998"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0dd0d31dd6a616261a441255238acbc1deba0942","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    # thread and we\u0027ll simply return."},{"line_number":140,"context_line":"    with lockutils.lock(_TRAIT_LOCK):"},{"line_number":141,"context_line":"        if not _TRAITS_SYNCED:"},{"line_number":142,"context_line":"            _trait_sync(ctx)"},{"line_number":143,"context_line":"            _TRAITS_SYNCED \u003d True"},{"line_number":144,"context_line":"            return True"},{"line_number":145,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_6d47dabd","line":142,"in_reply_to":"bf659307_2d92424d","updated":"2018-04-02 15:57:41.000000000","message":"Yes, decorate _trait_sync() with the context_manager.independent decorator...","commit_id":"714afc371c08dec43e988799f16ce1f10111f998"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"94835318af21e02d3dd37faf42fbc36f5bf00c3a","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    # thread and we\u0027ll simply return."},{"line_number":140,"context_line":"    with lockutils.lock(_TRAIT_LOCK):"},{"line_number":141,"context_line":"        if not _TRAITS_SYNCED:"},{"line_number":142,"context_line":"            _trait_sync(ctx)"},{"line_number":143,"context_line":"            _TRAITS_SYNCED \u003d True"},{"line_number":144,"context_line":"            return True"},{"line_number":145,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_2d31e2a3","line":142,"in_reply_to":"bf659307_bae9a6e6","updated":"2018-04-02 15:40:59.000000000","message":"I\u0027ll try it out","commit_id":"714afc371c08dec43e988799f16ce1f10111f998"}],"nova/tests/functional/api/openstack/placement/db/test_resource_provider.py":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"70a5719de691602f4a6406027fe8919a378aee77","unresolved":false,"context_lines":[{"line_number":2258,"context_line":"            rp_obj.Trait.get_by_name, self.ctx, \u0027CUSTOM_TRAIT_A\u0027)"},{"line_number":2259,"context_line":""},{"line_number":2260,"context_line":"    def test_bug_1760322(self):"},{"line_number":2261,"context_line":"        # Under bug # #1760322, if the first hit to the traits table resulted"},{"line_number":2262,"context_line":"        # in an exception, the sync transaction rolled back and the table"},{"line_number":2263,"context_line":"        # stayed empty; but _TRAITS_SYNCED got set to True, so it didn\u0027t resync"},{"line_number":2264,"context_line":"        # next time."}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_0805e510","line":2261,"range":{"start_line":2261,"start_character":20,"end_line":2261,"end_character":22},"updated":"2018-04-03 00:42:24.000000000","message":"nix","commit_id":"e2924ba2379adc19e7ebd07ead8efd5e9c8e367d"}]}
