Details
-
Bug
-
Resolution: Duplicate
-
Major - P3
-
None
-
None
-
ALL
Description
getShardIdsForRange currently hardcodes isMaxInclusive to true and that causes mongos to target both of the shards in the following case.
const st = ShardingTest({shards: 2});
|
|
|
assert.commandWorked(st.s.adminCommand({enableSharding: "foo"}));
|
st.ensurePrimaryShard("foo", st.shard0.shardName);
|
|
|
assert.commandWorked(st.s.adminCommand({shardCollection: "foo.bar", key: {_id: 1}}));
|
assert.commandWorked(st.s.adminCommand({split: "foo.bar", middle: {_id: 10}}));
|
assert.commandWorked(st.s.adminCommand({moveChunk: "foo.bar", find: {_id: 10}, to: st.shard1.shardName, _waitForDelete: true}));
|
|
|
assert.commandWorked(st.s.getDB("foo").runCommand({find: "bar", filter: {_id: {$lt: 10}}}));
|
st.stop();
|
Attachments
Issue Links
- duplicates
-
SERVER-20768 Mongos find query including upper bound X of a chunk also targets the shard with chunk having lower bound = X
-
- Backlog
-