adutra commented on code in PR #469:
URL: https://github.com/apache/polaris/pull/469#discussion_r1914591276


##########
polaris-core/src/main/java/org/apache/polaris/core/context/CallContext.java:
##########
@@ -100,8 +100,9 @@ public Map<String, Object> contextVariables() {
    * CallContext}.
    */
   static CallContext copyOf(CallContext base) {
-    RealmContext realmContext = base.getRealmContext();
-    PolarisCallContext polarisCallContext = base.getPolarisCallContext();
+    String realmId = base.getRealmContext().getRealmIdentifier();
+    RealmContext realmContext = () -> realmId;
+    PolarisCallContext polarisCallContext = 
PolarisCallContext.copyOf(base.getPolarisCallContext());

Review Comment:
   @flyrain this will soon disappear with #589 so I don't think there is need 
to explain.
   
   But just for posterity, the reason is realted to `TaskExecutor`: these beans 
are request-scoped, and they would become unusable when the original request 
that created them completes, but the task hasn't finished executing yet.



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

Reply via email to