)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"6ef3dda589783e7ea4ebbcc2530b97f39d2d56b3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"927e10ba_6327372c","updated":"2025-06-30 15:14:09.000000000","message":"recheck neutron-functional","commit_id":"6b1744eb8a9ad802f0be74c065a5d140e1d2dda4"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"551bccd569b5d77ca1399980f0a8782e44d2e0d9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"a0611986_eff1245a","updated":"2025-07-01 06:10:09.000000000","message":"recheck neutron-functional","commit_id":"6b1744eb8a9ad802f0be74c065a5d140e1d2dda4"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"319be2aa8d1340ea4675189d98bc50e496d289ec","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"26098a4a_f6761018","updated":"2025-06-30 06:12:44.000000000","message":"recheck neutron-tempest-plugin-openvswitch","commit_id":"6b1744eb8a9ad802f0be74c065a5d140e1d2dda4"}],"neutron/agent/dhcp/agent.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"99273cd6e5cc38dda83abeb56347656c5c7e9c2f","unresolved":true,"context_lines":[{"line_number":199,"context_line":"                network \u003d self.cache.get_network_by_id(network_id)"},{"line_number":200,"context_line":"                if network is not None:"},{"line_number":201,"context_line":"                    self.call_driver(\u0027bulk_reload_allocations\u0027, network)"},{"line_number":202,"context_line":"            time.sleep(self.conf.bulk_reload_interval)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def call_driver(self, action, network, **action_kwargs):"},{"line_number":205,"context_line":"        sid_segment \u003d {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"e606e635_defdbae5","line":202,"updated":"2025-05-21 10:20:43.000000000","message":"here too, but a grepp on sleep(0) should also help once needed ;-)","commit_id":"7335ef885d6b96ae5a1981d89c7ca493eec2bc57"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"99273cd6e5cc38dda83abeb56347656c5c7e9c2f","unresolved":true,"context_lines":[{"line_number":292,"context_line":"        \"\"\""},{"line_number":293,"context_line":"        self.needs_resync_reasons[network_id].append(reason)"},{"line_number":294,"context_line":"        self._periodic_resync_event.set()"},{"line_number":295,"context_line":"        # Remove this comment and the sleep?"},{"line_number":296,"context_line":"        # Yield to allow other threads that may be ready to run."},{"line_number":297,"context_line":"        # This helps prevent one thread from acquiring the same lock over and"},{"line_number":298,"context_line":"        # over again, in which case no other threads waiting on the"}],"source_content_type":"text/x-python","patch_set":3,"id":"90795d93_abbd2512","line":295,"updated":"2025-05-21 10:20:43.000000000","message":"Yep, you sjould probably add a TODO tag to remove the sleep","commit_id":"7335ef885d6b96ae5a1981d89c7ca493eec2bc57"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"e0117df08a5956ccd1ac405f75a2b853bcaf81ec","unresolved":true,"context_lines":[{"line_number":292,"context_line":"        \"\"\""},{"line_number":293,"context_line":"        self.needs_resync_reasons[network_id].append(reason)"},{"line_number":294,"context_line":"        self._periodic_resync_event.set()"},{"line_number":295,"context_line":"        # Remove this comment and the sleep?"},{"line_number":296,"context_line":"        # Yield to allow other threads that may be ready to run."},{"line_number":297,"context_line":"        # This helps prevent one thread from acquiring the same lock over and"},{"line_number":298,"context_line":"        # over again, in which case no other threads waiting on the"}],"source_content_type":"text/x-python","patch_set":3,"id":"1c8490d5_f66cfc28","line":295,"in_reply_to":"90795d93_abbd2512","updated":"2025-06-17 10:20:24.000000000","message":"I double checked it to be sure: https://discuss.python.org/t/time-sleep-0-yield-behaviour/27185\nAnd no need for todo, the sleep is valid there","commit_id":"7335ef885d6b96ae5a1981d89c7ca493eec2bc57"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"99273cd6e5cc38dda83abeb56347656c5c7e9c2f","unresolved":true,"context_lines":[{"line_number":384,"context_line":""},{"line_number":385,"context_line":"    def start_ready_ports_loop(self):"},{"line_number":386,"context_line":"        \"\"\"Spawn a thread to push changed ports to server.\"\"\""},{"line_number":387,"context_line":"        threading.Thread(target\u003dself._dhcp_ready_ports_loop).start()"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"    @utils.exception_logger()"},{"line_number":390,"context_line":"    def _periodic_resync_helper(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"f9b73362_61e0b60b","line":387,"updated":"2025-05-21 10:20:43.000000000","message":"In any of you change you check to wait to join the threads, I think it\u0027s ok as you don\u0027t want to change the current behavior, but basically \"you\" (no you, in general ;)) blocked my change here for the same kind of pattern https://review.opendev.org/c/openstack/neutron/+/940983/8/neutron/services/trunk/drivers/openvswitch/agent/ovsdb_handler.py","commit_id":"7335ef885d6b96ae5a1981d89c7ca493eec2bc57"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"e0117df08a5956ccd1ac405f75a2b853bcaf81ec","unresolved":true,"context_lines":[{"line_number":384,"context_line":""},{"line_number":385,"context_line":"    def start_ready_ports_loop(self):"},{"line_number":386,"context_line":"        \"\"\"Spawn a thread to push changed ports to server.\"\"\""},{"line_number":387,"context_line":"        threading.Thread(target\u003dself._dhcp_ready_ports_loop).start()"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"    @utils.exception_logger()"},{"line_number":390,"context_line":"    def _periodic_resync_helper(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"db180e19_a86ab036","line":387,"in_reply_to":"b565570c_7adc1cfd","updated":"2025-06-17 10:20:24.000000000","message":"I added a TODO for checking threadpoolexecutor if it can be used in dhcp-agent","commit_id":"7335ef885d6b96ae5a1981d89c7ca493eec2bc57"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"ad64e6de84a3ed52f8b6a7a49f9bbbb96d44bef9","unresolved":true,"context_lines":[{"line_number":384,"context_line":""},{"line_number":385,"context_line":"    def start_ready_ports_loop(self):"},{"line_number":386,"context_line":"        \"\"\"Spawn a thread to push changed ports to server.\"\"\""},{"line_number":387,"context_line":"        threading.Thread(target\u003dself._dhcp_ready_ports_loop).start()"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"    @utils.exception_logger()"},{"line_number":390,"context_line":"    def _periodic_resync_helper(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"b565570c_7adc1cfd","line":387,"in_reply_to":"f9b73362_61e0b60b","updated":"2025-05-29 10:59:55.000000000","message":"so your suggestion is to use threadpoolexecutor for example, as that has much better API for handling threads with a contextmanager for example?","commit_id":"7335ef885d6b96ae5a1981d89c7ca493eec2bc57"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"0079ffe4dac537433dcab7d68c6a44cf03c9cef8","unresolved":true,"context_lines":[{"line_number":296,"context_line":"        # This helps prevent one thread from acquiring the same lock over and"},{"line_number":297,"context_line":"        # over again, in which case no other threads waiting on the"},{"line_number":298,"context_line":"        # \"dhcp-agent\" lock would make any progress."},{"line_number":299,"context_line":"        time.sleep(0)"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    @_sync_lock"},{"line_number":302,"context_line":"    def sync_state(self, networks\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"4c48f6b3_26693860","line":299,"range":{"start_line":299,"start_character":8,"end_line":299,"end_character":21},"updated":"2025-06-25 12:55:27.000000000","message":"This should not be needed anymore.","commit_id":"6b1744eb8a9ad802f0be74c065a5d140e1d2dda4"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b31acecb4fd894356097feb9f061f7b34f9779b6","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        # This helps prevent one thread from acquiring the same lock over and"},{"line_number":297,"context_line":"        # over again, in which case no other threads waiting on the"},{"line_number":298,"context_line":"        # \"dhcp-agent\" lock would make any progress."},{"line_number":299,"context_line":"        time.sleep(0)"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    @_sync_lock"},{"line_number":302,"context_line":"    def sync_state(self, networks\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"839a646c_265fee4f","line":299,"range":{"start_line":299,"start_character":8,"end_line":299,"end_character":21},"in_reply_to":"43c5531f_6d5b3ff2","updated":"2025-06-29 20:25:41.000000000","message":"I don\u0027t think we need to manually yield at this point. The thread executing `_dhcp_ready_ports_loop` or attending the RPC messages will get scheduled now automatically (preemptive threads).\n\nIn any case, we can re take this discussion later. Let\u0027s go for the eventlet removal now.\n\nThanks for your time Lajos!!","commit_id":"6b1744eb8a9ad802f0be74c065a5d140e1d2dda4"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"14cc1c3a90a5e0e7c18b3fc55c89b4c95cb6edd0","unresolved":true,"context_lines":[{"line_number":296,"context_line":"        # This helps prevent one thread from acquiring the same lock over and"},{"line_number":297,"context_line":"        # over again, in which case no other threads waiting on the"},{"line_number":298,"context_line":"        # \"dhcp-agent\" lock would make any progress."},{"line_number":299,"context_line":"        time.sleep(0)"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    @_sync_lock"},{"line_number":302,"context_line":"    def sync_state(self, networks\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"43c5531f_6d5b3ff2","line":299,"range":{"start_line":299,"start_character":8,"end_line":299,"end_character":21},"in_reply_to":"4c48f6b3_26693860","updated":"2025-06-27 13:05:18.000000000","message":"Based on the discussion I linked in a previous comment it is still necessary (https://discuss.python.org/t/time-sleep-0-yield-behaviour/27185)","commit_id":"6b1744eb8a9ad802f0be74c065a5d140e1d2dda4"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"236592f57db0c0a4374cd6f2148c7232852f1dca","unresolved":true,"context_lines":[{"line_number":416,"context_line":""},{"line_number":417,"context_line":"    def periodic_resync(self):"},{"line_number":418,"context_line":"        \"\"\"Spawn a thread to periodically resync the dhcp state.\"\"\""},{"line_number":419,"context_line":"        resync_thread \u003d threading.Thread(target\u003dself._periodic_resync_event)"},{"line_number":420,"context_line":"        resync_thread.start()"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"    def safe_get_network_info(self, network_id):"}],"source_content_type":"text/x-python","patch_set":10,"id":"dd147e12_e158bf9c","line":419,"updated":"2025-06-30 20:01:50.000000000","message":"nit: could have been like above since we\u0027re not saving resync_thread anywhere:\n\nthreading.Thread(target\u003dself._periodic_resync_event).start()","commit_id":"6b1744eb8a9ad802f0be74c065a5d140e1d2dda4"}]}
