You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ne...@apache.org on 2019/06/04 17:11:42 UTC

[incubator-pinot] 01/01: Revert "Avoid negative sleep time in startupServiceStatusCheck (#4276)"

This is an automated email from the ASF dual-hosted git repository.

nehapawar pushed a commit to branch revert-4276-helix_server_starter_negative_time
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit d4ced3078d8a6d13da1794546fb6f8328a6e9675
Author: Neha Pawar <np...@linkedin.com>
AuthorDate: Tue Jun 4 10:11:36 2019 -0700

    Revert "Avoid negative sleep time in startupServiceStatusCheck (#4276)"
    
    This reverts commit 3ecdc5cd1eeedac643f160f52a540b3bc5bb308e.
---
 .../pinot/server/starter/helix/HelixServerStarter.java  | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixServerStarter.java b/pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixServerStarter.java
index f3389bd..4e8c20f 100644
--- a/pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixServerStarter.java
+++ b/pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixServerStarter.java
@@ -342,15 +342,14 @@ public class HelixServerStarter {
         throw new IllegalStateException("Service status is BAD");
       }
       long sleepTimeMs = Math.min(checkIntervalMs, endTimeMs - currentTimeMs);
-      if (sleepTimeMs > 0) {
-        LOGGER.info("Sleep for {}ms as service status has not turned GOOD: {}", sleepTimeMs, ServiceStatus.getStatusDescription());
-        try {
-          Thread.sleep(sleepTimeMs);
-        } catch (InterruptedException e) {
-          LOGGER.warn("Got interrupted while checking service status", e);
-          Thread.currentThread().interrupt();
-          break;
-        }
+      LOGGER.info("Sleep for {}ms as service status has not turned GOOD: {}", sleepTimeMs,
+          ServiceStatus.getStatusDescription());
+      try {
+        Thread.sleep(sleepTimeMs);
+      } catch (InterruptedException e) {
+        LOGGER.warn("Got interrupted while checking service status", e);
+        Thread.currentThread().interrupt();
+        break;
       }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org