Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
rhuffy committed Nov 26, 2024
1 parent c577e09 commit d692f30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/java/org/apache/cassandra/dht/BootStrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import org.apache.cassandra.io.util.DataOutputPlus;
import org.apache.cassandra.locator.AbstractReplicationStrategy;
import org.apache.cassandra.locator.TokenMetadata;
import org.apache.cassandra.service.MigrationManager;
import org.apache.cassandra.service.StorageService;
import org.apache.cassandra.streaming.*;
import org.apache.cassandra.utils.progress.ProgressEvent;
Expand Down
13 changes: 3 additions & 10 deletions src/java/org/apache/cassandra/service/StorageService.java
Original file line number Diff line number Diff line change
Expand Up @@ -1121,16 +1121,9 @@ private void joinTokenRing(int delay, boolean autoBootstrap, Collection<String>
private static boolean isSchemaConsistent()
{
String localSchemaVersion = Schema.instance.getVersion().toString();
Set<Entry<InetAddress, EndpointState>> endpointStates = Gossiper.instance.getEndpointStates();
for (Entry<InetAddress, EndpointState> entry : endpointStates)
{
String remoteSchemaVersion = entry.getValue().getApplicationState(ApplicationState.SCHEMA).value;
if (!localSchemaVersion.equals(remoteSchemaVersion))
{
return false;
}
}
return true;
return Gossiper.instance.getEndpointStates().stream()
.map(entry -> entry.getValue().getApplicationState(ApplicationState.SCHEMA).value)
.allMatch(localSchemaVersion::equals);
}

private void joinTokenRing(int delay) throws ConfigurationException
Expand Down

0 comments on commit d692f30

Please sign in to comment.