0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

SERVER-40347 optime.js waits for durable wall clock times to synchronize across replica set nodes

This commit is contained in:
Benety Goh 2019-03-26 19:32:07 -04:00
parent 63f84d788b
commit 6b5cfecb81

View File

@ -68,7 +68,9 @@ replTest.awaitSecondaryNodes();
const isPersistent = master.getDB('admin').serverStatus().storageEngine.persistent;
// Check initial optimes
assert(optimesAndWallTimesAreEqual(replTest, isPersistent));
assert.soon(function() {
return optimesAndWallTimesAreEqual(replTest, isPersistent);
});
var initialInfo = master.getDB('admin').serverStatus({oplog: true}).oplog;
let initialReplStatusInfo = master.getDB('admin').runCommand({replSetGetStatus: 1});
@ -76,7 +78,9 @@ let initialReplStatusInfo = master.getDB('admin').runCommand({replSetGetStatus:
// latestOptime should be updated, but earliestOptime should be unchanged
var options = {writeConcern: {w: replTest.nodes.length}};
assert.writeOK(master.getDB('test').foo.insert({a: 1}, options));
assert(optimesAndWallTimesAreEqual(replTest, isPersistent));
assert.soon(function() {
return optimesAndWallTimesAreEqual(replTest, isPersistent);
});
var info = master.getDB('admin').serverStatus({oplog: true}).oplog;
let replStatusInfo = master.getDB('admin').runCommand({replSetGetStatus: 1});