verdier commented on PR #42621:
URL: https://github.com/apache/superset/pull/42621#issuecomment-5135699925

   For the record: I traced the mechanism behind this failure mode and opened 
#42622 for it. Short version — `mcp_auth_hook` pushes one Flask app context per 
tool call, but `db.session` is scoped by `greenlet.getcurrent` 
(flask-sqlalchemy 2.5.1), so concurrent asyncio tool calls all resolve to the 
same `Session`; the first call to finish pops its context and 
`teardown_appcontext` removes that shared session under the calls still running.
   
   This PR is still worth having on its own — the reads it removes were 
re-fetching values the function already held, and it stops a committed chart 
from being reported as a failure — but it is not a concurrency fix, and I did 
not want #42567 closing to read as one.


-- 
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]

Reply via email to