diff options
author | Jason Chan <jason.chan@mongodb.com> | 2021-03-29 15:47:04 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-03-30 14:35:45 +0000 |
commit | 1d2ebda7691c9d3e269f3158bf0d10f7135e96e9 (patch) | |
tree | 86d238bf096a3f7e25a5eaacae81ab8559a6259a | |
parent | fbba2c781f6d602769507d1d9d637e98fcf9f76f (diff) | |
download | mongo-1d2ebda7691c9d3e269f3158bf0d10f7135e96e9.tar.gz |
SERVER-55555 Fix race in minvalid.js with PrimaryOnlyService
-rw-r--r-- | jstests/noPassthrough/minvalid.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/jstests/noPassthrough/minvalid.js b/jstests/noPassthrough/minvalid.js index d83d386e18d..0d1b0413425 100644 --- a/jstests/noPassthrough/minvalid.js +++ b/jstests/noPassthrough/minvalid.js @@ -24,8 +24,10 @@ var lastOp = local.oplog.rs.find().sort({$natural: -1}).limit(1).next(); printjson(lastOp); print("3: change minvalid"); +// Set the 'minvalid' to a high enough opTime that it won't conflict with any oplogs written on +// stepUp by any PrimaryOnlyServices. assert.commandWorked(local.replset.minvalid.update( - {}, {$set: {ts: new Timestamp(lastOp.ts.t, lastOp.ts.i + 1)}}, {upsert: true})); + {}, {$set: {ts: new Timestamp(lastOp.ts.t, lastOp.ts.i + 1000)}}, {upsert: true})); printjson(local.replset.minvalid.findOne()); print("4: restart"); |