villebro commented on code in PR #43316:
URL: https://github.com/apache/superset/pull/43316#discussion_r3831480689
##########
superset/async_events/async_query_manager.py:
##########
@@ -137,8 +147,39 @@ def init_app(self, app: Flask) -> None:
"""
)
- self._cache = get_cache_backend(app.config)
- logger.debug("Using GAQ Cache backend as %s",
type(self._cache).__name__)
+ if not (
+ app.config.get("DISTRIBUTED_COORDINATION_CONFIG")
+ or app.config.get("GLOBAL_ASYNC_QUERIES_CACHE_BACKEND", {}).get(
+ "CACHE_TYPE"
+ )
+ ):
+ raise UnsupportedCacheBackendError(
+ "Global async queries require a coordination backend;
configure "
+ "DISTRIBUTED_COORDINATION_CONFIG
(GLOBAL_ASYNC_QUERIES_CACHE_BACKEND "
+ "is deprecated)."
+ )
+
+ # Global Async Queries keeps its own coordination backend during the
+ # deprecation window: prefer the dedicated (deprecated)
+ # GLOBAL_ASYNC_QUERIES_CACHE_BACKEND when configured, otherwise use the
+ # shared DISTRIBUTED_COORDINATION_CONFIG. This scopes GAQ's
stream/pub-sub
+ # traffic to its own connection and keeps it off the coordinator's
backend
+ # (which powers distributed locks and the Global Task Framework). In
8.0 the
+ # dedicated backend is removed and GAQ moves onto the coordinator's
connection.
+ if app.config.get("GLOBAL_ASYNC_QUERIES_CACHE_BACKEND",
{}).get("CACHE_TYPE"):
Review Comment:
Already addressed
--
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]