Skip to content

Commit

Permalink
Update sentinel.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
apolukhin authored Feb 26, 2025
1 parent 384d455 commit e429465
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions redis/src/storages/redis/impl/sentinel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,7 @@ void Sentinel::CheckShardIdx(size_t shard_idx) const { CheckShardIdx(shard_idx,

void Sentinel::CheckShardIdx(size_t shard_idx, size_t shard_count) {
if (shard_idx >= shard_count && shard_idx != ClusterSentinelImpl::kUnknownShard) {
UASSERT_MSG(false, "invalid shard (" + std::to_string(shard_idx) + " >= " + std::to_string(shard_count) + ')');
throw InvalidArgumentException(
"invalid shard (" + std::to_string(shard_idx) + " >= " + std::to_string(shard_count) + ')'
);
utils::impl::AbortWithStacktrace("invalid shard (" + std::to_string(shard_idx) + " >= " + std::to_string(shard_count) + ')');
}
}

Expand Down

0 comments on commit e429465

Please sign in to comment.