zhengchenyu commented on code in PR #4899:
URL: https://github.com/apache/hive/pull/4899#discussion_r2324786472


##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezProcessor.java:
##########
@@ -295,7 +295,12 @@ protected void initializeAndRunProcessor(Map<String, 
LogicalInput> inputs,
       // If there are other speculative attempt execute canCommit first, then 
wait until the attempt is killed
       // or the committed task fails.
       while (!getContext().canCommit()) {
-        Thread.sleep(100);
+        // If canCommit returns false and fall into this loop, it means 
another task attempt has committed.
+        // And this task attempt is only needs to sleep for a relatively long 
time to wait for being killed.
+        // However, we need to avoid low-probability events: the rare case 
where a task attempt fails after
+        // committed, so we can't set an excessively long delay so that this 
task attempt could react on time.
+        // 500ms is a trade-off value.

Review Comment:
   Thanks, update it. 



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to