diff options
author | Rui Liu <rui.liu@mongodb.com> | 2021-11-18 16:59:21 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-11-20 12:55:25 +0000 |
commit | a9eb8c3bb3673c2a39cfb047a501771358591809 (patch) | |
tree | 238d3e921b5f0202e1ef24bd312466e684488c6d | |
parent | d0a2c4c526a3a4d9bc0501a3f07300375c5b1c4d (diff) | |
download | mongo-a9eb8c3bb3673c2a39cfb047a501771358591809.tar.gz |
SERVER-61597 Use deterministic order for random_moveChunk_timeseries_inserts.jsr5.1.1-rc0r5.1.1
(cherry picked from commit 5c186ebcd37f16e9acca78e4d9d3a1436b9da61d)
-rw-r--r-- | jstests/concurrency/fsm_workloads/random_moveChunk_timeseries_inserts.js | 4 |
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 d2fb1ae0794..ab283c2a1df 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(); |