summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2012-09-26 11:54:36 +1000
committerMichael Cahill <michael.cahill@wiredtiger.com>2012-09-26 11:54:36 +1000
commita12b4b89277a71bc8cee0b4c828f25d4c071efb9 (patch)
tree5c14e5b5a5316de66ebaf5f54c8ba3e540ff6bae /test
parentad66a9457f66c550d36c0d6d96b40720f389563f (diff)
downloadmongo-a12b4b89277a71bc8cee0b4c828f25d4c071efb9.tar.gz
Abort transactions if the cache is so full that they cannot make progress.
This allows WiredTiger to work in caches where the number of pages is small enough that an old snapshot could block itself from evicting in order to read new pages.
Diffstat (limited to 'test')
-rw-r--r--test/format/wts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/format/wts.c b/test/format/wts.c
index 9211ce8d84e..a2ca65d8e60 100644
--- a/test/format/wts.c
+++ b/test/format/wts.c
@@ -82,8 +82,8 @@ wts_open(void)
if (maxintlitem < 40)
maxintlitem = 40;
maxleafpage = 1U << g.c_leaf_page_max;
- /* Make sure at least 4 leaf page per thread can fit in cache. */
- while (4 * g.c_threads * (maxintlpage + maxleafpage) > g.c_cache << 20)
+ /* Make sure at least one leaf page per thread can fit in cache. */
+ while (g.c_threads * (maxintlpage + maxleafpage) > g.c_cache << 20)
maxleafpage >>= 1;
maxleafitem = MMRAND(maxleafpage / 50, maxleafpage / 40);
if (maxleafitem < 40)