Skip to content

Commit

Permalink
Add isBucketValid method in ShardCalculator
Browse files Browse the repository at this point in the history
  • Loading branch information
Satyam Saxena committed May 2, 2024
1 parent a964f69 commit a2ed001
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ public int shardId(T key) {
return shardManager.shardForBucket(bucketId);
}

public boolean isBucketValid(int bucketId) {
return shardManager.isMappedToValidShard(bucketId);
}

public boolean isOnValidShard(T key) {
int bucketId = extractor.bucketId(key);
return shardManager.isMappedToValidShard(bucketId);
return isBucketValid(bucketId);
}
}

0 comments on commit a2ed001

Please sign in to comment.