dimas-b commented on code in PR #2294:
URL: https://github.com/apache/polaris/pull/2294#discussion_r2271755846


##########
runtime/service/src/main/java/org/apache/polaris/service/task/TaskExecutorImpl.java:
##########
@@ -122,27 +131,58 @@ public void addTaskHandlerContext(long taskEntityId, 
CallContext callContext) {
     // the task is still running.
     // Note: PolarisCallContext has request-scoped beans as well, and must be 
cloned.
     // FIXME replace with context propagation?
-    CallContext clone = callContext.copy();
-    tryHandleTask(taskEntityId, clone, null, 1);
+    tryHandleTask(taskEntityId, new TaskContext(callContext), null, 1);
+  }
+
+  record TaskContext(String realmId, PolarisDiagnostics diagnostics) {

Review Comment:
   Actually, @gh-yzou 's comment made me think that we probably need to start a 
new request context for the task via `@ActivateRequestContext` as in #1817 and 
also block context propagation on the task thread pool. That should give us 
proper CDI context isolation. WDYT?
   
   



-- 
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: issues-unsubscr...@polaris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to