)]}'
{"neutron/db/agents_db.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"1539131c2c1352d1b84dec4a1ad157b55887e7f6","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                res[\u0027heartbeat_timestamp\u0027] \u003d current_time"},{"line_number":149,"context_line":"                if agent.get(\u0027start_flag\u0027):"},{"line_number":150,"context_line":"                    res[\u0027started_at\u0027] \u003d current_time"},{"line_number":151,"context_line":"                greenthread.sleep(0)"},{"line_number":152,"context_line":"                agent_db.update(res)"},{"line_number":153,"context_line":"            except ext_agent.AgentNotFoundByTypeHost:"},{"line_number":154,"context_line":"                greenthread.sleep(0)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAS3%2F%2FH9U%3D","side":"PARENT","line":151,"updated":"2013-10-03 21:25:36.000000000","message":"My only concern with removing these is that RPC processing can have lots of potential competing threads to update this table.   Adding the sleeps forces the competing threads to yield so that eventlet context switch more often whereas before it was not enough.","commit_id":"4f35b5f424f5f4f6c94da331b4ba47c9defb6899"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a4bc409370b41c6b921ea6c169f9d1924c8e117a","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                res[\u0027heartbeat_timestamp\u0027] \u003d current_time"},{"line_number":149,"context_line":"                if agent.get(\u0027start_flag\u0027):"},{"line_number":150,"context_line":"                    res[\u0027started_at\u0027] \u003d current_time"},{"line_number":151,"context_line":"                greenthread.sleep(0)"},{"line_number":152,"context_line":"                agent_db.update(res)"},{"line_number":153,"context_line":"            except ext_agent.AgentNotFoundByTypeHost:"},{"line_number":154,"context_line":"                greenthread.sleep(0)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAS3%2F%2FHLs%3D","side":"PARENT","line":151,"in_reply_to":"AAAAS3%2F%2FH9U%3D","updated":"2013-10-04 06:28:14.000000000","message":"That\u0027s exactly what the bug was about. On the line 138 starts transaction and there can\u0027t be any updates from other threads until changes are flushed. If we would yield here, we would must have yield in every other concurrent running transaction in order to give the execution back to this thread.","commit_id":"4f35b5f424f5f4f6c94da331b4ba47c9defb6899"}],"neutron/db/extraroute_db.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"1539131c2c1352d1b84dec4a1ad157b55887e7f6","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                self._update_extra_routes(context,"},{"line_number":75,"context_line":"                                          router_db,"},{"line_number":76,"context_line":"                                          r[\u0027routes\u0027])"},{"line_number":77,"context_line":"        router_updated \u003d super(ExtraRoute_db_mixin, self).update_router("},{"line_number":78,"context_line":"            context, id, router)"},{"line_number":79,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":80,"context_line":"            router_updated[\u0027routes\u0027] \u003d self._get_extra_routes_by_router_id("}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAS3%2F%2FH9k%3D","line":77,"updated":"2013-10-03 21:25:36.000000000","message":"Does ordering matter here?  Can we switch lines 77-8 with 80-81?  That way we\u0027d only need to open one transaction.","commit_id":"cb769b8580dda6f7185905d4cf0f73be37b9b9f5"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a4bc409370b41c6b921ea6c169f9d1924c8e117a","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                self._update_extra_routes(context,"},{"line_number":75,"context_line":"                                          router_db,"},{"line_number":76,"context_line":"                                          r[\u0027routes\u0027])"},{"line_number":77,"context_line":"        router_updated \u003d super(ExtraRoute_db_mixin, self).update_router("},{"line_number":78,"context_line":"            context, id, router)"},{"line_number":79,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":80,"context_line":"            router_updated[\u0027routes\u0027] \u003d self._get_extra_routes_by_router_id("}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAS3%2F%2FHLU%3D","line":77,"in_reply_to":"AAAAS3%2F%2FH9k%3D","updated":"2013-10-04 06:28:14.000000000","message":"Good point. l3_db doesn\u0027t do anything explicitly with RouterRoutes. I think it can be switched.","commit_id":"cb769b8580dda6f7185905d4cf0f73be37b9b9f5"}]}
