Skip to content

Commit

Permalink
Fix call
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbar01234 committed Oct 25, 2024
1 parent 290adf3 commit 62b4e8e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/java/org/apache/cassandra/locator/TokenMetadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -968,14 +968,14 @@ private PendingRangeMaps calculatePendingRanges(AbstractReplicationStrategy stra
{
Collection<Token> tokens = bootstrapAddresses.get(endpoint);
allLeftMetadata.updateNormalTokens(tokens, endpoint);
Collection<Range<Token>> addressRangesForEndpoint = strategy.getAddressRanges(allLeftMetadata).get(endpoint);
for (Range<Token> range : addressRangesForEndpoint)
Collection<Range<Token>> tokenRangeForEndpoint = strategy.getAddressRanges(allLeftMetadata).get(endpoint);
for (Range<Token> range : tokenRangeForEndpoint)
{
newPendingRanges.addPendingRange(range, endpoint);
}
allLeftMetadata.removeEndpoint(endpoint);

logBootstrapDifference(endpoint, addressRangesSnapshot, addressRangesForEndpoint);
logBootstrapDifference(strategy.keyspaceName, endpoint, addressRangesSnapshot, tokenRangeForEndpoint);
}

// At this stage newPendingRanges has been updated according to leaving and bootstrapping nodes.
Expand Down Expand Up @@ -1385,16 +1385,16 @@ private void logLeavingEndpointDifference(String keyspace, Set<InetAddress> leav
}
}

private void logBootstrapDifference(String keyspace, InetAddress endpoint, Multimap<Range<Token>, InetAddress> snapshot, Collection<Range<Token>> newTokenRanges)
private void logBootstrapDifference(String keyspace, InetAddress endpoint, Multimap<Range<Token>, InetAddress> snapshot, Collection<Range<Token>> tokenRangeForEndpoint)
{
if (shouldLogTokenChanges)
{
logger.info("Pending ranges for bootstrapping endpoint",
SafeArg.of("keyspace", keyspace),
SafeArg.of("bootstrapingEndpoint", endpoint),
SafeArg.of("previousOwners", MapUtils.intersection(snapshot, newTokenRanges)),
SafeArg.of("pendingRangeCount", newTokenRanges.size()));
logger.debug("Pending range for endpoint", newTokenRanges);
SafeArg.of("previousOwners", MapUtils.intersection(snapshot, tokenRangeForEndpoint)),
SafeArg.of("pendingRangeCount", tokenRangeForEndpoint.size()));
logger.debug("Pending range for endpoint", SafeArg.of("pendingRange", tokenRangeForEndpoint));
}
}

Expand Down

0 comments on commit 62b4e8e

Please sign in to comment.