bito-code-review[bot] commented on PR #42629:
URL: https://github.com/apache/superset/pull/42629#issuecomment-5140370852

   <!-- Bito Reply -->
   The flagged issue is correct. The current implementation of MCP tool 
execution in the pull request already addresses this race condition by 
introducing `superset/mcp_service/session_scope.py` and updating 
`superset/mcp_service/auth.py` to use `_mcp_tool_call_context()`. This context 
manager ensures that each tool call is tagged with a unique 
`_mcp_session_token` via `ContextVar`, which forces `db.session` to create a 
separate SQLAlchemy session for each concurrent call, preventing the teardown 
of one request from detaching the ORM objects of another.
   
   Since the fix is already implemented in the provided diff, no further action 
is required for this specific issue. I have checked the PR comments, and there 
are no other pending review comments to address.


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