)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"c6280cad95bf0a7a46aa3d129b5e78d55c30a897","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Gorka Eguileor \u003cgeguileo@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2022-07-06 19:14:05 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Deadlock prevention support in syncrhonize"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Some drivers may require multiple locks for a critical section, which"},{"line_number":10,"context_line":"could potentially create deadlocks.  Like in the following example,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ce0be269_132f2710","line":7,"range":{"start_line":7,"start_character":31,"end_line":7,"end_character":42},"updated":"2022-07-15 16:37:08.000000000","message":"nit: synchronize","commit_id":"7b3d71bb02a2e233ef063609c78a746b5424c632"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"c00465dd0672a640e8419973c0de81eb0c9cee0f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Gorka Eguileor \u003cgeguileo@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2022-07-06 19:14:05 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Deadlock prevention support in syncrhonize"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Some drivers may require multiple locks for a critical section, which"},{"line_number":10,"context_line":"could potentially create deadlocks.  Like in the following example,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"77eadc4f_49a6ed86","line":7,"range":{"start_line":7,"start_character":31,"end_line":7,"end_character":42},"in_reply_to":"ce0be269_132f2710","updated":"2022-07-22 10:28:21.000000000","message":"Done","commit_id":"7b3d71bb02a2e233ef063609c78a746b5424c632"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"c6280cad95bf0a7a46aa3d129b5e78d55c30a897","unresolved":true,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"To make it easier for drivers to request multiple locks ensuring that no"},{"line_number":27,"context_line":"deadlock happens the \"synchronize\" decorator in cinder.coordination"},{"line_number":28,"context_line":"accepts multiple lock tamplates and acquires them sorted by rendered"},{"line_number":29,"context_line":"name removing duplicates."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"This helps prevent deadlocks because the same lock names will always be"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"f1ed08fd_3b1cb18d","line":28,"range":{"start_line":28,"start_character":22,"end_line":28,"end_character":31},"updated":"2022-07-15 16:37:08.000000000","message":"templates","commit_id":"7b3d71bb02a2e233ef063609c78a746b5424c632"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"c00465dd0672a640e8419973c0de81eb0c9cee0f","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"To make it easier for drivers to request multiple locks ensuring that no"},{"line_number":27,"context_line":"deadlock happens the \"synchronize\" decorator in cinder.coordination"},{"line_number":28,"context_line":"accepts multiple lock tamplates and acquires them sorted by rendered"},{"line_number":29,"context_line":"name removing duplicates."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"This helps prevent deadlocks because the same lock names will always be"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"459a2c78_19d12c6f","line":28,"range":{"start_line":28,"start_character":22,"end_line":28,"end_character":31},"in_reply_to":"f1ed08fd_3b1cb18d","updated":"2022-07-22 10:28:21.000000000","message":"Done","commit_id":"7b3d71bb02a2e233ef063609c78a746b5424c632"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"c6280cad95bf0a7a46aa3d129b5e78d55c30a897","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"623af75d_1afa12e5","updated":"2022-07-15 16:37:08.000000000","message":"A few small things noted inline. I have a larger issue at line 163 in coordination.py, but i did some grepping through the code and it looks like my concern is entirely theoretical (I couldn\u0027t find any current calls that pass more than one argument).  So it may be nothing to worry about.","commit_id":"7b3d71bb02a2e233ef063609c78a746b5424c632"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"c00465dd0672a640e8419973c0de81eb0c9cee0f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"92aa56cd_fd2e7c47","updated":"2022-07-22 10:28:21.000000000","message":"Brian, thanks for the review.","commit_id":"7b3d71bb02a2e233ef063609c78a746b5424c632"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"4d4d9af3ba8e0fc99fa9735666d34fc8d87af064","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"b5acbbf6_2ef7e769","updated":"2022-07-15 16:37:32.000000000","message":"Forgot to mention that I like the patch!","commit_id":"7b3d71bb02a2e233ef063609c78a746b5424c632"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"96617ff490185a28be2cf414a32386d5fc16c774","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"57ded993_7f2f4494","updated":"2023-05-23 07:50:36.000000000","message":"LGTM, the main idea here is to sort the locks so that they are acquired in the correct sequence even if two requests try to acquire it in opposite order.\nRaising priority since it prevents a deadlock condition and has been sitting for a while.","commit_id":"749772a6fb6ebde89780b433bf7d91e76486244b"}],"cinder/coordination.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"c6280cad95bf0a7a46aa3d129b5e78d55c30a897","unresolved":true,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"def synchronized(*lock_names: str,"},{"line_number":163,"context_line":"                 blocking: bool \u003d True,"},{"line_number":164,"context_line":"                 coordinator: Coordinator \u003d COORDINATOR) -\u003e Callable:"},{"line_number":165,"context_line":"    \"\"\"Synchronization decorator."},{"line_number":166,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"2f994271_31c7a1ab","line":163,"range":{"start_line":163,"start_character":17,"end_line":163,"end_character":25},"updated":"2022-07-15 16:37:08.000000000","message":"My concern is that \u0027blocking\u0027 goes from being a positional parameter to a keyword-only parameter.  So if anyone is currently calling this as:\n\n  synchronized(\u0027name\u0027, False)\n  \nlock_names will be (\u0027name\u0027, False) and blocking will be True.  I don\u0027t have a better suggestion, though.  I guess mypy should object to such a call as passing the wrong data type to *lock_names.  Until we get everything mypy\u0027d though, I guess the question is what happens when you call\n\n  coordinator.get_lock(False)\n\nnot sure if it will barf or create a lock named \u0027False\u0027.","commit_id":"7b3d71bb02a2e233ef063609c78a746b5424c632"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"c00465dd0672a640e8419973c0de81eb0c9cee0f","unresolved":false,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"def synchronized(*lock_names: str,"},{"line_number":163,"context_line":"                 blocking: bool \u003d True,"},{"line_number":164,"context_line":"                 coordinator: Coordinator \u003d COORDINATOR) -\u003e Callable:"},{"line_number":165,"context_line":"    \"\"\"Synchronization decorator."},{"line_number":166,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3373d0e3_6118a727","line":163,"range":{"start_line":163,"start_character":17,"end_line":163,"end_character":25},"in_reply_to":"2f994271_31c7a1ab","updated":"2022-07-22 10:28:21.000000000","message":"Currently there is no caller to coordination.synchronized that passes the blocking argument.  I have added an \"attention\" note on the documentation and made it explicit in the docstring.\n\nIf somebody passes just False as the argument it will raise an exception on line 220 since booleans don\u0027t have a \"format\" method.","commit_id":"7b3d71bb02a2e233ef063609c78a746b5424c632"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"c6280cad95bf0a7a46aa3d129b5e78d55c30a897","unresolved":true,"context_lines":[{"line_number":164,"context_line":"                 coordinator: Coordinator \u003d COORDINATOR) -\u003e Callable:"},{"line_number":165,"context_line":"    \"\"\"Synchronization decorator."},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    :param str lock_names: List of Lock names."},{"line_number":168,"context_line":"    :param blocking: If True, blocks until the lock is acquired."},{"line_number":169,"context_line":"            If False, raises exception when not acquired. Otherwise,"},{"line_number":170,"context_line":"            the value is used as a timeout value and if lock is not acquired"}],"source_content_type":"text/x-python","patch_set":1,"id":"78cbe50f_40cfa81c","line":167,"range":{"start_line":167,"start_character":27,"end_line":167,"end_character":31},"updated":"2022-07-15 16:37:08.000000000","message":"Not really a list, though.  Maybe say \"Arbitrary number of lock names\".","commit_id":"7b3d71bb02a2e233ef063609c78a746b5424c632"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"c00465dd0672a640e8419973c0de81eb0c9cee0f","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                 coordinator: Coordinator \u003d COORDINATOR) -\u003e Callable:"},{"line_number":165,"context_line":"    \"\"\"Synchronization decorator."},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    :param str lock_names: List of Lock names."},{"line_number":168,"context_line":"    :param blocking: If True, blocks until the lock is acquired."},{"line_number":169,"context_line":"            If False, raises exception when not acquired. Otherwise,"},{"line_number":170,"context_line":"            the value is used as a timeout value and if lock is not acquired"}],"source_content_type":"text/x-python","patch_set":1,"id":"fe5ba289_e15b967e","line":167,"range":{"start_line":167,"start_character":27,"end_line":167,"end_character":31},"in_reply_to":"78cbe50f_40cfa81c","updated":"2022-07-22 10:28:21.000000000","message":"I was thinking from the perspective of the code inside the method (where it\u0027s always a list), but that is not the right perspective.  It should always be phrased from the method caller\u0027s perspective, and from that perspective talking about a list would be confusing.","commit_id":"7b3d71bb02a2e233ef063609c78a746b5424c632"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"c6280cad95bf0a7a46aa3d129b5e78d55c30a897","unresolved":true,"context_lines":[{"line_number":199,"context_line":"        def foo(self, vol, snap):"},{"line_number":200,"context_line":"           ..."},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    Multiple locks can be requested simultaneously and the decorator will order"},{"line_number":203,"context_line":"    the names by rendered lock names to prevent potential deadlocks."},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        @synchronized(\u0027{f_name}-{vol.id}-{snap[name]}\u0027,"},{"line_number":206,"context_line":"                      \u0027{f_name}-{vol.id}.delete\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a7c482c_a64b0add","line":203,"range":{"start_line":202,"start_character":69,"end_line":203,"end_character":13},"updated":"2022-07-15 16:37:08.000000000","message":"I\u0027m probably being too picky, but maybe say:\n\n  will reorder the names alphabetically\n  \njust to make it completely clear that the order in which the arguments are specified is ignored.","commit_id":"7b3d71bb02a2e233ef063609c78a746b5424c632"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"c00465dd0672a640e8419973c0de81eb0c9cee0f","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        def foo(self, vol, snap):"},{"line_number":200,"context_line":"           ..."},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    Multiple locks can be requested simultaneously and the decorator will order"},{"line_number":203,"context_line":"    the names by rendered lock names to prevent potential deadlocks."},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        @synchronized(\u0027{f_name}-{vol.id}-{snap[name]}\u0027,"},{"line_number":206,"context_line":"                      \u0027{f_name}-{vol.id}.delete\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"f03fb098_d4c192bb","line":203,"range":{"start_line":202,"start_character":69,"end_line":203,"end_character":13},"in_reply_to":"9a7c482c_a64b0add","updated":"2022-07-22 10:28:21.000000000","message":"Done","commit_id":"7b3d71bb02a2e233ef063609c78a746b5424c632"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"22333ffe5244dc8880527d74fb7082076638b222","unresolved":true,"context_lines":[{"line_number":164,"context_line":"                 coordinator: Coordinator \u003d COORDINATOR) -\u003e Callable:"},{"line_number":165,"context_line":"    \"\"\"Synchronization decorator."},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    :param str lock_names: Arbitraty number of Lock names."},{"line_number":168,"context_line":"    :param blocking: If True, blocks until the lock is acquired."},{"line_number":169,"context_line":"            If False, raises exception when not acquired. Otherwise,"},{"line_number":170,"context_line":"            the value is used as a timeout value and if lock is not acquired"}],"source_content_type":"text/x-python","patch_set":2,"id":"05fd8832_a711a7e3","line":167,"range":{"start_line":167,"start_character":27,"end_line":167,"end_character":36},"updated":"2022-07-25 18:03:06.000000000","message":"typo: Arbitrary","commit_id":"aa0a49cd8b665a4b211b0135008f3847f2361e1d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"9309e1519de6eee2377c7073a4729e3e50e138c1","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                 coordinator: Coordinator \u003d COORDINATOR) -\u003e Callable:"},{"line_number":165,"context_line":"    \"\"\"Synchronization decorator."},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    :param str lock_names: Arbitraty number of Lock names."},{"line_number":168,"context_line":"    :param blocking: If True, blocks until the lock is acquired."},{"line_number":169,"context_line":"            If False, raises exception when not acquired. Otherwise,"},{"line_number":170,"context_line":"            the value is used as a timeout value and if lock is not acquired"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf3afdb6_e85e172d","line":167,"range":{"start_line":167,"start_character":27,"end_line":167,"end_character":36},"in_reply_to":"05fd8832_a711a7e3","updated":"2022-08-24 09:13:01.000000000","message":"Done","commit_id":"aa0a49cd8b665a4b211b0135008f3847f2361e1d"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"99172b2edfba53368e43349bde16a71154e5d6c0","unresolved":true,"context_lines":[{"line_number":164,"context_line":"                 coordinator: Coordinator \u003d COORDINATOR) -\u003e Callable:"},{"line_number":165,"context_line":"    \"\"\"Synchronization decorator."},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    :param str lock_names: Arbitray number of Lock names."},{"line_number":168,"context_line":"    :param blocking: If True, blocks until the lock is acquired."},{"line_number":169,"context_line":"            If False, raises exception when not acquired. Otherwise,"},{"line_number":170,"context_line":"            the value is used as a timeout value and if lock is not acquired"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a9faac0_7bd89215","line":167,"range":{"start_line":167,"start_character":27,"end_line":167,"end_character":35},"updated":"2022-10-24 20:35:21.000000000","message":"typo: Arbitrary","commit_id":"dd084a15dece6eb24fc6ea450edc1ee8b6c245c9"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"9d353a38de463dd950822140c931e1dd27ffeaed","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                 coordinator: Coordinator \u003d COORDINATOR) -\u003e Callable:"},{"line_number":165,"context_line":"    \"\"\"Synchronization decorator."},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    :param str lock_names: Arbitray number of Lock names."},{"line_number":168,"context_line":"    :param blocking: If True, blocks until the lock is acquired."},{"line_number":169,"context_line":"            If False, raises exception when not acquired. Otherwise,"},{"line_number":170,"context_line":"            the value is used as a timeout value and if lock is not acquired"}],"source_content_type":"text/x-python","patch_set":4,"id":"b4b8fc16_b0bf8955","line":167,"range":{"start_line":167,"start_character":27,"end_line":167,"end_character":35},"in_reply_to":"1a9faac0_7bd89215","updated":"2023-01-20 14:59:30.000000000","message":"Done","commit_id":"dd084a15dece6eb24fc6ea450edc1ee8b6c245c9"}]}
