)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"0ee98170da7be47d6d65bb85002125020d6f04bd","unresolved":true,"context_lines":[{"line_number":12,"context_line":"present. However, as seen in production environments, this method is"},{"line_number":13,"context_line":"not multiprocess safe."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Instead, this patch is limiting the execution of the network segment"},{"line_number":16,"context_line":"ranges initialization to the first WSGI worker (there must be at least"},{"line_number":17,"context_line":"one worker)."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"NOTE: The same initialization method, when called, removes the"},{"line_number":20,"context_line":"duplicated registers created by [1] in first place. A Neutron API update"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"e6f5519e_e33e6605","line":17,"range":{"start_line":15,"start_character":0,"end_line":17,"end_character":12},"updated":"2025-04-27 04:36:23.000000000","message":"how to prevent multiple \"worker 1\" doing same work among different neutron-server hosts?","commit_id":"64df8fba57bd3bc17c6fb7c12a78712518ea8911"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e7e12415e648c29d695e29a00552f6904c1540e6","unresolved":false,"context_lines":[{"line_number":12,"context_line":"present. However, as seen in production environments, this method is"},{"line_number":13,"context_line":"not multiprocess safe."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Instead, this patch is limiting the execution of the network segment"},{"line_number":16,"context_line":"ranges initialization to the first WSGI worker (there must be at least"},{"line_number":17,"context_line":"one worker)."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"NOTE: The same initialization method, when called, removes the"},{"line_number":20,"context_line":"duplicated registers created by [1] in first place. A Neutron API update"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"a3ea7374_97fba4af","line":17,"range":{"start_line":15,"start_character":0,"end_line":17,"end_character":12},"in_reply_to":"e6f5519e_e33e6605","updated":"2025-04-28 07:12:21.000000000","message":"We don\u0027t need to prevent that. If another server executes the initialization *with the same configuration* (that is a must), the result will be the same, apart from the ``created_at`` fields, that are only read during this initialization.","commit_id":"64df8fba57bd3bc17c6fb7c12a78712518ea8911"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d39239a184dd5945f622ca6ffe65a666216486d0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"862627c9_0e94f206","updated":"2025-04-28 05:59:36.000000000","message":"Please don\u0027t change the WIP flag of this patch.","commit_id":"64df8fba57bd3bc17c6fb7c12a78712518ea8911"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"74d1abb68594ba99bac51953e823f53308a97563","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"ac067f73_f7047721","updated":"2025-04-25 13:53:58.000000000","message":"This patch needs to skip the sync DB for all but worker 1. But it is needed to read the updated information from the DB, thus we need to wait until the DB is in sync.","commit_id":"64df8fba57bd3bc17c6fb7c12a78712518ea8911"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"97c4c28e2850f1d6ecd1e2732ad686dd899c3626","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"4c6bafe0_5629db0e","updated":"2025-05-06 06:05:51.000000000","message":"Quote some comments from https://review.opendev.org/c/openstack/neutron/+/947812:\n\"\"\"\nIf new defaults added in config file, the \"worker-1\" will delete nothing in DB, and create new one on their own side. Can this introduce duplicated DB entry?\n\nIn order to simulate such issue. I have another experiment on mind. Adds 100-1000 new test network_vlan_ranges, something like this:\nnetwork_vlan_ranges \u003d test1:1:2,test2:3:4,test4:4:5...testX:1000:10001\nThese default segment rangs has no DB entry. Each \"worker-1\" on each \"neutron-server-host\" will delete nothing, and create the new ones.\nThen just restart the neutron-servers on each hosts in one shot at the same time. I guess, we may encounter duplicated DB entry sometimes after.\n\"\"\"\nNo DB uniq constraint, so duplicated DB entry can still be created somehow.","commit_id":"1c0abb81bb29b0b4c24c1fa550e55a5250d8e12a"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"2961107fa3bff5c7f056491042a78802f47294eb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"4f0ad718_4d7f942b","updated":"2025-04-29 05:36:28.000000000","message":"recheck functional","commit_id":"1c0abb81bb29b0b4c24c1fa550e55a5250d8e12a"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"64f0e9aa66f0a9179e657eab681a3c5101c5c00b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"66f0be95_d2926539","updated":"2025-04-29 20:45:56.000000000","message":"recheck neutron-tempest-plugin-designate-scenario (non-voting now)","commit_id":"1c0abb81bb29b0b4c24c1fa550e55a5250d8e12a"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"7858c321be6fa69481f3776b19df475b2475cf37","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"aa3e13ae_1451a4d3","in_reply_to":"3478354a_8c1baa67","updated":"2025-05-07 01:05:00.000000000","message":"@Rodolfo\n\n\"Again, the DB constraint change you are proposing implies changing a register [1] that now could be None but not an empty string.\"\nFor this, do you have a better solution to overcome the issue of constrait with NULL value in DB? I can change the code.","commit_id":"1c0abb81bb29b0b4c24c1fa550e55a5250d8e12a"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"0fa13ff4a926eff58f060a9c1ebf36f5112406ab","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"d2dcc1bc_8487d724","in_reply_to":"4c6bafe0_5629db0e","updated":"2025-05-06 10:20:56.000000000","message":"The deletion of the ranges uses the WSGI start time as a reference. Even if two different hosts start the WSGI module at the same millisecond, one of them will see how the other populates the DB.\n\nIn order to improve the DB operations, all the ``initialize_network_segment_range_support`` should be wrapped with a DB write context. That implies all the operations (DB clean-up, new default registers and sync allocations) are done on the same transaction. Because of the DB transactionality, even if two servers commit the txn at the same time, the DB will ensure both succeeds.\n\nAgain, the DB constraint change you are proposing implies changing a register [1] that now could be None but not an empty string.\n\n[1]https://review.opendev.org/c/openstack/neutron/+/947898/7/neutron/db/migration/alembic_migrations/versions/2025.1/expand/b1bca967e19d_add_unique_network_segment_range.py#104","commit_id":"1c0abb81bb29b0b4c24c1fa550e55a5250d8e12a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"d0024aaa7dbfc0c3accc0f82e051952701dd0788","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"3478354a_8c1baa67","in_reply_to":"d2dcc1bc_8487d724","updated":"2025-05-07 00:10:15.000000000","message":"@Liu Yulong did you conduct the experiment you proposed here? I am interested in learning the result","commit_id":"1c0abb81bb29b0b4c24c1fa550e55a5250d8e12a"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"e037007a8118a9fed1a8ad505bb419b4db625ca1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"1a11e44f_6f3bf3ea","updated":"2025-05-07 01:06:27.000000000","message":"Alright, since you guys insist this patch, I will not block it. But IMO, DB uniq constrait is still needed. Because, we should not let the API to create duplicated network segment range as well.","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"6a7a9cfb97f0a060a9bb66592e28788f5c39d436","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"5a9bde28_843b296d","updated":"2025-05-06 14:58:34.000000000","message":"As https://review.opendev.org/c/openstack/neutron/+/938319 is already in stable release I prefer this solution over the https://review.opendev.org/c/openstack/neutron/+/947898 which reverts old patch and introduces db schema changes thus can\u0027t be backported to the stable release at all. And this patch seems like can be easily backported so we will have fix in stable branch too.","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"d0024aaa7dbfc0c3accc0f82e051952701dd0788","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"e650274a_05abd6fb","updated":"2025-05-07 00:10:15.000000000","message":"This is a simpler solution that lends itself to be back ported. I would be interested in learning whether @Liu Yulong conducted the experiment he proposed.","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"9f5b6e71c9e9a23e18aec5e918a7d116ae1334cd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"11ac9b72_9156109f","updated":"2025-05-08 13:08:46.000000000","message":"thanks\nralonsoh could you please consider the comments from slaweq and mlavalle?\nLiu can you please check if this solution solves all the issues you see?","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b25b11c3b01a6b8caf1c1c3786a00c28e6f65125","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"aa0c5e55_1120e711","in_reply_to":"0bdf26f3_26821b4a","updated":"2025-05-13 09:52:40.000000000","message":"I\u0027ll try but this is not an easy test to implement. If I\u0027m not able in a limited amount of time, I\u0027ll keep the patch as is.\n\nThe issue reported in this bug was happening mainly when several workers *of the same host* were trying to initialize the extension. That is very unlikely to happen with workers of different hosts, as long as the initialization method takes very little time and is almost impossible that two hosts restart the API service at the very same time.","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d9b07c3596ec3031155f95b63a99850594bcd8f2","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"49348a0c_02a34e02","in_reply_to":"0dace5b6_81198e5d","updated":"2025-05-09 07:59:48.000000000","message":"Where exactly is that happening? What test?","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"845d1570b476dce97218b0b96f60e022faa54bad","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"a4bf1b1e_ebc187fb","in_reply_to":"11ac9b72_9156109f","updated":"2025-05-08 13:41:11.000000000","message":"I\u0027ve commented Slawek and Miguel\u0027s comments.","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"f00e0f51c5c6084cdfce1b03f13727f8f8e318e0","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"bba4fce6_992eed22","in_reply_to":"1635f897_20594c07","updated":"2025-05-09 08:27:53.000000000","message":"The method ``_populate_new_default_network_segment_ranges`` is being called from ``initialize_network_segment_range_support`` and is called inside a writer context.\n\nThis writer context has the following relevant operations:\n* Delete the expired default registers, based on the ``start_time``; done in ``_delete_expired_default_network_segment_ranges``.\n* Check the number of default registers (also matching the ``start_time``); this is the first operation of ``new_default``.\n* If there are no registers, then create the corresponding ones; done too in ``new_default``.\n\nSo calling ``_populate_new_default_network_segment_ranges`` outside the method ``initialize_network_segment_range_support`` is incorrect and will lead to the reported behaviour on these tests.\n\nIf two servers are restarting the Neutron API at the same time and the have the same start_time (that has millisecond precision), the ``initialize_network_segment_range_support`` will be executed sequentially, as long as both methods are handling the same registers. If both transactions are executed at the same time, one of them will be restarted and executed again. At this point (you can test that), the default registers won\u0027t be duplicated.","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"e1c6af5fc480032800dea2bc51fde15e9a96e4c3","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"1635f897_20594c07","in_reply_to":"49348a0c_02a34e02","updated":"2025-05-09 08:06:27.000000000","message":"...OooooK...., Let\u0027s paste the code here:\n\nneutron/tests/unit/plugins/ml2/drivers/base_type_tunnel.py\n```\n    def test_create_duplicate_network_segment_ranges_same_time(self):\n        self.driver.tunnel_ranges \u003d TUNNEL_RANGES\n        self.driver._initialize(RAW_TUNNEL_RANGES)\n        self.driver.initialize_network_segment_range_support(self.start_time)\n        self.driver._sync_allocations()\n        ret \u003d obj_network_segment_range.NetworkSegmentRange.get_objects(\n            self.context)\n        self.assertEqual(1, len(ret))\n        # test other worker run populate at the same time\n        self.driver._populate_new_default_network_segment_ranges(\n            self.context, self.start_time)\n        ret \u003d obj_network_segment_range.NetworkSegmentRange.get_objects(\n            self.context)\n        # count() check will make it still one DB entry\n        self.assertEqual(1, len(ret))\n\n    def test_create_duplicate_network_segment_ranges_later(self):\n        self.driver.tunnel_ranges \u003d TUNNEL_RANGES\n        self.driver._initialize(RAW_TUNNEL_RANGES)\n        self.driver.initialize_network_segment_range_support(self.start_time)\n        self.driver._sync_allocations()\n        ret \u003d obj_network_segment_range.NetworkSegmentRange.get_objects(\n            self.context)\n        self.assertEqual(1, len(ret))\n        # test other worker run populate at the same time\n        self.driver._populate_new_default_network_segment_ranges(\n            self.context, self.start_time+1)\n        ret \u003d obj_network_segment_range.NetworkSegmentRange.get_objects(\n            self.context)\n        # Duplicated entry created\n        self.assertEqual(2, len(ret))\n```\n\n\nneutron/tests/unit/plugins/ml2/drivers/test_type_vlan.py\n\n```\n    def test_create_duplicate_network_segment_ranges_same_time(self):\n        ret \u003d obj_network_segment_range.NetworkSegmentRange.get_objects(\n            self.context)\n        self.assertEqual(2, len(ret))\n        # test other worker run populate at the same time\n        self.driver._populate_new_default_network_segment_ranges(\n            self.context, self.start_time)\n        ret \u003d obj_network_segment_range.NetworkSegmentRange.get_objects(\n            self.context)\n        # Duplicated entry created\n        self.assertEqual(4, len(ret))\n\n    def test_create_duplicate_network_segment_ranges_later(self):\n        ret \u003d obj_network_segment_range.NetworkSegmentRange.get_objects(\n            self.context)\n        self.assertEqual(2, len(ret))\n        # test other worker run populate a bit later\n        self.driver._populate_new_default_network_segment_ranges(\n            self.context, self.start_time + 1)\n        ret \u003d obj_network_segment_range.NetworkSegmentRange.get_objects(\n            self.context)\n        # Duplicated entry created\n        self.assertEqual(4, len(ret))\n```","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"bdb0ecb69fa850e701ea357d040ad39d06ace946","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"c44a9eb7_ccb97d17","in_reply_to":"627887b3_207e77b6","updated":"2025-05-09 12:57:36.000000000","message":"Again, the test is incorrect. The method ``_populate_new_default_network_segment_ranges`` cannot be called outside the DB context. What this test is doing doesn\u0027t reflect the extension initialization.\n\nIn case you want to implement something related, try to execute at the same time the method ``initialize_network_segment_range_support``.\n\nOr if you want only to test ``_populate_new_default_network_segment_ranges``:\n* Call it inside a DB context.\n* Call it from different threads.\n* Force the first one to yield and allow the second one to finish.\n* The first transaction will be restarted.","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"83d8eda5bcb4eec72e436e414606f423a358b508","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"aee7d57a_f9ddf0ee","in_reply_to":"7cbc8974_69bbf3b0","updated":"2025-05-07 13:04:29.000000000","message":"This patch is:\n* Wrapping the initialization method inside a single txn.\n* Skipping the initialization for every worker except for the first one.\n\nThis patch is indeed simple.\n\nI\u0027ve already tested this patch several times in a multihost env. Of course, as in any other env, it is impossible to start the servers at the same start_time (millisecond sync). In any case, even in that case it will be irrelevant.\n\nPlease propose a test for this patch.","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"9d9b1e3de700710db41ec3acf9e62534c834ee88","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"0dace5b6_81198e5d","in_reply_to":"a4bf1b1e_ebc187fb","updated":"2025-05-09 04:11:06.000000000","message":"The result of https://review.opendev.org/c/openstack/neutron/+/949118 this shows duplicated DB entry.","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"82bdbc6e6062747cb8b55da6f2be325570894e24","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"e31ebae8_51a1aa87","in_reply_to":"aee7d57a_f9ddf0ee","updated":"2025-05-08 06:00:45.000000000","message":"Adds some test cases for this:\nhttps://review.opendev.org/c/openstack/neutron/+/949118","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"8d6b03fdab9c767da315e3ea2c4b9df60ecfcf41","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"627887b3_207e77b6","in_reply_to":"bba4fce6_992eed22","updated":"2025-05-09 09:20:28.000000000","message":"These tests are trying to simulate such scenario:\n1. A-worker-1 on host-1 just is running _delete_expired_default_network_segment_ranges, for new settings of default segment ranges, it may delete nothing.\n2. while B-worker-1 on host-2 is running _delete_expired_default_network_segment_ranges as well at the same time\n3. then A-worker-1 on host-1 run _populate_new_default_network_segment_ranges to create default segment ranges.\n4. B-worker-1 on host-2 did the same work.\n\nAnd accoring to the test case, even if the start_time is NOT equal, it can also have duplicated DB results. I think it is because that count() check will not work in new_default function.\n\nWhether the start_time ist equal or not will not be the problem, different processes in different hosts can run python code at any line.\n\nThe main point is still that, a host-independent in-memory ``start_time`` could not avoid duplicated DB entry, for neutron-servers on different hosts.\n\n\nIn side the code:\n\n```\n    @db_api.retry_db_errors\n    def initialize_network_segment_range_support(self, start_time):\n        admin_context \u003d context.get_admin_context()\n        with db_api.CONTEXT_WRITER.using(admin_context):\n            self._delete_expired_default_network_segment_ranges(\n                admin_context, start_time)\n            # A-worker-1 and B-worker-1 run this line at the same time\n            # Then both run populate?\n            self._populate_new_default_network_segment_ranges(\n                admin_context, start_time)\n            # Override self.tunnel_ranges with the network segment range\n            # information from DB and then do a sync_allocations since the\n            # segment range service plugin has not yet been loaded at this\n            # initialization time.\n            self.tunnel_ranges \u003d self._get_network_segment_ranges_from_db(\n                ctx\u003dadmin_context)\n            self._sync_allocations(ctx\u003dadmin_context)\n```\n\nMore comments for the test code:\n\n```\n    def test_create_duplicate_network_segment_ranges_later(self):\n        #--- simulating: A-worker-1 on host-1\n        self.driver.tunnel_ranges \u003d TUNNEL_RANGES\n        self.driver._initialize(RAW_TUNNEL_RANGES)\n        self.driver.initialize_network_segment_range_support(self.start_time)\n        self.driver._sync_allocations()\n        ret \u003d obj_network_segment_range.NetworkSegmentRange.get_objects(\n            self.context)\n        self.assertEqual(1, len(ret))\n        #--- end of A-worker-1\n \n        # simulating: B-worker-1 on host-2\n        # test other worker run populate a bit later\n        self.driver._populate_new_default_network_segment_ranges(\n            self.context, self.start_time+1)  ###  start_time is NOT EQUAL\n        #--- end of B-worker-1\n\n        ret \u003d obj_network_segment_range.NetworkSegmentRange.get_objects(\n            self.context)\n        # Duplicated entry created\n        self.assertEqual(2, len(ret))\n```","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"3972ce73a28ee635627f92d195e265122507d29c","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"0bdf26f3_26821b4a","in_reply_to":"c44a9eb7_ccb97d17","updated":"2025-05-13 03:48:09.000000000","message":"It\u0027s better to add such cases to this commit.","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"9ecbf966014f3c6f1e8d516c55a4e484c4bbdd17","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"7cbc8974_69bbf3b0","in_reply_to":"e650274a_05abd6fb","updated":"2025-05-07 01:48:59.000000000","message":"😊 looks like this patch is not \"simpler\" now.\nFor my understanding, whoever submits the code should be responsible for testing their own code. We can make the test a simpler way, adding a mock for the timestamp with consistent return_value, to verify the DB results.","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5166b2f0ba143d898006be25b3fe1731dc8aa9b1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"93d18c7e_2c8a68ba","updated":"2025-05-30 10:58:10.000000000","message":"I think that we can move on with this and eventually improve testing in follow up patch if needed.","commit_id":"39d95a14e2e3a067a1bc84dfd190e095e75db9e0"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"eee6a7ad261700075be263b8688d0272a17a85b1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"fc57592f_249d010a","updated":"2025-05-29 14:30:51.000000000","message":"Thanks\nAs I see this can solve our issue and can be backported to 2025.1 also, and we can apply the unique constraint patch from \n Liu (https://review.opendev.org/c/openstack/neutron/+/947898) to master.","commit_id":"39d95a14e2e3a067a1bc84dfd190e095e75db9e0"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"11d76e88c38f7ce1db3875f25a6d9154288d6b37","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"f39b5156_edd9e23e","updated":"2025-06-02 07:31:19.000000000","message":"recheck neutron-tempest-plugin-openvswitch","commit_id":"39d95a14e2e3a067a1bc84dfd190e095e75db9e0"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"6e4c83c171f80a0165a6cee4965c9d4fe6edd156","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"e8fa7181_1ca6ff19","updated":"2025-05-16 05:40:05.000000000","message":"recheck openstack-tox-cover","commit_id":"39d95a14e2e3a067a1bc84dfd190e095e75db9e0"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"38223e22138e39cc5b10e87746e82e53e5b41c61","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"8ed21b19_fed97f88","in_reply_to":"fc57592f_249d010a","updated":"2025-05-30 06:44:36.000000000","message":"This patch is changing how we handle the tunnelled networks physical network, from None to empty string: https://review.opendev.org/c/openstack/neutron/+/947898/11/neutron/plugins/ml2/drivers/type_tunnel.py\n\nThis should not be allowed.","commit_id":"39d95a14e2e3a067a1bc84dfd190e095e75db9e0"}],"neutron/objects/network_segment_range.py":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"c6a0461184d5ae403d66777dccf3c2a457416c9d","unresolved":true,"context_lines":[{"line_number":271,"context_line":"            ).count():"},{"line_number":272,"context_line":"                return"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        cls(context, id\u003duuidutils.generate_uuid(), default\u003dTrue, shared\u003dTrue,"},{"line_number":275,"context_line":"            network_type\u003dnetwork_type, physical_network\u003dphysical_network,"},{"line_number":276,"context_line":"            minimum\u003dminimum, maximum\u003dmaximum, created_at\u003dcreated_at).create()"}],"source_content_type":"text/x-python","patch_set":4,"id":"76f69bd5_c94816f9","line":276,"range":{"start_line":274,"start_character":0,"end_line":276,"end_character":77},"updated":"2025-05-07 01:52:51.000000000","message":"Then this is outof transaction?","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"83d8eda5bcb4eec72e436e414606f423a358b508","unresolved":false,"context_lines":[{"line_number":271,"context_line":"            ).count():"},{"line_number":272,"context_line":"                return"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        cls(context, id\u003duuidutils.generate_uuid(), default\u003dTrue, shared\u003dTrue,"},{"line_number":275,"context_line":"            network_type\u003dnetwork_type, physical_network\u003dphysical_network,"},{"line_number":276,"context_line":"            minimum\u003dminimum, maximum\u003dmaximum, created_at\u003dcreated_at).create()"}],"source_content_type":"text/x-python","patch_set":4,"id":"d6add0f5_d44414ad","line":276,"range":{"start_line":274,"start_character":0,"end_line":276,"end_character":77},"in_reply_to":"76f69bd5_c94816f9","updated":"2025-05-07 13:04:29.000000000","message":"This is out of the transaction of this method. But the method ``new_default`` is called by ``_populate_new_default_network_segment_ranges`` that is called from inside an upper txn.\n\nAs long as we removed the possibility of having nested transactions, any new DB context (writer, reader), will do nothing but use the existing txn.","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"}],"neutron/plugins/ml2/drivers/type_tunnel.py":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"8d6b03fdab9c767da315e3ea2c4b9df60ecfcf41","unresolved":true,"context_lines":[{"line_number":166,"context_line":"    def initialize_network_segment_range_support(self, start_time):"},{"line_number":167,"context_line":"        admin_context \u003d context.get_admin_context()"},{"line_number":168,"context_line":"        with db_api.CONTEXT_WRITER.using(admin_context):"},{"line_number":169,"context_line":"            self._delete_expired_default_network_segment_ranges("},{"line_number":170,"context_line":"                admin_context, start_time)"},{"line_number":171,"context_line":"            self._populate_new_default_network_segment_ranges("},{"line_number":172,"context_line":"                admin_context, start_time)"},{"line_number":173,"context_line":"            # Override self.tunnel_ranges with the network segment range"}],"source_content_type":"text/x-python","patch_set":4,"id":"e86c184d_c5f2fead","line":170,"range":{"start_line":169,"start_character":12,"end_line":170,"end_character":42},"updated":"2025-05-09 09:20:28.000000000","message":"What if A-worker-1 on host-1 and B-worker-1 on host-2 run this line at the same time, and then both will run populate?","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b25b11c3b01a6b8caf1c1c3786a00c28e6f65125","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    def initialize_network_segment_range_support(self, start_time):"},{"line_number":167,"context_line":"        admin_context \u003d context.get_admin_context()"},{"line_number":168,"context_line":"        with db_api.CONTEXT_WRITER.using(admin_context):"},{"line_number":169,"context_line":"            self._delete_expired_default_network_segment_ranges("},{"line_number":170,"context_line":"                admin_context, start_time)"},{"line_number":171,"context_line":"            self._populate_new_default_network_segment_ranges("},{"line_number":172,"context_line":"                admin_context, start_time)"},{"line_number":173,"context_line":"            # Override self.tunnel_ranges with the network segment range"}],"source_content_type":"text/x-python","patch_set":4,"id":"49a0f449_12fc9d80","line":170,"range":{"start_line":169,"start_character":12,"end_line":170,"end_character":42},"in_reply_to":"e2f36c10_e0195818","updated":"2025-05-13 09:52:40.000000000","message":"I don\u0027t even know how to reply to this statement. Of course we need ``start_time`` in order to differentiate two worker actions from two different hosts. But the occurrence of this is much less probable than the concurrency of several workers, in the same host, trying to initialize the extension.\n\nMoving everything to worker 1 removes the concurrency problem, that is very likely to happen between workers of the same host.\n\nAdding the DB writer context to the initialization prevents concurrent calls from other hosts, that is very unlikely to happen.","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"bdb0ecb69fa850e701ea357d040ad39d06ace946","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    def initialize_network_segment_range_support(self, start_time):"},{"line_number":167,"context_line":"        admin_context \u003d context.get_admin_context()"},{"line_number":168,"context_line":"        with db_api.CONTEXT_WRITER.using(admin_context):"},{"line_number":169,"context_line":"            self._delete_expired_default_network_segment_ranges("},{"line_number":170,"context_line":"                admin_context, start_time)"},{"line_number":171,"context_line":"            self._populate_new_default_network_segment_ranges("},{"line_number":172,"context_line":"                admin_context, start_time)"},{"line_number":173,"context_line":"            # Override self.tunnel_ranges with the network segment range"}],"source_content_type":"text/x-python","patch_set":4,"id":"fb33d280_0c9de746","line":170,"range":{"start_line":169,"start_character":12,"end_line":170,"end_character":42},"in_reply_to":"e86c184d_c5f2fead","updated":"2025-05-09 12:57:36.000000000","message":"Again, this is why we have a transactional database. Both transactions are handling the same registers and table. Both cannot be executed at the same time. The DB engine will cancel one and restart it again.","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"3972ce73a28ee635627f92d195e265122507d29c","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    def initialize_network_segment_range_support(self, start_time):"},{"line_number":167,"context_line":"        admin_context \u003d context.get_admin_context()"},{"line_number":168,"context_line":"        with db_api.CONTEXT_WRITER.using(admin_context):"},{"line_number":169,"context_line":"            self._delete_expired_default_network_segment_ranges("},{"line_number":170,"context_line":"                admin_context, start_time)"},{"line_number":171,"context_line":"            self._populate_new_default_network_segment_ranges("},{"line_number":172,"context_line":"                admin_context, start_time)"},{"line_number":173,"context_line":"            # Override self.tunnel_ranges with the network segment range"}],"source_content_type":"text/x-python","patch_set":4,"id":"e2f36c10_e0195818","line":170,"range":{"start_line":169,"start_character":12,"end_line":170,"end_character":42},"in_reply_to":"fb33d280_0c9de746","updated":"2025-05-13 03:48:09.000000000","message":"Then the entire series fixes of this and the https://review.opendev.org/c/openstack/neutron/+/938319 can be simplified to \"move the init actions to the right transaction\". Both that \"start_time\" and \"worker-1\" changes should be not necessary.","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"}],"neutron/plugins/ml2/managers.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"6a7a9cfb97f0a060a9bb66592e28788f5c39d436","unresolved":true,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def initialize_network_segment_range_support(self, start_time):"},{"line_number":209,"context_line":"        if wsgi_utils.get_api_worker_id() !\u003d wsgi_utils.FIRST_WORKER_ID:"},{"line_number":210,"context_line":"            return"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        for network_type, driver in self.drivers.items():"},{"line_number":213,"context_line":"            if network_type in constants.NETWORK_SEGMENT_RANGE_TYPES:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ae46acf6_9ca581e0","line":210,"updated":"2025-05-06 14:58:34.000000000","message":"should we log debug message here maybe?","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"845d1570b476dce97218b0b96f60e022faa54bad","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def initialize_network_segment_range_support(self, start_time):"},{"line_number":209,"context_line":"        if wsgi_utils.get_api_worker_id() !\u003d wsgi_utils.FIRST_WORKER_ID:"},{"line_number":210,"context_line":"            return"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        for network_type, driver in self.drivers.items():"},{"line_number":213,"context_line":"            if network_type in constants.NETWORK_SEGMENT_RANGE_TYPES:"}],"source_content_type":"text/x-python","patch_set":4,"id":"8ae7cc04_3299c0f8","line":210,"in_reply_to":"4771517d_62adb76d","updated":"2025-05-08 13:41:11.000000000","message":"We already have L214. Actually now we\u0027ll see this \"Initializing driver network...\" message only once.","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"d0024aaa7dbfc0c3accc0f82e051952701dd0788","unresolved":true,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def initialize_network_segment_range_support(self, start_time):"},{"line_number":209,"context_line":"        if wsgi_utils.get_api_worker_id() !\u003d wsgi_utils.FIRST_WORKER_ID:"},{"line_number":210,"context_line":"            return"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        for network_type, driver in self.drivers.items():"},{"line_number":213,"context_line":"            if network_type in constants.NETWORK_SEGMENT_RANGE_TYPES:"}],"source_content_type":"text/x-python","patch_set":4,"id":"4771517d_62adb76d","line":210,"in_reply_to":"ae46acf6_9ca581e0","updated":"2025-05-07 00:10:15.000000000","message":"+1","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"}],"neutron/tests/functional/plugins/ml2/drivers/test_type_tunnel.py":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"f2ea11ae6f2d126295dccfaa9474168517add9ad","unresolved":true,"context_lines":[{"line_number":44,"context_line":"        time.sleep(1)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class TunnelTypeDriverBaseTestCase(testlib_api.SqlTestCase):"},{"line_number":48,"context_line":"    def setUp(self):"},{"line_number":49,"context_line":"        super().setUp()"},{"line_number":50,"context_line":"        cfg.CONF.register_opts(common_config.core_opts)"}],"source_content_type":"text/x-python","patch_set":7,"id":"bc504554_0324f48c","line":47,"range":{"start_line":47,"start_character":0,"end_line":47,"end_character":60},"updated":"2025-05-16 12:46:53.000000000","message":"Without the code of this fix, perform the test 100 times, pass 100 times.\n\nAnd without the fix of https://review.opendev.org/c/openstack/neutron/+/938319, can also pass 100 times.","commit_id":"39d95a14e2e3a067a1bc84dfd190e095e75db9e0"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"de2ffbfb0875945c75aaf25a5fe3d47a863c1700","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        time.sleep(1)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class TunnelTypeDriverBaseTestCase(testlib_api.SqlTestCase):"},{"line_number":48,"context_line":"    def setUp(self):"},{"line_number":49,"context_line":"        super().setUp()"},{"line_number":50,"context_line":"        cfg.CONF.register_opts(common_config.core_opts)"}],"source_content_type":"text/x-python","patch_set":7,"id":"f026c348_ea1258f2","line":47,"range":{"start_line":47,"start_character":0,"end_line":47,"end_character":60},"in_reply_to":"acca1eaf_fe99a46e","updated":"2025-05-30 07:27:09.000000000","message":"I also run those 2 tests from the TunnelTypeDriverBaseTestCase class about 40 times on the master branch with just this file (I had to remove \"admin_context\" from L41 and 43 but no other changes) and those tests passed 40 times for me and did not failed even once. Maybe tests are good in general as I don\u0027t see any issue with them but if you wanted to cover with those tests the issue which you are fixing, then I think it is not working as intended now.","commit_id":"39d95a14e2e3a067a1bc84dfd190e095e75db9e0"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e72136cdf1b3be994979e97ab2cc5bdc45ce23a0","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        time.sleep(1)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class TunnelTypeDriverBaseTestCase(testlib_api.SqlTestCase):"},{"line_number":48,"context_line":"    def setUp(self):"},{"line_number":49,"context_line":"        super().setUp()"},{"line_number":50,"context_line":"        cfg.CONF.register_opts(common_config.core_opts)"}],"source_content_type":"text/x-python","patch_set":7,"id":"acca1eaf_fe99a46e","line":47,"range":{"start_line":47,"start_character":0,"end_line":47,"end_character":60},"in_reply_to":"bc3eeaa3_67188181","updated":"2025-05-19 06:10:53.000000000","message":"1) Please specify what test are you referring.\n2) ``test_initialize_network_segment_range_support`` is executed isolated, thus there will be no interaction with other workers.\n3) ``test_initialize_network_segment_range_support_parallel_execution``: in order to test the code of the initialization method and make the execution parallel to other workers, a reduced replica of the initialization method, including the new writer context, has been implemented. This method is ``_initialize_network_segment_range_support``.","commit_id":"39d95a14e2e3a067a1bc84dfd190e095e75db9e0"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"0af2d723ec66258102a262421432e9fa062d2eed","unresolved":true,"context_lines":[{"line_number":44,"context_line":"        time.sleep(1)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class TunnelTypeDriverBaseTestCase(testlib_api.SqlTestCase):"},{"line_number":48,"context_line":"    def setUp(self):"},{"line_number":49,"context_line":"        super().setUp()"},{"line_number":50,"context_line":"        cfg.CONF.register_opts(common_config.core_opts)"}],"source_content_type":"text/x-python","patch_set":7,"id":"bc3eeaa3_67188181","line":47,"range":{"start_line":47,"start_character":0,"end_line":47,"end_character":60},"in_reply_to":"bc504554_0324f48c","updated":"2025-05-16 12:52:56.000000000","message":"For my understanding, testing should achieve the following goal: without adding fix code, the test case cannot pass; after adding the fix code, the test case can pass. So in that way, we ensure that the fix is effective and the fix code can be covered by the test code.","commit_id":"39d95a14e2e3a067a1bc84dfd190e095e75db9e0"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"4e513a9e4239fd2b5efc8df881bcc846864328a9","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        time.sleep(1)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class TunnelTypeDriverBaseTestCase(testlib_api.SqlTestCase):"},{"line_number":48,"context_line":"    def setUp(self):"},{"line_number":49,"context_line":"        super().setUp()"},{"line_number":50,"context_line":"        cfg.CONF.register_opts(common_config.core_opts)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ebae6a30_78f6c88b","line":47,"range":{"start_line":47,"start_character":0,"end_line":47,"end_character":60},"in_reply_to":"f026c348_ea1258f2","updated":"2025-05-30 10:58:52.000000000","message":"This test is preventing a regression. Having said that, if quite difficult to test something using multi thread in any testing FW (funtional). More in particular if the bug refers to what could happen when 2 Neutron API in 2 different servers are spawned.","commit_id":"39d95a14e2e3a067a1bc84dfd190e095e75db9e0"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"951ea8b80805fc16596021058694e83918bee63d","unresolved":true,"context_lines":[{"line_number":62,"context_line":"        self.type_driver.initialize()"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def test_initialize_network_segment_range_support(self):"},{"line_number":65,"context_line":"        # Execute the initialization several times with different start times."},{"line_number":66,"context_line":"        for start_time in range(3):"},{"line_number":67,"context_line":"            self.type_driver.initialize_network_segment_range_support("},{"line_number":68,"context_line":"                start_time)"},{"line_number":69,"context_line":"            sranges \u003d range_obj.NetworkSegmentRange.get_objects(self.admin_ctx)"},{"line_number":70,"context_line":"            self.assertEqual(1, len(sranges))"},{"line_number":71,"context_line":"            self.assertEqual(self.net_type, sranges[0].network_type)"}],"source_content_type":"text/x-python","patch_set":7,"id":"c427fe67_e501dcca","line":68,"range":{"start_line":65,"start_character":0,"end_line":68,"end_character":27},"updated":"2025-05-16 12:57:51.000000000","message":"It\u0027s better to add \"same start time\" case.","commit_id":"39d95a14e2e3a067a1bc84dfd190e095e75db9e0"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e72136cdf1b3be994979e97ab2cc5bdc45ce23a0","unresolved":true,"context_lines":[{"line_number":62,"context_line":"        self.type_driver.initialize()"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def test_initialize_network_segment_range_support(self):"},{"line_number":65,"context_line":"        # Execute the initialization several times with different start times."},{"line_number":66,"context_line":"        for start_time in range(3):"},{"line_number":67,"context_line":"            self.type_driver.initialize_network_segment_range_support("},{"line_number":68,"context_line":"                start_time)"},{"line_number":69,"context_line":"            sranges \u003d range_obj.NetworkSegmentRange.get_objects(self.admin_ctx)"},{"line_number":70,"context_line":"            self.assertEqual(1, len(sranges))"},{"line_number":71,"context_line":"            self.assertEqual(self.net_type, sranges[0].network_type)"}],"source_content_type":"text/x-python","patch_set":7,"id":"adec1e7f_b41c6be6","line":68,"range":{"start_line":65,"start_character":0,"end_line":68,"end_character":27},"in_reply_to":"c427fe67_e501dcca","updated":"2025-05-19 06:10:53.000000000","message":"Why?","commit_id":"39d95a14e2e3a067a1bc84dfd190e095e75db9e0"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"951ea8b80805fc16596021058694e83918bee63d","unresolved":true,"context_lines":[{"line_number":81,"context_line":"            for idx in range(max_workers):"},{"line_number":82,"context_line":"                _futures.append(executor.submit("},{"line_number":83,"context_line":"                    _initialize_network_segment_range_support,"},{"line_number":84,"context_line":"                    self.type_driver, idx))"},{"line_number":85,"context_line":"            for _future in _futures:"},{"line_number":86,"context_line":"                _future.result()"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"258009e5_1f4ee661","line":84,"range":{"start_line":84,"start_character":38,"end_line":84,"end_character":41},"updated":"2025-05-16 12:57:51.000000000","message":"ditto","commit_id":"39d95a14e2e3a067a1bc84dfd190e095e75db9e0"}],"neutron/tests/unit/plugins/ml2/drivers/test_type_vlan.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"6a7a9cfb97f0a060a9bb66592e28788f5c39d436","unresolved":true,"context_lines":[{"line_number":32,"context_line":"from neutron.plugins.ml2.drivers import type_vlan"},{"line_number":33,"context_line":"from neutron.tests.unit import testlib_api"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"PROVIDER_NET \u003d \u0027phys_net1\u0027"},{"line_number":37,"context_line":"TENANT_NET \u003d \u0027phys_net2\u0027"},{"line_number":38,"context_line":"UNCONFIGURED_NET \u003d \u0027no_net\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"4eb7b0fb_bda1b725","line":35,"updated":"2025-05-06 14:58:34.000000000","message":"is this new line needed?","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"c82c6b852304661dc4d842608df0657ac164c646","unresolved":false,"context_lines":[{"line_number":32,"context_line":"from neutron.plugins.ml2.drivers import type_vlan"},{"line_number":33,"context_line":"from neutron.tests.unit import testlib_api"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"PROVIDER_NET \u003d \u0027phys_net1\u0027"},{"line_number":37,"context_line":"TENANT_NET \u003d \u0027phys_net2\u0027"},{"line_number":38,"context_line":"UNCONFIGURED_NET \u003d \u0027no_net\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"a172563c_7527a6af","line":35,"in_reply_to":"4eb7b0fb_bda1b725","updated":"2025-05-08 13:42:07.000000000","message":"Not strictly but I think my editor added it because there should be a 2 line gap between the imports and the rest of the code.","commit_id":"ae665c0c6100c53d47d452e7b2dfa6e8563132bd"}]}
