Skip to content

Commit

Permalink
Return inferTokenOwnership as soon as a mismatch is there.
Browse files Browse the repository at this point in the history
  • Loading branch information
arunagrawal84 committed Jul 10, 2020
1 parent a25e6ef commit 2881978
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static InferredTokenOwnership inferTokenOwnerFromGossip(
if (matchedGossipInstances == noOfInstancesGossipShouldMatch) {
inferredTokenOwnership.setTokenInformationStatus(
InferredTokenOwnership.TokenInformationStatus.GOOD);
break;
return inferredTokenOwnership;
}
} else {
// Mismatch in the gossip information from Cassandra.
Expand All @@ -92,7 +92,7 @@ public static InferredTokenOwnership inferTokenOwnerFromGossip(
inferredTokenOwnership.getTokenInformation().isLive
? inferredTokenOwnership.getTokenInformation()
: tokenInformation);
break;
return inferredTokenOwnership;
}

} catch (GossipParseException e) {
Expand Down

0 comments on commit 2881978

Please sign in to comment.