FrankChen021 commented on code in PR #20183:
URL: https://github.com/apache/druid/pull/20183#discussion_r4314863293
##########
server/src/main/java/org/apache/druid/server/QueryLifecycle.java:
##########
@@ -420,13 +465,58 @@ public <T> QueryResponse<T> execute()
final ResponseContext responseContext =
DirectDruidClient.makeResponseContextForQuery();
@SuppressWarnings("unchecked")
- final Sequence<T> res = QueryPlus.wrap((Query<T>) baseQuery)
-
.withIdentity(authenticationResult.getIdentity())
- .run(texasRanger, responseContext);
+ final Query<T> originalQuery = (Query<T>) baseQuery;
+ final DataSourceQueryHandler dataSourceQueryHandler =
findDataSourceQueryHandler(originalQuery.getDataSource());
+ // Handlers can start fanout or provider work before reaching a segment
walker, or bypass it entirely.
+ // Apply the same server guardrails first, and pass the normalized query
to both runner creation and execution.
+ final Query<T> query = dataSourceQueryHandler == null
+ ? originalQuery
+ :
SetAndVerifyContextQueryRunner.withTimeoutAndMaxScatterGatherBytes(
+ originalQuery,
+ serverConfig,
+ System.currentTimeMillis()
+ );
+ final QueryRunner<T> queryRunner = dataSourceQueryHandler == null
Review Comment:
Leave this in a follow up PR, reaons: the case that cancels a query on
system table is not common
--
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]