Hisoka-X commented on code in PR #9427:
URL: https://github.com/apache/seatunnel/pull/9427#discussion_r2142270903


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/TaskExecutionService.java:
##########
@@ -627,7 +629,11 @@ private void updateMetricsContextInImap() {
                     boolean unLockedIMap = false;
                     while (!unLockedIMap) {
                         try {
-                            
metricsImap.unlock(Constant.IMAP_RUNNING_JOB_METRICS_KEY);
+                            if (System.currentTimeMillis() - lockTs > 5000) {
+                                logger.severe("unlock imap: " + 
Constant.IMAP_RUNNING_JOB_METRICS_KEY + " exceeds 5s, exit while loop.");
+                            } else {
+                                
metricsImap.unlock(Constant.IMAP_RUNNING_JOB_METRICS_KEY);

Review Comment:
   ```suggestion
                                   
metricsImap.forceUnlock(Constant.IMAP_RUNNING_JOB_METRICS_KEY);
   ```
   or change to forceUnlock would be a good choice.



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