Skip to content

Commit d65fd89

Browse files
lriuui0x0Evergreen Agent
authored andcommitted
SERVER-61597 Use deterministic order for random_moveChunk_timeseries_inserts.js
(cherry picked from commit 5c186eb)
1 parent 3d22412 commit d65fd89

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jstests/concurrency/fsm_workloads/random_moveChunk_timeseries_inserts.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ var $config = extendWorkload($config, function($config, $super) {
124124
jsTestLog("NumBuckets " + numBuckets + ", numDocs on sharded cluster" +
125125
db[collName].find().itcount() + "numDocs on unsharded collection " +
126126
db[this.nonShardCollName].find({}).itcount());
127-
const pipeline = [{$project: {_id: "$_id", m: "$m", t: "$t"}}, {$sort: {m: 1, t: 1}}];
127+
const pipeline =
128+
[{$project: {_id: "$_id", m: "$m", t: "$t"}}, {$sort: {m: 1, t: 1, _id: 1}}];
128129
const diff = DataConsistencyChecker.getDiff(db[collName].aggregate(pipeline),
129130
db[this.nonShardCollName].aggregate(pipeline));
130131
assertAlways.eq(
@@ -177,6 +178,7 @@ var $config = extendWorkload($config, function($config, $super) {
177178
assert.commandWorked(db[this.nonShardCollName].createIndex({m: 1}));
178179
assert.commandWorked(db[collName].createIndex({m: 1, t: 1}));
179180
assert.commandWorked(db[this.nonShardCollName].createIndex({m: 1, t: 1}));
181+
assert.commandWorked(db[this.nonShardCollName].createIndex({m: 1, t: 1, _id: 1}));
180182

181183
const bulk = db[collName].initializeUnorderedBulkOp();
182184
const bulkUnsharded = db[this.nonShardCollName].initializeUnorderedBulkOp();

0 commit comments

Comments
 (0)