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


##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -1063,6 +1063,23 @@ public boolean isDeferredForArrowFlight() {
         return deferredForArrowFlight;
     }
 
+    void deferArrowFlightQuery() {
+        deferredForArrowFlight = true;
+        boolean registered;
+        try {
+            registered = context.addFlightSqlDeferredExecutor(this);
+        } catch (RuntimeException | Error t) {
+            deferredForArrowFlight = false;
+            throw t;
+        }
+        if (!registered) {
+            // Session teardown sealed and drained the registry before this 
registration. Finalize directly:
+            // no later owner can reach this executor, and the deferred flag 
prevents the ordinary finally block
+            // from closing the same coordinator a second time.
+            finalizeArrowFlightQuery();

Review Comment:
   这条评论涉及通用查询、任务或 Flight/Streaming 生命周期,不属于本 PR 仅处理 Hudi/Iceberg 资源关闭与泄露的范围。当前 
head 已撤回对应旁支改动,本 PR 忽略该问题。



##########
fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/streaming/StreamingInsertTask.java:
##########
@@ -182,15 +182,21 @@ public void cancel(boolean needWaitCancelComplete) {
     }
 
     @Override
-    public void closeOrReleaseResources() {
-        if (null != stmtExecutor) {
+    public synchronized void closeOrReleaseResources() {

Review Comment:
   这条评论涉及通用查询、任务或 Flight/Streaming 生命周期,不属于本 PR 仅处理 Hudi/Iceberg 资源关闭与泄露的范围。当前 
head 已撤回对应旁支改动,本 PR 忽略该问题。



##########
fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/streaming/StreamingInsertTask.java:
##########
@@ -182,15 +182,21 @@ public void cancel(boolean needWaitCancelComplete) {
     }
 
     @Override
-    public void closeOrReleaseResources() {
-        if (null != stmtExecutor) {
+    public synchronized void closeOrReleaseResources() {
+        ConnectContext taskContext = ctx;
+        try {
+            if (taskContext != null && taskContext.getStatementContext() != 
null) {
+                taskContext.getStatementContext().close();

Review Comment:
   这条评论涉及通用查询、任务或 Flight/Streaming 生命周期,不属于本 PR 仅处理 Hudi/Iceberg 资源关闭与泄露的范围。当前 
head 已撤回对应旁支改动,本 PR 忽略该问题。



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