summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2018-12-11 21:42:52 -0500
committerBenety Goh <benety@mongodb.com>2018-12-11 21:42:52 -0500
commit5d6b6ca762641a02813b784acf790cb3ff509e55 (patch)
tree6bb3e4387ebbcec8d7f16a7c4c89df549f4ec126
parentc0b48bee20c8383f08902d2bd338010e95312fa6 (diff)
downloadmongo-5d6b6ca762641a02813b784acf790cb3ff509e55.tar.gz
SERVER-38498 decrease number of updates in rollback_wt_cache_full.js
-rw-r--r--jstests/noPassthrough/rollback_wt_cache_full.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/jstests/noPassthrough/rollback_wt_cache_full.js b/jstests/noPassthrough/rollback_wt_cache_full.js
index 01415f018f9..6b6e7a79661 100644
--- a/jstests/noPassthrough/rollback_wt_cache_full.js
+++ b/jstests/noPassthrough/rollback_wt_cache_full.js
@@ -33,10 +33,16 @@
// This test uses single updates, rather than the multiple updates in the other wt_cache_full.js
// tests because the refetching logic in the pre-4.0 algorithm depends on which documents were
// modified, not on the number of modifications to each document.
+ // This test has been observed to hang under some non-standard build platforms so we are
+ // giving ourselves a slightly larger allowance of 5 documents from the theoretical maximum
+ // of documents calculated from the rollback size limit.
+ // Using a numDocs value of (maxDocs - 5) is sufficiently large enough to reproduce the memory
+ // pressure issue in 3.6.5 but small enough for this test to perform uniformly across most of
+ // the platforms in our continuous integration system.
const rollbackSizeLimitMB = 300;
const minDocSizeMB = 10;
const largeString = 'x'.repeat(minDocSizeMB * 1024 * 1024);
- const numDocs = Math.floor(rollbackSizeLimitMB / minDocSizeMB) - 1;
+ const numDocs = Math.floor(rollbackSizeLimitMB / minDocSizeMB) - 5;
// Operations that will be present on both nodes, before the common point.
const collName = 'test.t';