Skip to content

Commit

Permalink
Merge pull request #287 from pinterest/increase_recovery_timeout
Browse files Browse the repository at this point in the history
Update node recovery check timeout values
  • Loading branch information
yisheng-zhou authored Aug 12, 2024
2 parents bc90bfc + 79fb8c8 commit 8037e24
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public abstract class NodeAction extends Action {

public static final String POSTHEALTHCHECK_INTERVAL = "postHealthcheckInterval";
public static final String RECOVERY_TIMEOUT = "recoveryTimeout";
private static final int DEFAULT_RECOVERY_TIMEOUT_MS = 1800_000; // 30 minutes
private static final int DEFAULT_HEALTHCHECK_INTERVAL_MS = 10_000; // 10 seconds

enum MaintenancePolicy {
NONE,
Expand Down Expand Up @@ -151,8 +153,8 @@ protected void postActionValidation() throws Exception {

public void checkAndWaitForNodeToRecover() throws TimeoutException {
long completeTime = System.currentTimeMillis();
int timeout = 60_000;
int healthCheckInterval = 10_000;
int timeout = DEFAULT_RECOVERY_TIMEOUT_MS;
int healthCheckInterval = DEFAULT_HEALTHCHECK_INTERVAL_MS;
if (containsAttribute(RECOVERY_TIMEOUT)) {
timeout = getAttribute(RECOVERY_TIMEOUT).getValue();
}
Expand Down

0 comments on commit 8037e24

Please sign in to comment.