gortiz commented on code in PR #15180: URL: https://github.com/apache/pinot/pull/15180#discussion_r1979189925
########## pinot-core/src/main/java/org/apache/pinot/core/query/scheduler/QueryScheduler.java: ########## @@ -117,11 +118,16 @@ public void stop() { * @param queryRequest incoming query request * @param executorService executor service to use for parallelizing query. This is passed to the QueryExecutor * @return Future task that can be scheduled for execution on an ExecutorService. Ideally, this future - * should be executed on a different executor service than {@code e} to avoid deadlock. + * should be executed on a different executor service than {@code executorService} to avoid deadlock. */ protected ListenableFutureTask<byte[]> createQueryFutureTask(ServerQueryRequest queryRequest, ExecutorService executorService) { - return ListenableFutureTask.create(() -> processQueryAndSerialize(queryRequest, executorService)); + return ListenableFutureTask.create(() -> { + try (QueryThreadContext.CloseableContext closeme = QueryThreadContext.open()) { + queryRequest.registerOnQueryThreadLocal(); + return processQueryAndSerialize(queryRequest, executorService); + } + }); Review Comment: This is the code that ensures opeartors SSE have the context initializes -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org