rfyu commented on code in PR #2790:
URL: https://github.com/apache/amoro/pull/2790#discussion_r1591975989


##########
amoro-ams/amoro-ams-server/src/main/java/org/apache/amoro/server/optimizing/TaskRuntime.java:
##########
@@ -105,6 +105,7 @@ public void complete(OptimizerThread thread, 
OptimizingTaskResult result) {
           token = null;
           threadId = -1;
         });
+    owner.releaseResourcesIfNecessary();

Review Comment:
   I think two threads are blocked inside `cancelTasks` within 
`owner.acceptResult(this)`, so wrapping `cancelTask` within 
`releaseResourcesIfNecessary` and placing it outside `owner.acceptResult(this)` 
should indeed solve the deadlock issue



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