diff options
author | Kristina <kristina@10gen.com> | 2010-12-14 10:09:31 -0500 |
---|---|---|
committer | Kristina <kristina@10gen.com> | 2010-12-14 10:09:43 -0500 |
commit | 1e196fb8518a6ff3c82a25f520ec954de80f8e39 (patch) | |
tree | 3a9add82e924715d2f689ba27cde87d1775742ee /shell | |
parent | 394455bba933af4515ba76113618a2fbf93eb7fc (diff) | |
download | mongo-1e196fb8518a6ff3c82a25f520ec954de80f8e39.tar.gz |
check that latest writes haven't changed in repl tests
Diffstat (limited to 'shell')
-rw-r--r-- | shell/servers.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/shell/servers.js b/shell/servers.js index 614398b105d..34b68e3403b 100644 --- a/shell/servers.js +++ b/shell/servers.js @@ -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)) } |