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


##########
fe/fe-core/src/main/java/org/apache/doris/job/executor/TaskProcessor.java:
##########
@@ -82,6 +84,22 @@ private void runTask(AbstractTask task) {
             task.runTask();
         } catch (Exception e) {
             log.warn("Execute task error, task id: {}", task.getTaskId(), e);
+        } finally {
+            closeTaskContext();

Review Comment:
   Fixed on the current head `6ccc6d8eedd`. Scheduler-owned dictionary refresh 
contexts now use the production `cleanupScheduledContext()` path from 
`dataLoad(null, ...)`, which closes the StatementContext before removing the 
reusable worker thread ConnectContext. 
`DictionaryManagerTest.testScheduledContextCleanupReleasesExternalScanTasks` 
first retains a representative external scan-task cache entry, invokes the 
scheduler cleanup, verifies no thread-local ConnectContext remains, then 
verifies the closed cache cannot return its earlier entry. The focused JDK 17 
`DictionaryManagerTest` passed 7/7.



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