Skip to content

Commit

Permalink
add JVM option bootstrap_safety_check_grace_period_minutes (#596)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhuffy authored Dec 9, 2024
1 parent b1249b3 commit 8cf1eb0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/java/org/apache/cassandra/service/StorageService.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
private static final boolean DISABLE_WAIT_TO_BOOTSTRAP = Boolean.getBoolean("palantir_cassandra.disable_wait_to_bootstrap");
private static final boolean DISABLE_WAIT_TO_FINISH_BOOTSTRAP = Boolean.getBoolean("palantir_cassandra.disable_wait_to_finish_bootstrap");
private static final Integer BOOTSTRAP_DISK_USAGE_THRESHOLD = Integer.getInteger("palantir_cassandra.bootstrap_disk_usage_threshold_percentage");
private static final Integer BOOTSTRAP_SAFETY_CHECK_GRACE_PERIOD_MINUTES = Integer.getInteger("palantir_cassandra.bootstrap_safety_check_grace_period_minutes", 30);

public static final int RING_DELAY = getRingDelay(); // delay after which we assume ring has stablized

Expand Down Expand Up @@ -1053,7 +1054,7 @@ private void joinTokenRing(int delay, boolean autoBootstrap, Collection<String>
try
{
setMode(Mode.WAITING_TO_FINISH_BOOTSTRAP, "Awaiting finish bootstrap call", true);
boolean timeoutExceeded = !finishBootstrapCondition.await(30, MINUTES);
boolean timeoutExceeded = !finishBootstrapCondition.await(BOOTSTRAP_SAFETY_CHECK_GRACE_PERIOD_MINUTES, MINUTES);
if (timeoutExceeded)
{
recordNonTransientError(NonTransientError.BOOTSTRAP_ERROR, ImmutableMap.of("bootstrapSafetyCheckFailed", "true"));
Expand Down

0 comments on commit 8cf1eb0

Please sign in to comment.