xxubai commented on code in PR #3583:
URL: https://github.com/apache/amoro/pull/3583#discussion_r2113478410


##########
amoro-ams/src/main/java/org/apache/amoro/server/optimizing/OptimizingQueue.java:
##########
@@ -399,14 +399,16 @@ private class TableOptimizingProcess implements 
OptimizingProcess {
     private boolean hasCommitted = false;
 
     public TaskRuntime<?> poll() {
-      lock.lock();
-      try {
-        return status != ProcessStatus.KILLED && status != ProcessStatus.FAILED
-            ? taskQueue.poll()
-            : null;
-      } finally {
-        lock.unlock();
+      if (lock.tryLock()) {

Review Comment:
   Make sence



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