diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java index 680dcaee7e..8b9fea029f 100644 --- a/src/java/org/apache/cassandra/service/StorageService.java +++ b/src/java/org/apache/cassandra/service/StorageService.java @@ -1543,7 +1543,8 @@ private void setMode(Mode m, boolean log) @VisibleForTesting void setMode(Mode m, @Safe String msg, boolean log) { - if (operationMode == Mode.NON_TRANSIENT_ERROR && m != Mode.NON_TRANSIENT_ERROR) { + if (operationMode == Mode.NON_TRANSIENT_ERROR && m != Mode.NON_TRANSIENT_ERROR) + { logger.warn("Attempted to change mode from NTE to non-NTE", SafeArg.of("attemptedSetMode", m), SafeArg.of("msg", msg)); } operationMode = m; @@ -1602,13 +1603,16 @@ private boolean bootstrap(final Collection tokens) ListenableFuture bootstrapStream = bootstrapper.bootstrap(streamStateStore, !replacing && useStrictConsistency); // handles token update try { - while (true) { - if (bootstrapStream.isDone()) { + while (true) + { + if (bootstrapStream.isDone()) + { bootstrapStream.get(); logger.info("Bootstrap streaming completed for tokens {}", tokens); break; } - if (hasNonTransientError(NonTransientError.BOOTSTRAP_ERROR)) { + if (hasNonTransientError(NonTransientError.BOOTSTRAP_ERROR)) + { logger.info("Stopped waiting for bootstrap streaming to complete because detected a bootstrap error.", SafeArg.of("nonTransientErrors", getNonTransientErrors())); break; }