diff options
author | zixuan.zhuang <zixuan.zhuang@mongodb.com> | 2022-08-22 19:46:27 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-08-22 20:43:33 +0000 |
commit | 534a9f53b21e65da1fe356be0cb9599b88a3037d (patch) | |
tree | 21f00d9767f8e3d46aa10bd95ba27099565cb897 | |
parent | a575a00064790d031d53c56cac4c4c3e7c457389 (diff) | |
download | mongo-534a9f53b21e65da1fe356be0cb9599b88a3037d.tar.gz |
SERVER-69019 Add more log to spill_to_disk_secondary_read.js
-rw-r--r-- | jstests/noPassthrough/spill_to_disk_secondary_read.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/jstests/noPassthrough/spill_to_disk_secondary_read.js b/jstests/noPassthrough/spill_to_disk_secondary_read.js index 242620b987b..b9b09104138 100644 --- a/jstests/noPassthrough/spill_to_disk_secondary_read.js +++ b/jstests/noPassthrough/spill_to_disk_secondary_read.js @@ -16,10 +16,19 @@ const replTest = new ReplSetTest({ replTest.startSet(); replTest.initiate(); +function setLog(db) { + db.setLogLevel(5, 'command'); + db.setLogLevel(5, 'index'); + db.setLogLevel(5, 'query'); + db.setLogLevel(5, 'replication'); + db.setLogLevel(5, 'write'); +} + /** * Setup the primary and secondary collections. */ let primary = replTest.getPrimary(); +setLog(primary.getDB("test")); const insertColl = primary.getDB("test").foo; const cRecords = 50; for (let i = 0; i < cRecords; ++i) { @@ -29,6 +38,7 @@ for (let i = 0; i < cRecords; ++i) { } let secondary = replTest.getSecondary(); +setLog(secondary.getDB("test")); const readColl = secondary.getDB("test").foo; /** @@ -74,7 +84,7 @@ const readColl = secondary.getDB("test").foo; writeConcern: {"w": "majority"} }; const res = readColl.aggregate(pipeline, aggOptions).toArray(); - assert.eq(res.length, cRecords); // the group-by key is unique + assert.eq(res.length, cRecords, res); // the group-by key is unique // In SBE also check the statistics for disk usage. Note: 'explain()' doesn't support the // 'writeConcern' option so we test spilling on the secondary but without using the concern. |