summaryrefslogtreecommitdiff
path: root/jstests/concurrency/fsm_workloads
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-18 22:25:43 +0000
commit5c186ebcd37f16e9acca78e4d9d3a1436b9da61d (patch)
tree42e277e8e8d37ba29b02b4a65359f386cfffcbb5 /jstests/concurrency/fsm_workloads
parent343011972f8ef4ce0918cffbd15266354ef42524 (diff)
downloadmongo-5c186ebcd37f16e9acca78e4d9d3a1436b9da61d.tar.gz
SERVER-61597 Use deterministic order for random_moveChunk_timeseries_inserts.js
Diffstat (limited to 'jstests/concurrency/fsm_workloads')
-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 6f5bbb68d05..3665466fb89 100644
--- a/jstests/concurrency/fsm_workloads/random_moveChunk_timeseries_inserts.js
+++ b/jstests/concurrency/fsm_workloads/random_moveChunk_timeseries_inserts.js
@@ -123,7 +123,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(
@@ -175,6 +176,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();