diff options
author | Pavithra Vetriselvan <pavithra.vetriselvan@mongodb.com> | 2017-10-23 15:21:35 -0400 |
---|---|---|
committer | Pavi Vetriselvan <pvselvan@umich.edu> | 2018-05-17 09:57:17 -0400 |
commit | 70bf355975fba4b5bc7779a4ae59b0039c78e618 (patch) | |
tree | 743244cc1b213b65d897e997a48100bee5d087d5 | |
parent | 629fefcff3276c5665a9237d50032d1bd012393d (diff) | |
download | mongo-70bf355975fba4b5bc7779a4ae59b0039c78e618.tar.gz |
SERVER-31165 added mismatched oplog entries to assert message
(cherry picked from commit 6475f004ad0db96d907e996dd24bad9a2228d3f6)
-rw-r--r-- | src/mongo/shell/replsettest.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mongo/shell/replsettest.js b/src/mongo/shell/replsettest.js index 6162c81f8dc..2516b2f8fac 100644 --- a/src/mongo/shell/replsettest.js +++ b/src/mongo/shell/replsettest.js @@ -1509,9 +1509,11 @@ var ReplSetTest = function(opts) { if (!bsonBinaryEqual(oplogEntry, otherOplogEntry)) { var query = prevOplogEntry ? {ts: {$lte: prevOplogEntry.ts}} : {}; rst.nodes.forEach(node => this.dumpOplog(node, query, 100)); - assert(false, - msgPrefix + ", non-matching oplog entry for nodes: " + - firstReader.mongo.host + " " + readers[i].mongo.host); + var log = msgPrefix + + ", non-matching oplog entries for the following nodes: \n" + + firstReader.mongo.host + ": " + tojsononeline(oplogEntry) + "\n" + + readers[i].mongo.host + ": " + tojsononeline(otherOplogEntry); + assert(false, log); } } prevOplogEntry = oplogEntry; |