michael-s-molina commented on code in PR #24969:
URL: https://github.com/apache/superset/pull/24969#discussion_r1657130949
##########
superset/commands/sql_lab/execute.py:
##########
@@ -178,9 +181,20 @@ def _validate_query_db(cls, database: Database | None) ->
None:
)
def _save_new_query(self, query: Query) -> None:
+ """
+ Saves the new SQL Lab query.
+
+ Committing within a transaction violates the "unit of work" construct,
but is
+ necessary for async querying given how the command is currently
defined.
Review Comment:
```suggestion
Committing within a transaction violates the "unit of work"
construct, but is
necessary for async querying. The Celery task is defined within the
confines
of another command and needs to read a previously committed state
given the
READ COMMITTED isolation level.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]