924060929 commented on code in PR #66473:
URL: https://github.com/apache/doris/pull/66473#discussion_r3780662353


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/StatementContext.java:
##########
@@ -910,6 +917,7 @@ protected void finalize() throws Throwable {
 
     @Override
     public void close() {
+        clearExternalScanTasks();

Review Comment:
   Fixed in fbed4ac1092. The fixed INSERT and MTMV executors are the only 
production TaskProcessor users. Both install task-owned ConnectContext state on 
reusable workers, while their existing resource cleanup only nulls task fields. 
TaskProcessor now closes the currently installed StatementContext in its outer 
completion finally and unconditionally removes the worker context in a nested 
finally, covering success, failure, cancellation/early return, and close 
failures. We remove rather than restore because these are dedicated 
asynchronous worker pools with no caller context to preserve. TaskProcessorTest 
exercises both concrete task types on a reused single worker, populates and 
verifies invalidation of ExternalScanTaskCache, checks the next task sees no 
inherited ConnectContext, and covers StatementContext.close() throwing. 
Verified with the focused 3-test FE UT, ./build.sh --fe under JDK 17, and a 
focused lifecycle review with no P1/P2 findings.



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

Reply via email to