summaryrefslogtreecommitdiff
path: root/buildscripts/smoke.py
diff options
context:
space:
mode:
authorScott Hernandez <scotthernandez@gmail.com>2014-02-28 13:50:55 -0500
committerScott Hernandez <scotthernandez@gmail.com>2014-02-28 13:53:03 -0500
commitb2b0dd358bce9d76faba794f5a3ee82e177060fe (patch)
tree27994bb8d8bc10b3b157c0cfbbf56c295a7fc6b7 /buildscripts/smoke.py
parent466ede2ed20cc5abcae3d48b56d78a0eb6e96966 (diff)
downloadmongo-b2b0dd358bce9d76faba794f5a3ee82e177060fe.tar.gz
smoke.py dbhash oplog printing
Diffstat (limited to 'buildscripts/smoke.py')
-rwxr-xr-xbuildscripts/smoke.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/buildscripts/smoke.py b/buildscripts/smoke.py
index b1bee40a1b8..f985d501eef 100755
--- a/buildscripts/smoke.py
+++ b/buildscripts/smoke.py
@@ -352,16 +352,20 @@ def check_db_hashes(master, slave):
stats = {'hashes': {'master': mhash, 'slave': shash},
'counts':{'master': mCount, 'slave': sCount}}
try:
- stats["docs"] = {'master':list(mTestDB[coll].find(limit=10)),
- 'slave':list(sTestDB[coll].find(limit=10))}
+ stats["docs"] = {'master':list(mTestDB[coll].find(limit=10).sort("$natural", -1)),
+ 'slave':list(sTestDB[coll].find(limit=10).sort("$natural", -1))}
except Exception, e:
stats["error-docs"] = e;
screwy_in_slave[coll] = stats
if mhash == "no _id _index":
- msg = "collection with no _id index:" + \
- " %s -- slave has these indexes: %s"
- print msg % (coll, sTestDB[coll].index_information())
+ mOplog = mTestDB.connection.local["oplog.$main"];
+ oplog_entries = list(mOplog.find({"$or": [{"ns":mTestDB[coll].full_name}, \
+ {"op":"c"}]}).sort("$natural", 1))
+ print "oplog for %s" % mTestDB[coll].full_name
+ for doc in oplog_entries:
+ pprint.pprint(doc, width=200)
+
for db in slave.dict.keys():
if db not in master.dict: