Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Guo committed Dec 13, 2024
1 parent 30e3d9d commit dd385f9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/java/org/apache/cassandra/service/StorageService.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -1602,13 +1603,16 @@ private boolean bootstrap(final Collection<Token> tokens)
ListenableFuture<StreamState> 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;
}
Expand Down

0 comments on commit dd385f9

Please sign in to comment.