)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":35153,"name":"Ashish Gupta","email":"ashigupt@redhat.com","username":"ashigupt","status":"Redhat"},"change_message_id":"7f102d7703c5ae22dc75528a92b8a37364540239","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"608ac5ba_72233207","updated":"2026-06-11 11:24:44.000000000","message":"recheck","commit_id":"cf13f363e464baa1b48b6a97c1afb18468cdbd68"},{"author":{"_account_id":35153,"name":"Ashish Gupta","email":"ashigupt@redhat.com","username":"ashigupt","status":"Redhat"},"change_message_id":"61cc51df38c59d52763e35e025d5f6a3afb65b76","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"b728c55e_7890594f","updated":"2026-06-11 11:11:26.000000000","message":"recheck","commit_id":"cf13f363e464baa1b48b6a97c1afb18468cdbd68"},{"author":{"_account_id":35153,"name":"Ashish Gupta","email":"ashigupt@redhat.com","username":"ashigupt","status":"Redhat"},"change_message_id":"a00a0cbdd129784894478d960c989cabc3492f17","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"f016a17e_f83e1bcc","updated":"2026-07-27 21:33:13.000000000","message":"@gmaan.os14@gmail.com can you pls review when you get a chance","commit_id":"3b7d0ba78c99a605999dfa6dab7497d95057ee61"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"27d24a2de858e58c1703e29b06bfe26082454e76","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"b36f84d4_1c151520","updated":"2026-07-14 14:28:51.000000000","message":"Looks good. This will allow us to be a bit more parallel in functional test.","commit_id":"3b7d0ba78c99a605999dfa6dab7497d95057ee61"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0ca589722290e0e73d40e7e165215d689fd64433","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"670a812d_f29223bb","updated":"2026-07-30 17:24:37.000000000","message":"i guess we can follow up if we have issue with the locking\n\nthis shoudl work but it feel alot more complext then using the fairlockgurard whic we have tested but im not oging to block on that","commit_id":"3b7d0ba78c99a605999dfa6dab7497d95057ee61"},{"author":{"_account_id":35153,"name":"Ashish Gupta","email":"ashigupt@redhat.com","username":"ashigupt","status":"Redhat"},"change_message_id":"bd0732e4f0f0537b20168b209e246d7a3a596f07","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"30e28482_68cdae0f","updated":"2026-07-09 16:33:16.000000000","message":"recheck","commit_id":"3b7d0ba78c99a605999dfa6dab7497d95057ee61"}],"nova/tests/fixtures/nova.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"971bcf7828fd3c7144d7bafa34aec50d79b28f1e","unresolved":true,"context_lines":[{"line_number":427,"context_line":"        return ctxt"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"_DB_WRITE_LOCKS \u003d {}"},{"line_number":431,"context_line":"_DB_WRITE_LOCKS_GUARD \u003d threading.Lock()"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"def _db_write_lock_for(transaction_context_manager):"}],"source_content_type":"text/x-python","patch_set":1,"id":"68f1f2ae_360bfae1","line":431,"range":{"start_line":430,"start_character":0,"end_line":431,"end_character":40},"updated":"2026-06-11 13:23:59.000000000","message":"These does not need to be global, but can be part of DatabaseWriteLock along with the _db_write_lock_for function. There can only one instance of DatabaseWriteLock effectively anyhow as that fixture replaces the enginefacade._TransactionContextManager._transaction_scope function globally at setup.","commit_id":"cf13f363e464baa1b48b6a97c1afb18468cdbd68"},{"author":{"_account_id":35153,"name":"Ashish Gupta","email":"ashigupt@redhat.com","username":"ashigupt","status":"Redhat"},"change_message_id":"2e90927027721c7cfbf82c2e08d5f54811e55743","unresolved":false,"context_lines":[{"line_number":427,"context_line":"        return ctxt"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"_DB_WRITE_LOCKS \u003d {}"},{"line_number":431,"context_line":"_DB_WRITE_LOCKS_GUARD \u003d threading.Lock()"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"def _db_write_lock_for(transaction_context_manager):"}],"source_content_type":"text/x-python","patch_set":1,"id":"c13441f3_38e3dd4a","line":431,"range":{"start_line":430,"start_character":0,"end_line":431,"end_character":40},"in_reply_to":"68f1f2ae_360bfae1","updated":"2026-07-05 23:42:18.000000000","message":"Done","commit_id":"cf13f363e464baa1b48b6a97c1afb18468cdbd68"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"971bcf7828fd3c7144d7bafa34aec50d79b28f1e","unresolved":true,"context_lines":[{"line_number":439,"context_line":"    \"\"\""},{"line_number":440,"context_line":"    root \u003d transaction_context_manager._root"},{"line_number":441,"context_line":"    with _DB_WRITE_LOCKS_GUARD:"},{"line_number":442,"context_line":"        lock \u003d _DB_WRITE_LOCKS.get(root)"},{"line_number":443,"context_line":"        if lock is None:"},{"line_number":444,"context_line":"            lock \u003d threading.RLock()"},{"line_number":445,"context_line":"            _DB_WRITE_LOCKS[root] \u003d lock"},{"line_number":446,"context_line":"        return lock"},{"line_number":447,"context_line":""},{"line_number":448,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"c300b595_ab97e927","line":445,"range":{"start_line":442,"start_character":0,"end_line":445,"end_character":40},"updated":"2026-06-11 13:23:59.000000000","message":"This is basically what a defaultdict is for. A defaultdict can be defined to create a value when a key is accessed the first time. \nhttps://docs.python.org/3/library/collections.html#collections.defaultdict\n\nI suggest you to look through all the generic collections in this module as knowing them is pretty useful in my cases.","commit_id":"cf13f363e464baa1b48b6a97c1afb18468cdbd68"},{"author":{"_account_id":35153,"name":"Ashish Gupta","email":"ashigupt@redhat.com","username":"ashigupt","status":"Redhat"},"change_message_id":"2e90927027721c7cfbf82c2e08d5f54811e55743","unresolved":false,"context_lines":[{"line_number":439,"context_line":"    \"\"\""},{"line_number":440,"context_line":"    root \u003d transaction_context_manager._root"},{"line_number":441,"context_line":"    with _DB_WRITE_LOCKS_GUARD:"},{"line_number":442,"context_line":"        lock \u003d _DB_WRITE_LOCKS.get(root)"},{"line_number":443,"context_line":"        if lock is None:"},{"line_number":444,"context_line":"            lock \u003d threading.RLock()"},{"line_number":445,"context_line":"            _DB_WRITE_LOCKS[root] \u003d lock"},{"line_number":446,"context_line":"        return lock"},{"line_number":447,"context_line":""},{"line_number":448,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"d06d302a_ac40248e","line":445,"range":{"start_line":442,"start_character":0,"end_line":445,"end_character":40},"in_reply_to":"c300b595_ab97e927","updated":"2026-07-05 23:42:18.000000000","message":"Done","commit_id":"cf13f363e464baa1b48b6a97c1afb18468cdbd68"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"38553b7f74cb7cd14a937026e1189f0d65880fb8","unresolved":true,"context_lines":[{"line_number":467,"context_line":"        @contextmanager"},{"line_number":468,"context_line":"        def _locked_scope(tcm_self, context):"},{"line_number":469,"context_line":"            if tcm_self._mode is enginefacade._WRITER:"},{"line_number":470,"context_line":"                with _db_write_lock_for(tcm_self):"},{"line_number":471,"context_line":"                    with original(tcm_self, context) as resource:"},{"line_number":472,"context_line":"                        yield resource"},{"line_number":473,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"214d99e3_4aed82c1","line":470,"updated":"2026-06-11 13:47:02.000000000","message":"OK I think I see some problem with the Placement DB url. Still with this patch I see placement code opening DB connection to the in memory sqlite DB.\n\nYou can see if you add this check here to check for the DB url and raise like:\n```\n            if str(tcm_self.reader.get_engine().url) \u003d\u003d \u0027sqlite://\u0027:\n                raise RuntimeError(\"Still using in memory sqlite\")\n```\n\n\nI see tracebacks about placement like:\n```\n2026-06-11 15:41:33,884 ERROR [placement.fault_wrap] Placement API unexpected error: Still using in memory sqlite\nTraceback (most recent call last):\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/placement/fault_wrap.py\", line 39, in __call__\n    return self.application(environ, start_response)\n           ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/webob/dec.py\", line 129, in __call__\n    resp \u003d self.call_func(req, *args, **kw)\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/webob/dec.py\", line 193, in call_func\n    return self.func(req, *args, **kwargs)\n           ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/microversion_parse/middleware.py\", line 105, in __call__\n    response \u003d req.get_response(sel\n    f.application)\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/webob/request.py\", line 1313, in send\n    status, headers, app_iter \u003d self.call_application(\n                                ~~~~~~~~~~~~~~~~~~~~~^\n        application, catch_exc_info\u003dFalse)\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/webob/request.py\", line 1278, in call_application\n    app_iter \u003d application(self.environ, start_response)\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/placement/handler.py\", line 215, in __call__\n    return dispatch(environ, start_response, self._map)\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/placement/handler.py\", line 149, in dispatch\n    return handler(environ, start_response)\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/webob/dec.py\", line 129, in __call__\n    resp \u003d self.call_func(req, *args, **kw)\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/placement/wsgi_wrapper.py\", line 29, in call_func\n    super(PlacementWsgify, self).call_func(req, *args, **kwargs)\n    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/webob/dec.py\", line 193, in call_func\n    return self.func(req, *args, **kwargs)\n           ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/placement/util.py\", line 64, in decorated_function\n    return f(req)\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/placement/handlers/resource_provider.py\", line 253, in list_resource_providers\n    resource_providers \u003d rp_obj.get_all_by_filters(context, filters)\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/placement/objects/resource_provider.py\", line 1046, in get_all_by_filters\n    resource_providers \u003d _get_all_by_filters_from_db(context, filters)\n  File \"/home/gibi/upstream/git/openstack/nova/.tox/functional-py313-threading/lib/python3.13/site-packages/oslo_db/sqlalchemy/enginefacade.py\", line 1158, in wrapper\n    with self._transaction_scope(context):\n         ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^\n  File \"/usr/lib/python3.13/contextlib.py\", line 141, in __enter__\n    return next(self.gen)\n  File \"/home/gibi/upstream/git/openstack/nova/nova/tests/fixtures/nova.py\", line 471, in _locked_scope\n    raise RuntimeError(\"Still using in memory sqlite\")\nRuntimeError: Still using in memory sqlite\n2026-06-11 15:41:33,885 INFO [placement.requestlog] 127.0.0.1 \"GET /placement/resource_providers?in_tree\u003da060d79e-db7c-43b6-88aa-d72a4905bf16\" status: 500 len: 252 microversion: 1.14\n```\n\nYou shoudl check if you URL override is properly reaching placement here:\n* https://github.com/openstack/placement/blob/3cba66c70ce49e31e582c8d03e945017f38fcf11/placement/tests/fixtures.py#L43-L45\n* https://github.com/openstack/placement/blob/3cba66c70ce49e31e582c8d03e945017f38fcf11/placement/tests/fixtures.py#L54-L64\n\nAs far as I understand this is the two place we actually touching the DB infarstructure of placement from the functional test.","commit_id":"cf13f363e464baa1b48b6a97c1afb18468cdbd68"},{"author":{"_account_id":35153,"name":"Ashish Gupta","email":"ashigupt@redhat.com","username":"ashigupt","status":"Redhat"},"change_message_id":"2e90927027721c7cfbf82c2e08d5f54811e55743","unresolved":false,"context_lines":[{"line_number":467,"context_line":"        @contextmanager"},{"line_number":468,"context_line":"        def _locked_scope(tcm_self, context):"},{"line_number":469,"context_line":"            if tcm_self._mode is enginefacade._WRITER:"},{"line_number":470,"context_line":"                with _db_write_lock_for(tcm_self):"},{"line_number":471,"context_line":"                    with original(tcm_self, context) as resource:"},{"line_number":472,"context_line":"                        yield resource"},{"line_number":473,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"aeaf2a6f_648ba338","line":470,"in_reply_to":"214d99e3_4aed82c1","updated":"2026-07-05 23:42:18.000000000","message":"Done","commit_id":"cf13f363e464baa1b48b6a97c1afb18468cdbd68"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8071b7a4be1e47a9500680d36c4ccda491d7cc59","unresolved":true,"context_lines":[{"line_number":452,"context_line":"        @contextmanager"},{"line_number":453,"context_line":"        def _locked_scope(tcm_self, context):"},{"line_number":454,"context_line":"            if tcm_self._mode is enginefacade._WRITER:"},{"line_number":455,"context_line":"                with self._get_lock(tcm_self):"},{"line_number":456,"context_line":"                    with original(tcm_self, context) as resource:"},{"line_number":457,"context_line":"                        yield resource"},{"line_number":458,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"6022582b_82867746","line":455,"updated":"2026-07-30 16:57:19.000000000","message":"https://github.com/openstack/nova/blob/master/nova/utils.py#L1149\n\ni think you can drop _get_lock and\n\n```\n    self._locks_guard \u003d threading.Lock()\n    self._locks \u003d collections.defaultdict(threading.RLock)\n```\nand replace this with \n\n```suggestion\n                with utilsFairLockGuard([tcm_self._root]):\n```\n\nassuming _root is a sting?","commit_id":"3b7d0ba78c99a605999dfa6dab7497d95057ee61"}]}
