You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "ddanielr (via GitHub)" <gi...@apache.org> on 2023/03/09 07:12:43 UTC

[GitHub] [accumulo] ddanielr commented on a diff in pull request #3231: Fix wait timeout logic for available tservers

ddanielr commented on code in PR #3231:
URL: https://github.com/apache/accumulo/pull/3231#discussion_r1130570389


##########
server/master/src/main/java/org/apache/accumulo/master/Master.java:
##########
@@ -1498,51 +1498,47 @@ private void blockForTservers() throws InterruptedException {
           Property.MASTER_STARTUP_TSERVER_AVAIL_MAX_WAIT.getKey());
       maxWait = Long.MAX_VALUE;
     }
+    long sleepInterval = maxWait / 10;
 
-    // honor Retry condition that initial wait < max wait, otherwise use small value to allow thread
-    // yield to happen
-    long initialWait = Math.min(50, maxWait / 2);
-
-    Retry tserverRetry =
-        Retry.builder().infiniteRetries().retryAfter(initialWait, TimeUnit.MILLISECONDS)
-            .incrementBy(15_000, TimeUnit.MILLISECONDS).maxWait(maxWait, TimeUnit.MILLISECONDS)
-            .logInterval(30_000, TimeUnit.MILLISECONDS).createRetry();
+    // Set a incremental logging delay
+    long logIncrement = 15_000;

Review Comment:
   I went a different direction with this due to the other requested changes for `System.nanoTime()`. 
   The variable is now set with an explicit unit of time `TimeUnit.SECONDS.toNanos(15);` which improves readability. 
   



-- 
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: notifications-unsubscribe@accumulo.apache.org

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