)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"97cd9bfde52428da3ff5275d192c223d8ec1840d","unresolved":false,"context_lines":[{"line_number":11,"context_line":"such, they share many common DB APIs."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"These are mostly trivial to migrate. Just a lot of refactoring to create"},{"line_number":14,"context_line":"private methods, avoiding nested transactions."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Signed-off-by: Stephen Finucane \u003cstephenfin@redhat.com\u003e"},{"line_number":17,"context_line":"Change-Id: I267e2e0fac0b4130f8836de276082788fbd8d454"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"da56f39f_3d4e08b0","line":14,"updated":"2024-03-25 11:25:30.000000000","message":"Probably want to add a note about our extensive use of independent transactions here, and the TODOs that are needed to address this long-term.","commit_id":"58e383a4420468a98f53d2890443d23d43bbb4ba"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"8ed38882665a96cd9fa384ca436856feb25d75f4","unresolved":false,"context_lines":[{"line_number":11,"context_line":"such, they share many common DB APIs."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"These are mostly trivial to migrate. Just a lot of refactoring to create"},{"line_number":14,"context_line":"private methods, avoiding nested transactions."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Signed-off-by: Stephen Finucane \u003cstephenfin@redhat.com\u003e"},{"line_number":17,"context_line":"Change-Id: I267e2e0fac0b4130f8836de276082788fbd8d454"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"28c456d5_0efb51b9","line":14,"in_reply_to":"da56f39f_3d4e08b0","updated":"2024-03-25 18:10:34.000000000","message":"Agreed; i\u0027m also going to track these changes for backporting to 2024.1; and we would include https://review.opendev.org/c/openstack/manila/+/914080 and further follow ups. \n\nI think the quota transactions can eventually be handled in the share manager like you suggested (we might have to adjust the tempest tests when we do that refactor); this way we can avoid transactions within transactions.","commit_id":"58e383a4420468a98f53d2890443d23d43bbb4ba"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a34c2cddd417ee3692ea03c301f40c747644dc30","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"b9811e8d_9cd10bb7","updated":"2023-09-28 14:36:04.000000000","message":"I\u0027ve no idea why these are timing out. They run fine in a local machine 😕","commit_id":"ef53d9546195ae50d63389a5dba94dbfc7c71305"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"72b9b5f2c73db3415ceb5ec089fe2e03be2adf7f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"db244153_3347662f","updated":"2023-09-28 14:36:17.000000000","message":"recheck on the off chance it\u0027s a blip","commit_id":"ef53d9546195ae50d63389a5dba94dbfc7c71305"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"707e13d0b5f35b6a8673af346e93fefc52eacb41","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"b51a6de1_422edca7","in_reply_to":"b9811e8d_9cd10bb7","updated":"2023-09-28 15:01:01.000000000","message":"Nope, I was only restart `m-api`, not `m-shr` (where the issue is). From [here](https://ca2f20ffd2797b87b75b-35e07a4cf42cfaed2fcffa4bf0b16f1b.ssl.cf2.rackcdn.com/880207/3/check/manila-tempest-plugin-dummy-dhss/94dd162/controller/logs/screen-m-shr.txt):\n\n```\nSep 28 13:50:38.868566 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server Traceback (most recent call last):\nSep 28 13:50:38.868566 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/data/venv/lib/python3.10/site-packages/oslo_db/sqlalchemy/enginefacade.py\", line 1100, in _transaction_ctx_for_context\nSep 28 13:50:38.868566 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server     return by_thread.current\nSep 28 13:50:38.868566 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/data/venv/lib/python3.10/site-packages/eventlet/corolocal.py\", line 45, in __getattribute__\nSep 28 13:50:38.868566 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server     return object.__getattribute__(self, attr)\nSep 28 13:50:38.868566 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server AttributeError: \u0027_TransactionContextTLocal\u0027 object has no attribute \u0027current\u0027\nSep 28 13:50:38.868566 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server \nSep 28 13:50:38.868566 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server During handling of the above exception, another exception occurred:\nSep 28 13:50:38.868566 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server \nSep 28 13:50:38.868566 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server Traceback (most recent call last):\nSep 28 13:50:38.868566 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/data/venv/lib/python3.10/site-packages/oslo_db/sqlalchemy/enginefacade.py\", line 1078, in _property_for_context\nSep 28 13:50:38.868566 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server     transaction_context \u003d context.transaction_ctx\nSep 28 13:50:38.868566 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/data/venv/lib/python3.10/site-packages/oslo_db/sqlalchemy/enginefacade.py\", line 1102, in _transaction_ctx_for_context\nSep 28 13:50:38.868566 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server     raise exception.NoEngineContextEstablished(\nSep 28 13:50:38.870182 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server oslo_db.exception.NoEngineContextEstablished: No TransactionContext is established for this \u003cmanila.context.RequestContext object at 0x7feb723b9cf0\u003e object within the current thread.\nSep 28 13:50:38.870182 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server \nSep 28 13:50:38.870182 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server During handling of the above exception, another exception occurred:\nSep 28 13:50:38.870182 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server \nSep 28 13:50:38.870182 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server Traceback (most recent call last):\nSep 28 13:50:38.870182 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/data/venv/lib/python3.10/site-packages/oslo_messaging/rpc/server.py\", line 165, in _process_incoming\nSep 28 13:50:38.870182 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server     res \u003d self.dispatcher.dispatch(message)\nSep 28 13:50:38.870182 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/data/venv/lib/python3.10/site-packages/oslo_messaging/rpc/dispatcher.py\", line 309, in dispatch\nSep 28 13:50:38.870182 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server     return self._do_dispatch(endpoint, method, ctxt, args)\nSep 28 13:50:38.870182 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/data/venv/lib/python3.10/site-packages/oslo_messaging/rpc/dispatcher.py\", line 229, in _do_dispatch\nSep 28 13:50:38.870182 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server     result \u003d func(ctxt, **new_args)\nSep 28 13:50:38.870182 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/manila/manila/share/manager.py\", line 236, in wrapped\nSep 28 13:50:38.870182 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server     return f(self, *args, **kwargs)\nSep 28 13:50:38.870182 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/manila/manila/utils.py\", line 579, in wrapper\nSep 28 13:50:38.870182 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server     return func(self, *args, **kwargs)\nSep 28 13:50:38.870182 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/manila/manila/share/manager.py\", line 203, in wrapped\nSep 28 13:50:38.870182 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server     return locked_replica_operation(*args, **kwargs)\nSep 28 13:50:38.870182 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/data/venv/lib/python3.10/site-packages/decorator.py\", line 232, in fun\nSep 28 13:50:38.871404 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server     return caller(func, *(extras + args), **kw)\nSep 28 13:50:38.871404 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/manila/manila/coordination.py\", line 201, in _synchronized\nSep 28 13:50:38.871404 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server     return f(*a, **k)\nSep 28 13:50:38.871404 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/manila/manila/share/manager.py\", line 202, in locked_replica_operation\nSep 28 13:50:38.871404 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server     return operation(*_args, **_kwargs)\nSep 28 13:50:38.871404 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/manila/manila/share/manager.py\", line 2557, in delete_share_replica\nSep 28 13:50:38.871404 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server     self.db.share_replica_delete(context, share_replica[\u0027id\u0027])\nSep 28 13:50:38.871404 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/manila/manila/db/api.py\", line 1647, in share_replica_delete\nSep 28 13:50:38.871404 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server     return IMPL.share_replica_delete(\nSep 28 13:50:38.871404 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/manila/manila/db/sqlalchemy/api.py\", line 172, in wrapper\nSep 28 13:50:38.871404 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server     return f(*args, **kwargs)\nSep 28 13:50:38.871404 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/manila/manila/db/sqlalchemy/api.py\", line 2172, in share_replica_delete\nSep 28 13:50:38.871404 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server     _share_instance_delete(context, share_replica_id, session\u003dsession,\nSep 28 13:50:38.871404 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/manila/manila/db/sqlalchemy/api.py\", line 1922, in _share_instance_delete\nSep 28 13:50:38.871404 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server     _export_locations_update(context, instance_id, [], delete\u003dTrue)\nSep 28 13:50:38.871404 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/manila/manila/db/sqlalchemy/api.py\", line 4503, in _export_locations_update\nSep 28 13:50:38.871404 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server     _export_location_metadata_delete(context, el[\u0027uuid\u0027])\nSep 28 13:50:38.871404 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/manila/manila/db/sqlalchemy/api.py\", line 4596, in _export_location_metadata_delete\nSep 28 13:50:38.872595 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server     meta_ref.soft_delete(session\u003dcontext.session)\nSep 28 13:50:38.872595 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/data/venv/lib/python3.10/site-packages/oslo_db/sqlalchemy/enginefacade.py\", line 1080, in _property_for_context\nSep 28 13:50:38.872595 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server     raise exception.NoEngineContextEstablished(\nSep 28 13:50:38.872595 np0035369270 manila-share[42403]: ERROR oslo_messaging.rpc.server oslo_db.exception.NoEngineContextEstablished: No TransactionContext is established for this \u003cmanila.context.RequestContext object at 0x7feb723b9cf0\u003e object within the current thread; the \u0027session\u0027 attribute is unavailable.\n```\n\nThat\u0027s pretty obvious.","commit_id":"ef53d9546195ae50d63389a5dba94dbfc7c71305"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3f14088a23ee65f02f2c7a8c6dec051e8dddf621","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"16732a4e_799e2600","updated":"2023-10-28 00:38:06.000000000","message":"In the meanwhile, please feel free to mess around with this test job chnage: https://review.opendev.org/c/openstack/manila/+/899508 :)","commit_id":"75071729837606156bca80014caafaf8661d6eed"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ed382d47d53c3afb61725e66467a3be8223cd6e2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"be8331af_673087c5","updated":"2023-10-26 14:00:17.000000000","message":"recheck for fresh results to discuss at PTG","commit_id":"75071729837606156bca80014caafaf8661d6eed"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"bb45fd8fffe0e82126895a335789962f78ed064c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"c2c9f9c2_dce42599","updated":"2024-03-07 20:38:33.000000000","message":"recheck\n\nmiraculously these tests didn\u0027t fail downstream; a perfect example of how hard it is to reproduce possible race conditions :/","commit_id":"c50196ab4c8a4128f149905e8cdbc7ae1fb6b48f"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"071386ac7b5c8dc82d13f4608d10b8522e089757","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"a6e35db6_3d04e8bb","updated":"2024-03-22 20:43:18.000000000","message":"Thank you Mike and Stephen! I don\u0027t think we would have found a resolution for this issue on our own; but we are very glad that you took over to fix these issues and teach us the approach. I do agree we could audit these and probably refactor queries in the future to do better session management. I am very glad to see regression tests passing.","commit_id":"58e383a4420468a98f53d2890443d23d43bbb4ba"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"619afdf686ee401feb97ba91280c8276ad7938e5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"f9869312_1512f05a","updated":"2024-03-22 18:06:50.000000000","message":"recheck\n\n\nI don\u0027t think the grenade failure is related.","commit_id":"58e383a4420468a98f53d2890443d23d43bbb4ba"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"e9647e35fae3403650420cd07053943a13913484","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"270e4262_0963c219","updated":"2024-03-25 18:11:14.000000000","message":"Mike and Stephen: I can\u0027t thank you enough for taking this over and getting all the issues figured out and the tests passing.\n\nCode LGTM","commit_id":"36549c8b97dad72a55bdc7a7ef58a4c5d06944be"},{"author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"5db6e40abefd8182a9ed498bb6067ea4192402a8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"02a3b7c2_0faae6e2","updated":"2024-03-25 16:50:32.000000000","message":"try removing them all.  we are limited only by our appetite for how many tempest runs we want to wait for.","commit_id":"36549c8b97dad72a55bdc7a7ef58a4c5d06944be"}],"manila/db/sqlalchemy/api.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7fc34a68406325e9f8de1bef14daa415ec7dd923","unresolved":true,"context_lines":[{"line_number":1901,"context_line":""},{"line_number":1902,"context_line":""},{"line_number":1903,"context_line":"@require_context"},{"line_number":1904,"context_line":"@context_manager.writer.independent"},{"line_number":1905,"context_line":"def share_instance_delete(context, instance_id, need_to_update_usages\u003dFalse):"},{"line_number":1906,"context_line":"    _share_instance_delete("},{"line_number":1907,"context_line":"        context, instance_id,"}],"source_content_type":"text/x-python","patch_set":10,"id":"fd9d0ccd_17000f91","line":1904,"updated":"2024-03-25 16:47:53.000000000","message":"Does this one need to be independent?","commit_id":"58e383a4420468a98f53d2890443d23d43bbb4ba"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"8ed38882665a96cd9fa384ca436856feb25d75f4","unresolved":false,"context_lines":[{"line_number":1901,"context_line":""},{"line_number":1902,"context_line":""},{"line_number":1903,"context_line":"@require_context"},{"line_number":1904,"context_line":"@context_manager.writer.independent"},{"line_number":1905,"context_line":"def share_instance_delete(context, instance_id, need_to_update_usages\u003dFalse):"},{"line_number":1906,"context_line":"    _share_instance_delete("},{"line_number":1907,"context_line":"        context, instance_id,"}],"source_content_type":"text/x-python","patch_set":10,"id":"e4f0a44b_90a30eaf","line":1904,"in_reply_to":"e682245e_0408098b","updated":"2024-03-25 18:10:34.000000000","message":"++\n\nhttps://review.opendev.org/c/openstack/manila/+/914080/2/manila/db/sqlalchemy/api.py#1904","commit_id":"58e383a4420468a98f53d2890443d23d43bbb4ba"},{"author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"5db6e40abefd8182a9ed498bb6067ea4192402a8","unresolved":true,"context_lines":[{"line_number":1901,"context_line":""},{"line_number":1902,"context_line":""},{"line_number":1903,"context_line":"@require_context"},{"line_number":1904,"context_line":"@context_manager.writer.independent"},{"line_number":1905,"context_line":"def share_instance_delete(context, instance_id, need_to_update_usages\u003dFalse):"},{"line_number":1906,"context_line":"    _share_instance_delete("},{"line_number":1907,"context_line":"        context, instance_id,"}],"source_content_type":"text/x-python","patch_set":10,"id":"e682245e_0408098b","line":1904,"in_reply_to":"fd9d0ccd_17000f91","updated":"2024-03-25 16:50:32.000000000","message":"take them all out!  see if tempest passes.  that\u0027s where I\u0027m at with this one :)\n\nif the quota thing is truly separated out then in theory all of these could come out unless there\u0027s something else in the way.","commit_id":"58e383a4420468a98f53d2890443d23d43bbb4ba"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7fc34a68406325e9f8de1bef14daa415ec7dd923","unresolved":true,"context_lines":[{"line_number":2005,"context_line":""},{"line_number":2006,"context_line":""},{"line_number":2007,"context_line":"@require_context"},{"line_number":2008,"context_line":"@context_manager.reader.independent"},{"line_number":2009,"context_line":"def share_instance_get_all_by_share_server(context, share_server_id,"},{"line_number":2010,"context_line":"                                           with_share_data\u003dFalse):"},{"line_number":2011,"context_line":"    \"\"\"Returns list of share instance with given share server.\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"a0c4f57f_dc7e5e07","line":2008,"updated":"2024-03-25 16:47:53.000000000","message":"Ditto","commit_id":"58e383a4420468a98f53d2890443d23d43bbb4ba"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7fc34a68406325e9f8de1bef14daa415ec7dd923","unresolved":true,"context_lines":[{"line_number":2176,"context_line":""},{"line_number":2177,"context_line":""},{"line_number":2178,"context_line":"@require_context"},{"line_number":2179,"context_line":"@context_manager.writer.independent"},{"line_number":2180,"context_line":"def share_replica_delete("},{"line_number":2181,"context_line":"    context, replica_id, need_to_update_usages\u003dTrue,"},{"line_number":2182,"context_line":"):"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa61d5e6_9b51351d","line":2179,"updated":"2024-03-25 16:47:53.000000000","message":"ditto","commit_id":"58e383a4420468a98f53d2890443d23d43bbb4ba"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"071386ac7b5c8dc82d13f4608d10b8522e089757","unresolved":true,"context_lines":[{"line_number":2532,"context_line":""},{"line_number":2533,"context_line":""},{"line_number":2534,"context_line":"@require_context"},{"line_number":2535,"context_line":"@context_manager.reader.independent"},{"line_number":2536,"context_line":"def share_get_all_by_share_group_id(context, share_group_id,"},{"line_number":2537,"context_line":"                                    filters\u003dNone, sort_key\u003dNone,"},{"line_number":2538,"context_line":"                                    sort_dir\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a6a1c8d_11134c10","line":2535,"range":{"start_line":2535,"start_character":0,"end_line":2535,"end_character":35},"updated":"2024-03-22 20:43:18.000000000","message":"I am unsure why these retrievals need an independent session.. is there a doc I can read to educate myself?","commit_id":"58e383a4420468a98f53d2890443d23d43bbb4ba"},{"author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"1c5d53d5d2c3adb3dda594b8c3d71a3bf0d86a02","unresolved":true,"context_lines":[{"line_number":2532,"context_line":""},{"line_number":2533,"context_line":""},{"line_number":2534,"context_line":"@require_context"},{"line_number":2535,"context_line":"@context_manager.reader.independent"},{"line_number":2536,"context_line":"def share_get_all_by_share_group_id(context, share_group_id,"},{"line_number":2537,"context_line":"                                    filters\u003dNone, sort_key\u003dNone,"},{"line_number":2538,"context_line":"                                    sort_dir\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"81d8e9e7_206b4f33","line":2535,"range":{"start_line":2535,"start_character":0,"end_line":2535,"end_character":35},"in_reply_to":"3a6a1c8d_11134c10","updated":"2024-03-23 02:38:35.000000000","message":"it\u0027s not clear to what extent the independent sessions are needed, however they are at least needed for the \"quota\" writers, and in an additional gerrit that was a breakout of this one (https://review.opendev.org/c/openstack/manila/+/899715/5/manila/db/sqlalchemy/api.py), we needed to add more independent sessions to pass tempest tests.   \n\nwhat \"independent\" achieves here is that the scope of the session is much closer to how it was in the code when it used \"get_session()\"; in that version, all the methods that used get_session() would essentially have their own independent session/database connection/transaction.  methods that called upon another method that also used get_session() would then have the effect of another new connection/transaction being used, \"nested\" in the scope of the use of the original one.    while this is overall the pattern that oslo.db enginefacade was intended to fix, in this case when we applied purely shared session use across all getters, some tempest tests failed.  The reason this can happen is if a particular method keeps a transaction running, calls upon some other methods in that scope, and then those methods also do some database work that then needs to be *visible* to a subsequent web request or other top-level API call, all before the outer enclosing method is completed.   Something like this seems to be apparent with the interaction between \"shares\" and \"quotas\" as we had quite a lot of difficulty getting this to pass tempest tests in https://review.opendev.org/c/openstack/manila/+/899954/13 .\n\nnow that this gerrit passes tests, we can try to remove some of these \"independent\" directives and see if the full tempest suite continues to pass.   The issues we saw involved full runs where a fixture teardown would fail.\n\nif you have more direct access to iterate and run tempest tests, the \"independent\" markers here can be removed as much as can happen with the tests still passing.    Also, as we continue to remove all use of get_session() throughout this code, that will likely allow us to unify transactions further elsewhere.\n\nshort answer is that for now, \"independent\u0027 makes the session\u0027s scope much more similar to how it was when get_session() was used, and it\u0027s used here to keep the tempest suite passing.","commit_id":"58e383a4420468a98f53d2890443d23d43bbb4ba"},{"author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"bb65954bf0ac45398b2e42878a817e7911c3d12c","unresolved":true,"context_lines":[{"line_number":2532,"context_line":""},{"line_number":2533,"context_line":""},{"line_number":2534,"context_line":"@require_context"},{"line_number":2535,"context_line":"@context_manager.reader.independent"},{"line_number":2536,"context_line":"def share_get_all_by_share_group_id(context, share_group_id,"},{"line_number":2537,"context_line":"                                    filters\u003dNone, sort_key\u003dNone,"},{"line_number":2538,"context_line":"                                    sort_dir\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"85dea91a_55606ecf","line":2535,"range":{"start_line":2535,"start_character":0,"end_line":2535,"end_character":35},"in_reply_to":"81d8e9e7_206b4f33","updated":"2024-03-25 13:52:18.000000000","message":"it\u0027s someone else\u0027s call if we want to merge this as is and try to reduce the \"independent\" directives in a followup, where we at least have the newer oslo.db APIs in use and the SQLA 2.0 efforts for upper_constraints are closer to being unblocked, or to continue try to reduce them here as an all at once thing.","commit_id":"58e383a4420468a98f53d2890443d23d43bbb4ba"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7fc34a68406325e9f8de1bef14daa415ec7dd923","unresolved":true,"context_lines":[{"line_number":2532,"context_line":""},{"line_number":2533,"context_line":""},{"line_number":2534,"context_line":"@require_context"},{"line_number":2535,"context_line":"@context_manager.reader.independent"},{"line_number":2536,"context_line":"def share_get_all_by_share_group_id(context, share_group_id,"},{"line_number":2537,"context_line":"                                    filters\u003dNone, sort_key\u003dNone,"},{"line_number":2538,"context_line":"                                    sort_dir\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"e80f0c98_d1ea1ea0","line":2535,"range":{"start_line":2535,"start_character":0,"end_line":2535,"end_character":35},"in_reply_to":"85dea91a_55606ecf","updated":"2024-03-25 16:47:53.000000000","message":"I\u0027ve started that [here](https://review.opendev.org/c/openstack/manila/+/914080/2)","commit_id":"58e383a4420468a98f53d2890443d23d43bbb4ba"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"8ed38882665a96cd9fa384ca436856feb25d75f4","unresolved":true,"context_lines":[{"line_number":2532,"context_line":""},{"line_number":2533,"context_line":""},{"line_number":2534,"context_line":"@require_context"},{"line_number":2535,"context_line":"@context_manager.reader.independent"},{"line_number":2536,"context_line":"def share_get_all_by_share_group_id(context, share_group_id,"},{"line_number":2537,"context_line":"                                    filters\u003dNone, sort_key\u003dNone,"},{"line_number":2538,"context_line":"                                    sort_dir\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"78f040a6_3b9ed05d","line":2535,"range":{"start_line":2535,"start_character":0,"end_line":2535,"end_character":35},"in_reply_to":"e80f0c98_d1ea1ea0","updated":"2024-03-25 18:10:34.000000000","message":"Thank you very much for the detailed explanation Mike; it makes sense. These nested transactions are ancient, and we will try to refactor them - while also adjusting the API expectations (tempest tests here may not align with what users must expect eventually). This can come as a follow up; and we may backport that refactor to 2024.1.. \n\nI\u0027m in favor of merging this so we can keep making progress on removing dependency on autocommit...\n\nThank you Stephen for https://review.opendev.org/c/openstack/manila/+/914080/","commit_id":"58e383a4420468a98f53d2890443d23d43bbb4ba"}]}
