mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
check that latest writes haven't changed in repl tests
This commit is contained in:
parent
394455bba9
commit
1e196fb851
@ -1357,6 +1357,11 @@ ReplSetTest.prototype.awaitReplication = function() {
|
||||
printjson( entry );
|
||||
var ts = entry['ts'];
|
||||
print("TS for " + slave + " is " + ts.t+":"+ts.i + " and latest is " + latest.t+":"+latest.i);
|
||||
|
||||
if (latest.t < ts.t || (latest.t == ts.t && latest.i < ts.i)) {
|
||||
latest = this.liveNodes.master.getDB("local")['oplog.rs'].find({}).sort({'$natural': -1}).limit(1).next()['ts'];
|
||||
}
|
||||
|
||||
print("Oplog size for " + slave + " is " + log.count());
|
||||
synced = (synced && friendlyEqual(latest,ts))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user