diff options
author | Allison Easton <allison.easton@mongodb.com> | 2022-11-09 10:21:04 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-11-09 11:09:45 +0000 |
commit | 1ccd927d11fc604fdba9112e7f53e781128b6d64 (patch) | |
tree | a5a13c95c510c82faf709dac483d453f4e213039 /src/mongo/s | |
parent | 8df8f09e875bd73da87b8425680756f381be3857 (diff) | |
download | mongo-1ccd927d11fc604fdba9112e7f53e781128b6d64.tar.gz |
SERVER-70654 Add a warning when using find during moveChunk for a hashed shard key
Diffstat (limited to 'src/mongo/s')
-rw-r--r-- | src/mongo/s/commands/cluster_move_chunk_cmd.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/s/commands/cluster_move_chunk_cmd.cpp b/src/mongo/s/commands/cluster_move_chunk_cmd.cpp index 1f97441ed1e..8c56bfea1f9 100644 --- a/src/mongo/s/commands/cluster_move_chunk_cmd.cpp +++ b/src/mongo/s/commands/cluster_move_chunk_cmd.cpp @@ -152,6 +152,11 @@ public: str::stream() << "no shard key found in chunk query " << *find, !shardKey.isEmpty()); + if (find && chunkManager.getShardKeyPattern().isHashedPattern()) { + LOGV2_WARNING(7065400, + "bounds should be used instead of query for hashed shard keys"); + } + chunk.emplace(chunkManager.findIntersectingChunkWithSimpleCollation(shardKey)); } else { |