From 4b96db94125b5e0ca1da0c91f09a5fca8c94d9ab Mon Sep 17 00:00:00 2001 From: Luke Chen Date: Thu, 2 Jul 2020 16:32:34 +1000 Subject: Import wiredtiger: 95e4b38eebbb4050b2144341c5f60e5a2f5c40b9 from branch mongodb-4.4 ref: 5d5d26e79d..95e4b38eeb for: 4.4.0-rc12 WT-6453 Pin transaction ids for history store cursor operations WT-6465 Update config to avoid rollback error in Python tests WT-6480 Fix a bug where files without block modification information were repeatedly copied at each incremental backup WT-6487 Force pages to split in the case of lots of small updates on a page --- src/third_party/wiredtiger/import.data | 2 +- .../wiredtiger/src/cursor/cur_backup_incr.c | 45 ++++-- src/third_party/wiredtiger/src/history/hs.c | 9 +- src/third_party/wiredtiger/src/include/cursor.h | 18 +-- src/third_party/wiredtiger/src/include/reconcile.i | 18 +++ src/third_party/wiredtiger/src/meta/meta_ckpt.c | 3 +- .../wiredtiger/test/csuite/incr_backup/main.c | 17 +-- .../wiredtiger/test/suite/test_backup16.py | 154 +++++++++++++++++++++ src/third_party/wiredtiger/test/suite/test_hs07.py | 3 +- .../wiredtiger/test/suite/test_prepare08.py | 2 +- .../wiredtiger/test/suite/test_prepare10.py | 2 +- .../wiredtiger/test/suite/test_prepare_hs01.py | 2 +- 12 files changed, 232 insertions(+), 43 deletions(-) create mode 100644 src/third_party/wiredtiger/test/suite/test_backup16.py diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 2fd697956fd..20bc3f560d7 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-4.4", - "commit": "5d5d26e79db5244a5fc748346e0e578aed306be1" + "commit": "95e4b38eebbb4050b2144341c5f60e5a2f5c40b9" } diff --git a/src/third_party/wiredtiger/src/cursor/cur_backup_incr.c b/src/third_party/wiredtiger/src/cursor/cur_backup_incr.c index e3ac1eb723e..f30bd1c4d3b 100644 --- a/src/third_party/wiredtiger/src/cursor/cur_backup_incr.c +++ b/src/third_party/wiredtiger/src/cursor/cur_backup_incr.c @@ -31,6 +31,7 @@ __wt_backup_load_incr( static int __curbackup_incr_blkmod(WT_SESSION_IMPL *session, WT_BTREE *btree, WT_CURSOR_BACKUP *cb) { + WT_CKPT ckpt; WT_CONFIG blkconf; WT_CONFIG_ITEM b, k, v; WT_DECL_RET; @@ -41,7 +42,15 @@ __curbackup_incr_blkmod(WT_SESSION_IMPL *session, WT_BTREE *btree, WT_CURSOR_BAC WT_ASSERT(session, cb->incr_src != NULL); WT_RET(__wt_metadata_search(session, btree->dhandle->name, &config)); + /* Check if this is a file with no checkpointed content. */ + ret = __wt_meta_checkpoint(session, btree->dhandle->name, 0, &ckpt); + if (ret == 0 && ckpt.addr.size == 0) + F_SET(cb, WT_CURBACKUP_CKPT_FAKE); + __wt_meta_checkpoint_free(session, &ckpt); + WT_ERR(__wt_config_getones(session, config, "checkpoint_backup_info", &v)); + if (v.len) + F_SET(cb, WT_CURBACKUP_HAS_CB_INFO); __wt_config_subinit(session, &blkconf, &v); while ((ret = __wt_config_next(&blkconf, &k, &v)) == 0) { /* @@ -65,12 +74,13 @@ __curbackup_incr_blkmod(WT_SESSION_IMPL *session, WT_BTREE *btree, WT_CURSOR_BAC /* * We found a match. Load the block information into the cursor. */ - ret = __wt_config_subgets(session, &v, "blocks", &b); - if (ret != WT_NOTFOUND) { + if ((ret = __wt_config_subgets(session, &v, "blocks", &b)) == 0) { WT_ERR(__wt_backup_load_incr(session, &b, &cb->bitstring, cb->nbits)); cb->bit_offset = 0; - cb->incr_init = true; + F_SET(cb, WT_CURBACKUP_INCR_INIT); } + WT_ERR_NOTFOUND_OK(ret, false); + break; } WT_ERR_NOTFOUND_OK(ret, false); @@ -101,7 +111,8 @@ __curbackup_incr_next(WT_CURSOR *cursor) CURSOR_API_CALL(cursor, session, get_value, btree); F_CLR(cursor, WT_CURSTD_RAW); - if (!cb->incr_init && (btree == NULL || F_ISSET(cb, WT_CURBACKUP_FORCE_FULL))) { + if (!F_ISSET(cb, WT_CURBACKUP_INCR_INIT) && + (btree == NULL || F_ISSET(cb, WT_CURBACKUP_FORCE_FULL))) { /* * We don't have this object's incremental information or it's a forced file copy. If this * is a log file, use the full pathname that may include the log path. @@ -121,10 +132,10 @@ __curbackup_incr_next(WT_CURSOR *cursor) * By setting this to true, the next call will detect we're done in the code for the * incremental cursor below and return WT_NOTFOUND. */ - cb->incr_init = true; + F_SET(cb, WT_CURBACKUP_INCR_INIT); __wt_cursor_set_key(cursor, 0, size, WT_BACKUP_FILE); } else { - if (cb->incr_init) { + if (F_ISSET(cb, WT_CURBACKUP_INCR_INIT)) { /* Look for the next chunk that had modifications. */ while (cb->bit_offset < cb->nbits) if (__bit_test(cb->bitstring.mem, cb->bit_offset)) @@ -144,14 +155,24 @@ __curbackup_incr_next(WT_CURSOR *cursor) */ WT_ERR(__curbackup_incr_blkmod(session, btree, cb)); /* - * If there is no block modification information for this file, this is a newly created - * file without any checkpoint information. Return the whole file information. + * There are three cases where we do not have block modification information for + * the file. They are described and handled as follows: + * + * 1. Newly created file without checkpoint information. Return the whole file + * information. + * 2. File created and checkpointed before incremental backups were configured. + * Return no file information as it was copied in the initial full backup. + * 3. File that has not been modified since the previous incremental backup. + * Return no file information as there is no new information. */ if (cb->bitstring.mem == NULL) { - WT_ERR(__wt_fs_size(session, cb->incr_file, &size)); - cb->incr_init = true; - __wt_cursor_set_key(cursor, 0, size, WT_BACKUP_FILE); - goto done; + F_SET(cb, WT_CURBACKUP_INCR_INIT); + if (F_ISSET(cb, WT_CURBACKUP_CKPT_FAKE) && F_ISSET(cb, WT_CURBACKUP_HAS_CB_INFO)) { + WT_ERR(__wt_fs_size(session, cb->incr_file, &size)); + __wt_cursor_set_key(cursor, 0, size, WT_BACKUP_FILE); + goto done; + } + WT_ERR(WT_NOTFOUND); } } __wt_cursor_set_key(cursor, cb->offset + cb->granularity * cb->bit_offset++, diff --git a/src/third_party/wiredtiger/src/history/hs.c b/src/third_party/wiredtiger/src/history/hs.c index e7cd883aaf2..cb93b42e56a 100644 --- a/src/third_party/wiredtiger/src/history/hs.c +++ b/src/third_party/wiredtiger/src/history/hs.c @@ -222,10 +222,6 @@ __wt_hs_cursor_open(WT_SESSION_IMPL *session) session, ret = __wt_open_cursor(session, WT_HS_URI, NULL, open_cursor_cfg, &cursor)); WT_RET(ret); - /* - * Set the flag to stop creating snapshots for history store cursors - */ - F_SET((WT_CURSOR_BTREE *)cursor, WT_CBT_NO_TXN); /* History store cursors should always ignore tombstones. */ F_SET(cursor, WT_CURSTD_IGNORE_TOMBSTONE); @@ -1526,7 +1522,7 @@ __hs_fixup_out_of_order_from_pos(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, const WT_ITEM *key, wt_timestamp_t ts, uint64_t *counter, const WT_ITEM *srch_key) { WT_CURSOR *insert_cursor; - WT_CURSOR_BTREE *hs_cbt, *insert_cbt; + WT_CURSOR_BTREE *hs_cbt; WT_DECL_RET; WT_HS_TIME_POINT start_time_point, stop_time_point; WT_ITEM hs_key; @@ -1540,7 +1536,6 @@ __hs_fixup_out_of_order_from_pos(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, insert_cursor = NULL; hs_cbt = (WT_CURSOR_BTREE *)hs_cursor; - insert_cbt = NULL; WT_CLEAR(hs_key); tombstone = NULL; @@ -1626,8 +1621,6 @@ __hs_fixup_out_of_order_from_pos(WT_SESSION_IMPL *session, WT_CURSOR *hs_cursor, WT_WITHOUT_DHANDLE(session, ret = __wt_open_cursor(session, WT_HS_URI, NULL, open_cursor_cfg, &insert_cursor)); WT_ERR(ret); - insert_cbt = (WT_CURSOR_BTREE *)insert_cursor; - F_SET(insert_cbt, WT_CBT_NO_TXN); } /* diff --git a/src/third_party/wiredtiger/src/include/cursor.h b/src/third_party/wiredtiger/src/include/cursor.h index dfcc4f7888f..be3672f1ac5 100644 --- a/src/third_party/wiredtiger/src/include/cursor.h +++ b/src/third_party/wiredtiger/src/include/cursor.h @@ -54,7 +54,6 @@ struct __wt_cursor_backup { WT_CURSOR *incr_cursor; /* File cursor */ - bool incr_init; /* Cursor traversal initialized */ WT_ITEM bitstring; /* List of modified blocks */ uint64_t nbits; /* Number of bits in bitstring */ uint64_t offset; /* Zero bit offset in bitstring */ @@ -62,13 +61,16 @@ struct __wt_cursor_backup { uint64_t granularity; /* Length, transfer size */ /* AUTOMATIC FLAG VALUE GENERATION START */ -#define WT_CURBACKUP_DUP 0x01u /* Duplicated backup cursor */ -#define WT_CURBACKUP_FORCE_FULL 0x02u /* Force full file copy for this cursor */ -#define WT_CURBACKUP_FORCE_STOP 0x04u /* Force stop incremental backup */ -#define WT_CURBACKUP_INCR 0x08u /* Incremental backup cursor */ -#define WT_CURBACKUP_LOCKER 0x10u /* Hot-backup started */ - /* AUTOMATIC FLAG VALUE GENERATION STOP */ - uint8_t flags; +#define WT_CURBACKUP_CKPT_FAKE 0x01u /* Object has fake checkpoint */ +#define WT_CURBACKUP_DUP 0x02u /* Duplicated backup cursor */ +#define WT_CURBACKUP_FORCE_FULL 0x04u /* Force full file copy for this cursor */ +#define WT_CURBACKUP_FORCE_STOP 0x08u /* Force stop incremental backup */ +#define WT_CURBACKUP_HAS_CB_INFO 0x10u /* Object has checkpoint backup info */ +#define WT_CURBACKUP_INCR 0x20u /* Incremental backup cursor */ +#define WT_CURBACKUP_INCR_INIT 0x40u /* Cursor traversal initialized */ +#define WT_CURBACKUP_LOCKER 0x80u /* Hot-backup started */ + /* AUTOMATIC FLAG VALUE GENERATION STOP */ + uint32_t flags; }; /* Get the WT_BTREE from any WT_CURSOR/WT_CURSOR_BTREE. */ diff --git a/src/third_party/wiredtiger/src/include/reconcile.i b/src/third_party/wiredtiger/src/include/reconcile.i index 449fac897de..6e2839311b9 100644 --- a/src/third_party/wiredtiger/src/include/reconcile.i +++ b/src/third_party/wiredtiger/src/include/reconcile.i @@ -197,6 +197,24 @@ __rec_page_time_stats(WT_SESSION_IMPL *session, WT_RECONCILE *r) static inline bool __wt_rec_need_split(WT_RECONCILE *r, size_t len) { + uint32_t page_items; + + page_items = r->entries + r->supd_next; + + /* + * In the case of a row-store leaf page, we want to encourage a split if we see lots of + * in-memory content. This allows pages to be split for update/restore and history store + * eviction even when the disk image itself isn't growing. + * + * Make sure that there are a reasonable number of items (entries on the disk image or saved + * updates) associated with the page. If there are barely any items on the page, then it's not + * worth splitting. We also want to temper this effect to avoid in-memory updates from + * dominating the calculation and causing excessive splitting. Therefore, we'll limit the impact + * to a tenth of the cache usage occupied by those updates. + */ + if (r->page->type == WT_PAGE_ROW_LEAF && page_items > 10) + len += r->supd_memsize / 10; + /* Check for the disk image crossing a boundary. */ return (WT_CHECK_CROSSING_BND(r, len)); } diff --git a/src/third_party/wiredtiger/src/meta/meta_ckpt.c b/src/third_party/wiredtiger/src/meta/meta_ckpt.c index 97474d992ec..a5373dabccc 100644 --- a/src/third_party/wiredtiger/src/meta/meta_ckpt.c +++ b/src/third_party/wiredtiger/src/meta/meta_ckpt.c @@ -408,8 +408,7 @@ __ckpt_valid_blk_mods(WT_SESSION_IMPL *session, WT_CKPT *ckpt) * - Our entry's id string matches the current global information. We just want to add our * information to the existing list. * - Our entry's id string does not match the current one. It is outdated. Free old - * resources - * and then set up our entry. + * resources and then set up our entry. */ /* Check if the global entry is valid at our index. */ diff --git a/src/third_party/wiredtiger/test/csuite/incr_backup/main.c b/src/third_party/wiredtiger/test/csuite/incr_backup/main.c index fee64ff683a..e260081b78c 100644 --- a/src/third_party/wiredtiger/test/csuite/incr_backup/main.c +++ b/src/third_party/wiredtiger/test/csuite/incr_backup/main.c @@ -221,7 +221,7 @@ active_files_print(ACTIVE_FILES *active, const char *msg) { uint32_t i; - VERBOSE(6, "Active files: %s, %d entries\n", msg, (int)active->count); + VERBOSE(6, "Active files: %s, %" PRIu32 " entries\n", msg, active->count); for (i = 0; i < active->count; i++) VERBOSE(6, " %s\n", active->names[i]); } @@ -357,7 +357,7 @@ table_changes(WT_SESSION *session, TABLE *table) value = dcalloc(1, table->max_value_size); value2 = dcalloc(1, table->max_value_size); nrecords = __wt_random(&table->rand) % 1000; - VERBOSE(4, "changing %d records in %s\n", (int)nrecords, table->name); + VERBOSE(4, "changing %" PRIu32 " records in %s\n", nrecords, table->name); testutil_check(session->open_cursor(session, table->name, NULL, NULL, &cur)); for (i = 0; i < nrecords; i++) { change_count = table->change_count++; @@ -504,8 +504,8 @@ base_backup(WT_CONNECTION *conn, WT_RAND_STATE *rand, const char *home, const ch granularity += 1; } testutil_check(__wt_snprintf(buf, sizeof(buf), - "incremental=(granularity=%" PRIu32 "%c,enabled=true,this_id=ID%d)", granularity, - granularity_unit, (int)tinfo->full_backup_number)); + "incremental=(granularity=%" PRIu32 "%c,enabled=true,this_id=ID%" PRIu32 ")", granularity, + granularity_unit, tinfo->full_backup_number)); VERBOSE(3, "open_cursor(session, \"backup:\", NULL, \"%s\", &cursor)\n", buf); testutil_check(session->open_cursor(session, "backup:", NULL, buf, &cursor)); @@ -568,8 +568,9 @@ incr_backup(WT_CONNECTION *conn, const char *home, const char *backup_home, TABL active_files_init(&active); testutil_check(conn->open_session(conn, NULL, NULL, &session)); - testutil_check(__wt_snprintf(buf, sizeof(buf), "incremental=(src_id=ID%d,this_id=ID%d)", - (int)tinfo->full_backup_number, (int)tinfo->incr_backup_number++)); + testutil_check( + __wt_snprintf(buf, sizeof(buf), "incremental=(src_id=ID%" PRIu32 ",this_id=ID%" PRIu32 ")", + tinfo->full_backup_number, tinfo->incr_backup_number++)); VERBOSE(3, "open_cursor(session, \"backup:\", NULL, \"%s\", &cursor)\n", buf); testutil_check(session->open_cursor(session, "backup:", NULL, buf, &cursor)); @@ -789,7 +790,7 @@ main(int argc, char *argv[]) testutil_work_dir_from_path(home, sizeof(home), working_dir); testutil_check(__wt_snprintf(backup_dir, sizeof(backup_dir), "%s.BACKUP", home)); testutil_check(__wt_snprintf(backup_check, sizeof(backup_check), "%s.CHECK", home)); - fprintf(stderr, "Seed: %" PRIu64 "\n", seed); + printf("Seed: %" PRIu64 "\n", seed); testutil_check( __wt_snprintf(command, sizeof(command), "rm -rf %s %s; mkdir %s", home, backup_dir, home)); @@ -840,7 +841,7 @@ main(int argc, char *argv[]) next_checkpoint = __wt_random(&rnd) % tinfo.table_count; for (iter = 0; iter < ITERATIONS; iter++) { - VERBOSE(1, "**** iteration %d ****\n", (int)iter); + VERBOSE(1, "**** iteration %" PRIu32 " ****\n", iter); /* * We have schema changes during about half the iterations. The number of schema changes diff --git a/src/third_party/wiredtiger/test/suite/test_backup16.py b/src/third_party/wiredtiger/test/suite/test_backup16.py new file mode 100644 index 00000000000..49c30d08dad --- /dev/null +++ b/src/third_party/wiredtiger/test/suite/test_backup16.py @@ -0,0 +1,154 @@ +#!/usr/bin/env python +# +# Public Domain 2014-2020 MongoDB, Inc. +# Public Domain 2008-2014 WiredTiger, Inc. +# +# This is free and unencumbered software released into the public domain. +# +# Anyone is free to copy, modify, publish, use, compile, sell, or +# distribute this software, either in source code form or as a compiled +# binary, for any purpose, commercial or non-commercial, and by any +# means. +# +# In jurisdictions that recognize copyright laws, the author or authors +# of this software dedicate any and all copyright interest in the +# software to the public domain. We make this dedication for the benefit +# of the public at large and to the detriment of our heirs and +# successors. We intend this dedication to be an overt act of +# relinquishment in perpetuity of all present and future rights to this +# software under copyright law. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +import wiredtiger, wttest +import os, shutil +from helper import compare_files +from suite_subprocess import suite_subprocess +from wtdataset import simple_key +from wtscenario import make_scenarios + +# test_backup16.py +# Ensure incremental backup doesn't copy unnecessary files. +class test_backup16(wttest.WiredTigerTestCase, suite_subprocess): + + conn_config='cache_size=1G,log=(enabled,file_max=100K)' + counter=1 + logmax='100K' + mult=1 + nops=10 + uri1='table:test1' + uri2='table:test2' + uri3='table:test3' + uri4='table:test4' + uri5='table:test5' + + pfx = 'test_backup' + # Set the key and value big enough that we modify a few blocks. + bigkey = 'Key' * 10 + bigval = 'Value' * 10 + + def add_data(self, uri): + + c = self.session.open_cursor(uri) + for i in range(0, self.nops): + num = i + (self.mult * self.nops) + key = self.bigkey + str(num) + val = self.bigval + str(num) + c[key] = val + self.session.checkpoint() + c.close() + # Increase the multiplier so that later calls insert unique items. + self.mult += 1 + + def verify_incr_backup(self, expected_file_list): + + bkup_config = ('incremental=(src_id="ID' + str(self.counter-1) + + '",this_id="ID' + str(self.counter) + '")') + bkup_cur = self.session.open_cursor('backup:', None, bkup_config) + self.counter += 1 + num_files = 0 + + # Verify the files included in the incremental backup are the ones we expect. + while True: + ret = bkup_cur.next() + if ret != 0: + break + + bkup_file = bkup_cur.get_key() + if bkup_file.startswith('WiredTiger'): + continue + + incr_config = 'incremental=(file=' + bkup_file + ')' + incr_cur = self.session.open_cursor(None, bkup_cur, incr_config) + + while True: + ret = incr_cur.next() + if ret != 0: + break + + # Check this file is one we are expecting. + self.assertTrue(bkup_file in expected_file_list) + num_files += 1 + + # Ensure that the file we changed has content to copy and the file we didn't + # change doesn't have any content to copy. + # Note: + # Pretty sure this is the file size and not the number of bytes to copy. + incr_list = incr_cur.get_keys() + self.assertNotEqual(incr_list[1], 0) + + self.assertEqual(ret, wiredtiger.WT_NOTFOUND) + incr_cur.close() + self.assertEqual(ret, wiredtiger.WT_NOTFOUND) + bkup_cur.close() + + # Ensure that the backup saw all the expected files. + self.assertEqual(num_files, len(expected_file_list)) + + def test_backup16(self): + + self.session.create(self.uri1, 'key_format=S,value_format=S') + self.session.create(self.uri2, 'key_format=S,value_format=S') + self.session.create(self.uri3, 'key_format=S,value_format=S') + self.add_data(self.uri1) + self.add_data(self.uri2) + + # Checkpoint and simulate full backup. + self.session.checkpoint() + config = 'incremental=(enabled,granularity=1M,this_id="ID0")' + cursor = self.session.open_cursor('backup:', None, config) + cursor.close() + + # Create new tables, add more data and checkpoint. + self.session.create(self.uri4, "key_format=S,value_format=S") + self.session.create(self.uri5, "key_format=S,value_format=S") + self.add_data(self.uri1) + self.add_data(self.uri5) + self.session.checkpoint() + + # Validate these three files are included in the incremental. + files_to_backup = ['test1.wt', 'test4.wt', 'test5.wt'] + self.verify_incr_backup(files_to_backup) + + # Add more data and checkpoint. + self.add_data(self.uri3) + self.add_data(self.uri5) + self.session.checkpoint() + + # Validate these three files are included in the incremental. + files_to_backup = ['test3.wt', 'test4.wt', 'test5.wt'] + self.verify_incr_backup(files_to_backup) + + # Perform one more incremental without changing anything. We should only + # see one file. + files_to_backup = ['test4.wt'] + self.verify_incr_backup(files_to_backup) + +if __name__ == '__main__': + wttest.run() diff --git a/src/third_party/wiredtiger/test/suite/test_hs07.py b/src/third_party/wiredtiger/test/suite/test_hs07.py index 98bca0ab7ba..14ad15c3281 100644 --- a/src/third_party/wiredtiger/test/suite/test_hs07.py +++ b/src/third_party/wiredtiger/test/suite/test_hs07.py @@ -38,7 +38,8 @@ def timestamp_str(t): # Test that the history store sweep cleans the obsolete history store entries and gives expected results. class test_hs07(wttest.WiredTigerTestCase): # Force a small cache. - conn_config = 'cache_size=50MB,log=(enabled)' + conn_config = ('cache_size=50MB,eviction_updates_trigger=95,' + 'eviction_updates_target=80,log=(enabled)') session_config = 'isolation=snapshot' def large_updates(self, uri, value, ds, nrows, commit_ts): diff --git a/src/third_party/wiredtiger/test/suite/test_prepare08.py b/src/third_party/wiredtiger/test/suite/test_prepare08.py index f3eb9d12881..d257cda112c 100644 --- a/src/third_party/wiredtiger/test/suite/test_prepare08.py +++ b/src/third_party/wiredtiger/test/suite/test_prepare08.py @@ -39,7 +39,7 @@ def timestamp_str(t): # to the data store. class test_prepare08(wttest.WiredTigerTestCase): # Force a small cache. - conn_config = 'cache_size=2MB' + conn_config = 'cache_size=2MB,eviction_updates_trigger=95,eviction_updates_target=80' def updates(self, ds, uri, nrows, value, ts): cursor = self.session.open_cursor(uri) diff --git a/src/third_party/wiredtiger/test/suite/test_prepare10.py b/src/third_party/wiredtiger/test/suite/test_prepare10.py index ba1a29718ed..1d7da8196bf 100644 --- a/src/third_party/wiredtiger/test/suite/test_prepare10.py +++ b/src/third_party/wiredtiger/test/suite/test_prepare10.py @@ -39,7 +39,7 @@ def timestamp_str(t): # to the data store. class test_prepare10(wttest.WiredTigerTestCase): # Force a small cache. - conn_config = 'cache_size=2MB' + conn_config = 'cache_size=2MB,eviction_updates_trigger=95,eviction_updates_target=80' session_config = 'isolation=snapshot' def updates(self, ds, uri, nrows, value, ts): diff --git a/src/third_party/wiredtiger/test/suite/test_prepare_hs01.py b/src/third_party/wiredtiger/test/suite/test_prepare_hs01.py index 494193e3da4..b6a2732a01e 100644 --- a/src/third_party/wiredtiger/test/suite/test_prepare_hs01.py +++ b/src/third_party/wiredtiger/test/suite/test_prepare_hs01.py @@ -37,7 +37,7 @@ def timestamp_str(t): # test to ensure history store eviction is working for prepared transactions. class test_prepare_hs01(wttest.WiredTigerTestCase): # Force a small cache. - conn_config = 'cache_size=50MB' + conn_config = 'cache_size=50MB,eviction_updates_trigger=95,eviction_updates_target=80' def check(self, uri, ds, nrows, nsessions, nkeys, read_ts, expected_value, not_expected_value): cursor = self.session.open_cursor(uri) -- cgit v1.2.1