aminghadersohi commented on code in PR #44581:
URL: https://github.com/apache/superset/pull/44581#discussion_r4152367639


##########
superset/mcp_service/composite_token_verifier.py:
##########
@@ -180,9 +180,13 @@ async def verify_token(self, token: str) -> AccessToken | 
None:
         """
         if any(token.startswith(prefix) for prefix in self._api_key_prefixes):
             if self._app is not None:
+                from superset.mcp_service.worker import transport_executor
+
                 loop = asyncio.get_running_loop()
+                # Metadata I/O on the transport side shares a bounded,
+                # pool-budgeted executor with audit writes and RBAC filtering.
                 result = await loop.run_in_executor(
-                    None, self._validate_api_key_sync, token
+                    transport_executor(self._app), 
self._validate_api_key_sync, token

Review Comment:
   Valid. Fixed in 8690ac8600: API-key lookups run on their own thread with a 
budgeted metadata connection, with at most 32 admitted at once (more are 
rejected, not queued). Audit writes and RBAC filtering keep the transport 
thread to themselves. Covered by 
`test_stuck_lookups_do_not_delay_transport_metadata_io` and 
`test_transport_validation_runs_on_its_own_thread`.



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