summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Liu <rui.liu@mongodb.com>2021-11-18 16:59:21 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-11-20 12:56:43 +0000
commitd65fd89df3fc039b5c55933c0f71d647a54510ae (patch)
treecc1d79a7dbc7e135b23f6c200fc0bc57de624c08
parent3d22412e0eed75c96771a849d4e98e3309f458f0 (diff)
downloadmongo-r5.0.5-rc0.tar.gz
SERVER-61597 Use deterministic order for random_moveChunk_timeseries_inserts.jsr5.0.5-rc0r5.0.5
(cherry picked from commit 5c186ebcd37f16e9acca78e4d9d3a1436b9da61d)
-rw-r--r--jstests/concurrency/fsm_workloads/random_moveChunk_timeseries_inserts.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/jstests/concurrency/fsm_workloads/random_moveChunk_timeseries_inserts.js b/jstests/concurrency/fsm_workloads/random_moveChunk_timeseries_inserts.js
index 1392a5aed25..a79688720a7 100644
--- a/jstests/concurrency/fsm_workloads/random_moveChunk_timeseries_inserts.js
+++ b/jstests/concurrency/fsm_workloads/random_moveChunk_timeseries_inserts.js
@@ -124,7 +124,8 @@ var $config = extendWorkload($config, function($config, $super) {
jsTestLog("NumBuckets " + numBuckets + ", numDocs on sharded cluster" +
db[collName].find().itcount() + "numDocs on unsharded collection " +
db[this.nonShardCollName].find({}).itcount());
- const pipeline = [{$project: {_id: "$_id", m: "$m", t: "$t"}}, {$sort: {m: 1, t: 1}}];
+ const pipeline =
+ [{$project: {_id: "$_id", m: "$m", t: "$t"}}, {$sort: {m: 1, t: 1, _id: 1}}];
const diff = DataConsistencyChecker.getDiff(db[collName].aggregate(pipeline),
db[this.nonShardCollName].aggregate(pipeline));
assertAlways.eq(
@@ -177,6 +178,7 @@ var $config = extendWorkload($config, function($config, $super) {
assert.commandWorked(db[this.nonShardCollName].createIndex({m: 1}));
assert.commandWorked(db[collName].createIndex({m: 1, t: 1}));
assert.commandWorked(db[this.nonShardCollName].createIndex({m: 1, t: 1}));
+ assert.commandWorked(db[this.nonShardCollName].createIndex({m: 1, t: 1, _id: 1}));
const bulk = db[collName].initializeUnorderedBulkOp();
const bulkUnsharded = db[this.nonShardCollName].initializeUnorderedBulkOp();