summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2020-04-02 15:34:24 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-04-24 19:53:43 +0000
commit8d6b0889e6b8b4cdcf4be81b6843d0449a31ef84 (patch)
tree119d7048c0c076fae4998c9c56c9270efb563924 /jstests
parentbd8fdecf83f7de4fd73c0e0e3273865170bd80f9 (diff)
downloadmongo-8d6b0889e6b8b4cdcf4be81b6843d0449a31ef84.tar.gz
SERVER-47260 mongos_get_shard_version.js assumes causal consistency but isn't
(cherry picked from commit 6cd52288da7cfcfb9d7b2b5b850cb0c9e5f75024)
Diffstat (limited to 'jstests')
-rw-r--r--jstests/sharding/mongos_get_shard_version.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/jstests/sharding/mongos_get_shard_version.js b/jstests/sharding/mongos_get_shard_version.js
index 1bc7031d010..3d7518822a1 100644
--- a/jstests/sharding/mongos_get_shard_version.js
+++ b/jstests/sharding/mongos_get_shard_version.js
@@ -64,6 +64,9 @@ const splitPoint = {
y: "A".repeat(512)
};
+// Run splitChunk on the shards directly since the split command for mongos doesn't have an option
+// to specify multiple split points or number of splits.
+
let splitPoints = [];
for (let i = 0; i < 10000; i++) {
splitPoints.push({x: i, y: splitPoint.y});
@@ -93,6 +96,10 @@ assert.commandWorked(st.rs0.getPrimary().getDB('admin').runCommand({
epoch: res.versionEpoch,
}));
+// Perform a read on the config primary to have the mongos get the latest config optime since the
+// last two splits were performed directly on the shards.
+assert.neq(null, st.s.getDB('config').databases.findOne());
+
// Verify that moving a chunk won't trigger mongos's routing entry to get marked as stale until
// a request comes in to target that chunk.
assert.commandWorked(