)]}'
{"networking_ovn/octavia/ovn_driver.py":[{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"80e87938ac7ad3d322ddfdd1e3e995143cd80ed2","unresolved":false,"context_lines":[{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    def start(self):"},{"line_number":232,"context_line":"        self.ovn_nb_idl_for_lb \u003d OvnNbIdlForLb()"},{"line_number":233,"context_line":"        if not OvnProviderHelper.ovn_nbdb_api:"},{"line_number":234,"context_line":"            OvnProviderHelper.ovn_nbdb_api \u003d self.ovn_nb_idl_for_lb.start()"},{"line_number":235,"context_line":"        self.events \u003d [LogicalRouterPortEvent(self),"},{"line_number":236,"context_line":"                       LogicalSwitchPortUpdateEvent(self)]"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_188c4ed5","line":233,"range":{"start_line":233,"start_character":15,"end_line":233,"end_character":46},"updated":"2019-07-19 08:25:44.000000000","message":"That\u0027s clever! :D\nAfair Octavia has more than one API worker so we would have a few connections open. Its much better than spawning those for all calls.","commit_id":"ab78567c9b57f8d93033e999ff96ac0a91e55872"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"64e4ba28f88e94f9610c9646354fb6c0897173ba","unresolved":false,"context_lines":[{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    def start(self):"},{"line_number":232,"context_line":"        self.ovn_nb_idl_for_lb \u003d OvnNbIdlForLb()"},{"line_number":233,"context_line":"        if not OvnProviderHelper.ovn_nbdb_api:"},{"line_number":234,"context_line":"            OvnProviderHelper.ovn_nbdb_api \u003d self.ovn_nb_idl_for_lb.start()"},{"line_number":235,"context_line":"        self.events \u003d [LogicalRouterPortEvent(self),"},{"line_number":236,"context_line":"                       LogicalSwitchPortUpdateEvent(self)]"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_8d3462fd","line":233,"range":{"start_line":233,"start_character":15,"end_line":233,"end_character":46},"in_reply_to":"7faddb67_188c4ed5","updated":"2019-07-22 12:09:53.000000000","message":"I should also mentioned that my idea was uglier than this. Kuba mentioned that I should cache the connection. I was going to just initialize the connection at import which is a terrible idea. ;)","commit_id":"ab78567c9b57f8d93033e999ff96ac0a91e55872"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"8eea1fa7688772d7577ccda33befb6351b60cf4b","unresolved":false,"context_lines":[{"line_number":231,"context_line":"    def start(self):"},{"line_number":232,"context_line":"        self.ovn_nb_idl_for_lb \u003d OvnNbIdlForLb()"},{"line_number":233,"context_line":"        if not OvnProviderHelper.ovn_nbdb_api:"},{"line_number":234,"context_line":"            OvnProviderHelper.ovn_nbdb_api \u003d self.ovn_nb_idl_for_lb.start()"},{"line_number":235,"context_line":"        self.events \u003d [LogicalRouterPortEvent(self),"},{"line_number":236,"context_line":"                       LogicalSwitchPortUpdateEvent(self)]"},{"line_number":237,"context_line":"        self.ovn_nb_idl_for_lb.notify_handler.watch_events(self.events)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_9847de77","line":234,"updated":"2019-07-19 08:33:57.000000000","message":"Maybe a unittest that compares id(OvnProviderHelper.ovn_nbdb_api) is the same when start() is called twice would be good :)","commit_id":"ab78567c9b57f8d93033e999ff96ac0a91e55872"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"ed206e8ae907d974fc4e1b8e2ef2c88d6e408011","unresolved":false,"context_lines":[{"line_number":231,"context_line":"    def start(self):"},{"line_number":232,"context_line":"        self.ovn_nb_idl_for_lb \u003d OvnNbIdlForLb()"},{"line_number":233,"context_line":"        if not OvnProviderHelper.ovn_nbdb_api:"},{"line_number":234,"context_line":"            OvnProviderHelper.ovn_nbdb_api \u003d self.ovn_nb_idl_for_lb.start()"},{"line_number":235,"context_line":"        self.events \u003d [LogicalRouterPortEvent(self),"},{"line_number":236,"context_line":"                       LogicalSwitchPortUpdateEvent(self)]"},{"line_number":237,"context_line":"        self.ovn_nb_idl_for_lb.notify_handler.watch_events(self.events)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_ed3de4c3","line":234,"in_reply_to":"7faddb67_9847de77","updated":"2019-07-19 21:13:58.000000000","message":"Will do.","commit_id":"ab78567c9b57f8d93033e999ff96ac0a91e55872"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"8eea1fa7688772d7577ccda33befb6351b60cf4b","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        self.ovn_nb_idl_for_lb.notify_handler.watch_events(self.events)"},{"line_number":238,"context_line":"        self.helper_thread.start()"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def shutdown(self):"},{"line_number":241,"context_line":"        self.requests.put({\u0027type\u0027: REQ_TYPE_EXIT})"},{"line_number":242,"context_line":"        self.helper_thread.join()"},{"line_number":243,"context_line":"        self.ovn_nb_idl_for_lb.notify_handler.unwatch_events(self.events)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_f857f224","line":240,"updated":"2019-07-19 08:33:57.000000000","message":"So in theory if we have two modules that would call start(), then they will likely call shutdown() twice. What happens if we put a request to th queue after shutdown() was called. Like:\n\n prov_helper1 \u003d OvnProviderHelper()\n prov_helper2 \u003d OvnProviderHelper()\n\n prov_helper1.start()\n prov_helper2.start()\n\n prov_helper2.shutdown()\n prov_helper1.shutdown()   # \u003c--- could it happen this will hang?","commit_id":"ab78567c9b57f8d93033e999ff96ac0a91e55872"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"ba13c1d2589b68a987476d851a3e536199dde59f","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        self.ovn_nb_idl_for_lb.notify_handler.watch_events(self.events)"},{"line_number":238,"context_line":"        self.helper_thread.start()"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def shutdown(self):"},{"line_number":241,"context_line":"        self.requests.put({\u0027type\u0027: REQ_TYPE_EXIT})"},{"line_number":242,"context_line":"        self.helper_thread.join()"},{"line_number":243,"context_line":"        self.ovn_nb_idl_for_lb.notify_handler.unwatch_events(self.events)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_fa503161","line":240,"in_reply_to":"7faddb67_4dde783e","updated":"2019-07-22 07:10:02.000000000","message":"Brain-fart, I somehow got worried the requests will be closed because of the shared ovn_nbdb_api instance","commit_id":"ab78567c9b57f8d93033e999ff96ac0a91e55872"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"ed206e8ae907d974fc4e1b8e2ef2c88d6e408011","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        self.ovn_nb_idl_for_lb.notify_handler.watch_events(self.events)"},{"line_number":238,"context_line":"        self.helper_thread.start()"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def shutdown(self):"},{"line_number":241,"context_line":"        self.requests.put({\u0027type\u0027: REQ_TYPE_EXIT})"},{"line_number":242,"context_line":"        self.helper_thread.join()"},{"line_number":243,"context_line":"        self.ovn_nb_idl_for_lb.notify_handler.unwatch_events(self.events)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_4dde783e","line":240,"in_reply_to":"7faddb67_f857f224","updated":"2019-07-19 21:13:58.000000000","message":"I\u0027m not understanding what would hang. Two separate helper objects with their own threads/queues. I\u0027m not super familiar with the octavia stuff, though, so what am I missing?","commit_id":"ab78567c9b57f8d93033e999ff96ac0a91e55872"}],"networking_ovn/tests/unit/octavia/test_ovn_driver.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"b3b8e9e030527c1d357c0daf1b4bbc693b1510a6","unresolved":false,"context_lines":[{"line_number":1286,"context_line":"    def test_single_ovsdb_connection(self):"},{"line_number":1287,"context_line":"        prov_helper1 \u003d ovn_driver.OvnProviderHelper()"},{"line_number":1288,"context_line":"        prov_helper2 \u003d ovn_driver.OvnProviderHelper()"},{"line_number":1289,"context_line":"        self.assertEqual(prov_helper1.ovn_nbdb_api, prov_helper2.ovn_nbdb_api)"},{"line_number":1290,"context_line":"        prov_helper2.shutdown()"},{"line_number":1291,"context_line":"        prov_helper1.shutdown()"}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_3ad489bd","line":1289,"range":{"start_line":1289,"start_character":13,"end_line":1289,"end_character":24},"updated":"2019-07-22 07:10:59.000000000","message":"Test on identity will be better here - assertIs","commit_id":"ef97a51a1c710c6b261ce830a9226a1ffd55ebed"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"d960959a713f350faf57d391f325e4b13929a9e8","unresolved":false,"context_lines":[{"line_number":1286,"context_line":"    def test_single_ovsdb_connection(self):"},{"line_number":1287,"context_line":"        prov_helper1 \u003d ovn_driver.OvnProviderHelper()"},{"line_number":1288,"context_line":"        prov_helper2 \u003d ovn_driver.OvnProviderHelper()"},{"line_number":1289,"context_line":"        self.assertEqual(prov_helper1.ovn_nbdb_api, prov_helper2.ovn_nbdb_api)"},{"line_number":1290,"context_line":"        prov_helper2.shutdown()"},{"line_number":1291,"context_line":"        prov_helper1.shutdown()"}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_559916ce","line":1289,"range":{"start_line":1289,"start_character":13,"end_line":1289,"end_character":24},"in_reply_to":"7faddb67_3ad489bd","updated":"2019-07-22 07:48:05.000000000","message":"Done","commit_id":"ef97a51a1c710c6b261ce830a9226a1ffd55ebed"}]}
