summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2022-02-15 08:33:52 +1100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-02-14 22:27:59 +0000
commit2bdfdc5a73ec0e93cfde7580b53ed53d1597805b (patch)
tree6cb58c92e6a0149fe8ae1d3688f11cbef8288e12
parent548148edceee7127376b2ba377f8433f036424ec (diff)
downloadmongo-2bdfdc5a73ec0e93cfde7580b53ed53d1597805b.tar.gz
Import wiredtiger: ade1582595da39251d33ea8acd397dbabc4047ad from branch mongodb-master
ref: 316e1eb2b6..ade1582595 for: 5.3.0 Reverted ticket(s): WT-8695 Remove file_close_sync config and disallow single file checkpoint
-rw-r--r--src/third_party/wiredtiger/dist/api_data.py10
-rw-r--r--src/third_party/wiredtiger/examples/c/ex_all.c2
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/src/config/config_def.c76
-rw-r--r--src/third_party/wiredtiger/src/conn/conn_api.c4
-rw-r--r--src/third_party/wiredtiger/src/include/connection.h25
-rw-r--r--src/third_party/wiredtiger/src/include/wiredtiger.in7
-rw-r--r--src/third_party/wiredtiger/src/txn/txn_ckpt.c9
-rw-r--r--src/third_party/wiredtiger/test/csuite/incr_backup/main.c3
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt2323_join_visibility/main.c8
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt3135_search_near_collator/main.c4
-rw-r--r--src/third_party/wiredtiger/test/cursor_order/cursor_order_file.c2
-rw-r--r--src/third_party/wiredtiger/test/format/wts.c6
-rwxr-xr-xsrc/third_party/wiredtiger/test/suite/test_autoclose.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_backup05.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_base04.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_bug001.py8
-rw-r--r--src/third_party/wiredtiger/test/suite/test_bug004.py4
-rw-r--r--src/third_party/wiredtiger/test/suite/test_bug005.py6
-rw-r--r--src/third_party/wiredtiger/test/suite/test_bug006.py10
-rwxr-xr-xsrc/third_party/wiredtiger/test/suite/test_bulk01.py1
-rw-r--r--src/third_party/wiredtiger/test/suite/test_collator.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_config08.py87
-rwxr-xr-xsrc/third_party/wiredtiger/test/suite/test_cursor13.py16
-rw-r--r--src/third_party/wiredtiger/test/suite/test_drop.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_dupc.py4
-rw-r--r--src/third_party/wiredtiger/test/suite/test_durability01.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_import01.py4
-rw-r--r--src/third_party/wiredtiger/test/suite/test_import03.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_import04.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_import06.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_import08.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_import09.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_import10.py2
-rwxr-xr-xsrc/third_party/wiredtiger/test/suite/test_index01.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_index03.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_join01.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_join03.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_join06.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_join07.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_join09.py2
-rwxr-xr-xsrc/third_party/wiredtiger/test/suite/test_lsm02.py4
-rw-r--r--src/third_party/wiredtiger/test/suite/test_lsm03.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_rename.py4
-rwxr-xr-xsrc/third_party/wiredtiger/test/suite/test_salvage.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_schema01.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_schema05.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_schema06.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_sweep03.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_truncate01.py12
-rw-r--r--src/third_party/wiredtiger/test/suite/test_upgrade.py4
-rw-r--r--src/third_party/wiredtiger/test/suite/test_util11.py14
-rwxr-xr-xsrc/third_party/wiredtiger/test/suite/test_verify.py2
-rwxr-xr-xsrc/third_party/wiredtiger/test/suite/wttest.py50
-rw-r--r--src/third_party/wiredtiger/test/thread/file.c6
-rw-r--r--src/third_party/wiredtiger/test/utility/test_util.h24
56 files changed, 248 insertions, 220 deletions
diff --git a/src/third_party/wiredtiger/dist/api_data.py b/src/third_party/wiredtiger/dist/api_data.py
index 42ba9898a0f..52bd05544a3 100644
--- a/src/third_party/wiredtiger/dist/api_data.py
+++ b/src/third_party/wiredtiger/dist/api_data.py
@@ -1217,6 +1217,16 @@ wiredtiger_open_common =\
size and the default config would extend log files in allocations of
the maximum log file size.''',
type='list', choices=['data', 'log']),
+ Config('file_close_sync', 'true', r'''
+ control whether to flush modified files to storage independent
+ of a global checkpoint when closing file handles to acquire exclusive
+ access to a table. If set to false, and logging is disabled, API calls that
+ require exclusive access to tables will return EBUSY if there have been
+ changes made to the table since the last global checkpoint. When logging
+ is enabled, the value for <code>file_close_sync</code> has no effect, and,
+ modified file is always flushed to storage when closing file handles to
+ acquire exclusive access to the table''',
+ type='boolean'),
Config('hash', '', r'''
manage resources around hash bucket arrays. All values must be a power of two.
Note that setting large values can significantly increase memory usage inside
diff --git a/src/third_party/wiredtiger/examples/c/ex_all.c b/src/third_party/wiredtiger/examples/c/ex_all.c
index 4247633cdb6..3dab06fcf32 100644
--- a/src/third_party/wiredtiger/examples/c/ex_all.c
+++ b/src/third_party/wiredtiger/examples/c/ex_all.c
@@ -745,8 +745,6 @@ session_ops(WT_SESSION *session)
}
}
- error_check(session->checkpoint(session, NULL));
-
/*! [Upgrade a table] */
error_check(session->upgrade(session, "table:mytable", NULL));
/*! [Upgrade a table] */
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index a8fb4dd3330..a6a0f2ce9a7 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-master",
- "commit": "316e1eb2b66820822375d8197189a4c6e1fb0424"
+ "commit": "ade1582595da39251d33ea8acd397dbabc4047ad"
}
diff --git a/src/third_party/wiredtiger/src/config/config_def.c b/src/third_party/wiredtiger/src/config/config_def.c
index c143f7578ad..8894ff6cd55 100644
--- a/src/third_party/wiredtiger/src/config/config_def.c
+++ b/src/third_party/wiredtiger/src/config/config_def.c
@@ -864,6 +864,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open[] = {
{"eviction_updates_target", "int", NULL, "min=0,max=10TB", NULL, 0},
{"eviction_updates_trigger", "int", NULL, "min=0,max=10TB", NULL, 0},
{"exclusive", "boolean", NULL, NULL, NULL, 0}, {"extensions", "list", NULL, NULL, NULL, 0},
+ {"file_close_sync", "boolean", NULL, NULL, NULL, 0},
{"file_extend", "list", NULL, "choices=[\"data\",\"log\"]", NULL, 0},
{"file_manager", "category", NULL, NULL, confchk_wiredtiger_open_file_manager_subconfigs, 3},
{"hash", "category", NULL, NULL, confchk_wiredtiger_open_hash_subconfigs, 2},
@@ -946,6 +947,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_all[] = {
{"eviction_updates_target", "int", NULL, "min=0,max=10TB", NULL, 0},
{"eviction_updates_trigger", "int", NULL, "min=0,max=10TB", NULL, 0},
{"exclusive", "boolean", NULL, NULL, NULL, 0}, {"extensions", "list", NULL, NULL, NULL, 0},
+ {"file_close_sync", "boolean", NULL, NULL, NULL, 0},
{"file_extend", "list", NULL, "choices=[\"data\",\"log\"]", NULL, 0},
{"file_manager", "category", NULL, NULL, confchk_wiredtiger_open_file_manager_subconfigs, 3},
{"hash", "category", NULL, NULL, confchk_wiredtiger_open_hash_subconfigs, 2},
@@ -1026,7 +1028,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_basecfg[] = {
{"eviction_trigger", "int", NULL, "min=10,max=10TB", NULL, 0},
{"eviction_updates_target", "int", NULL, "min=0,max=10TB", NULL, 0},
{"eviction_updates_trigger", "int", NULL, "min=0,max=10TB", NULL, 0},
- {"extensions", "list", NULL, NULL, NULL, 0},
+ {"extensions", "list", NULL, NULL, NULL, 0}, {"file_close_sync", "boolean", NULL, NULL, NULL, 0},
{"file_extend", "list", NULL, "choices=[\"data\",\"log\"]", NULL, 0},
{"file_manager", "category", NULL, NULL, confchk_wiredtiger_open_file_manager_subconfigs, 3},
{"hash", "category", NULL, NULL, confchk_wiredtiger_open_hash_subconfigs, 2},
@@ -1104,7 +1106,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_usercfg[] = {
{"eviction_trigger", "int", NULL, "min=10,max=10TB", NULL, 0},
{"eviction_updates_target", "int", NULL, "min=0,max=10TB", NULL, 0},
{"eviction_updates_trigger", "int", NULL, "min=0,max=10TB", NULL, 0},
- {"extensions", "list", NULL, NULL, NULL, 0},
+ {"extensions", "list", NULL, NULL, NULL, 0}, {"file_close_sync", "boolean", NULL, NULL, NULL, 0},
{"file_extend", "list", NULL, "choices=[\"data\",\"log\"]", NULL, 0},
{"file_manager", "category", NULL, NULL, confchk_wiredtiger_open_file_manager_subconfigs, 3},
{"hash", "category", NULL, NULL, confchk_wiredtiger_open_hash_subconfigs, 2},
@@ -1472,7 +1474,7 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator",
",eviction_checkpoint_target=1,eviction_dirty_target=5,"
"eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95"
",eviction_updates_target=0,eviction_updates_trigger=0,"
- "exclusive=false,extensions=,file_extend=,"
+ "exclusive=false,extensions=,file_close_sync=true,file_extend=,"
"file_manager=(close_handle_minimum=250,close_idle_time=30,"
"close_scan_interval=10),hash=(buckets=512,dhandle_buckets=512),"
"hazard_max=1000,history_store=(file_max=0),in_memory=false,"
@@ -1493,7 +1495,7 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator",
"transaction_sync=(enabled=false,method=fsync),"
"use_environment=true,use_environment_priv=false,verbose=[],"
"verify_metadata=false,write_through=",
- confchk_wiredtiger_open, 58},
+ confchk_wiredtiger_open, 59},
{"wiredtiger_open_all",
"block_cache=(blkcache_eviction_aggression=1800,"
"cache_on_checkpoint=true,cache_on_writes=true,enabled=false,"
@@ -1512,7 +1514,7 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator",
",eviction_checkpoint_target=1,eviction_dirty_target=5,"
"eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95"
",eviction_updates_target=0,eviction_updates_trigger=0,"
- "exclusive=false,extensions=,file_extend=,"
+ "exclusive=false,extensions=,file_close_sync=true,file_extend=,"
"file_manager=(close_handle_minimum=250,close_idle_time=30,"
"close_scan_interval=10),hash=(buckets=512,dhandle_buckets=512),"
"hazard_max=1000,history_store=(file_max=0),in_memory=false,"
@@ -1533,7 +1535,7 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator",
"transaction_sync=(enabled=false,method=fsync),"
"use_environment=true,use_environment_priv=false,verbose=[],"
"verify_metadata=false,version=(major=0,minor=0),write_through=",
- confchk_wiredtiger_open_all, 59},
+ confchk_wiredtiger_open_all, 60},
{"wiredtiger_open_basecfg",
"block_cache=(blkcache_eviction_aggression=1800,"
"cache_on_checkpoint=true,cache_on_writes=true,enabled=false,"
@@ -1552,26 +1554,27 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator",
"eviction_checkpoint_target=1,eviction_dirty_target=5,"
"eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95"
",eviction_updates_target=0,eviction_updates_trigger=0,"
- "extensions=,file_extend=,file_manager=(close_handle_minimum=250,"
- "close_idle_time=30,close_scan_interval=10),hash=(buckets=512,"
- "dhandle_buckets=512),hazard_max=1000,history_store=(file_max=0),"
- "io_capacity=(total=0),json_output=[],log=(archive=true,"
- "compressor=,enabled=false,file_max=100MB,os_cache_dirty_pct=0,"
- "path=\".\",prealloc=true,recover=on,remove=true,zero_fill=false)"
- ",lsm_manager=(merge=true,worker_thread_max=4),mmap=true,"
- "mmap_all=false,multiprocess=false,operation_timeout_ms=0,"
- "operation_tracking=(enabled=false,path=\".\"),readonly=false,"
- "salvage=false,session_max=100,session_scratch_max=2MB,"
- "session_table_cache=true,shared_cache=(chunk=10MB,name=,quota=0,"
- "reserve=0,size=500MB),statistics=none,statistics_log=(json=false"
- ",on_close=false,path=\".\",sources=,timestamp=\"%b %d %H:%M:%S\""
- ",wait=0),tiered_manager=(threads_max=8,threads_min=1,wait=0),"
+ "extensions=,file_close_sync=true,file_extend=,"
+ "file_manager=(close_handle_minimum=250,close_idle_time=30,"
+ "close_scan_interval=10),hash=(buckets=512,dhandle_buckets=512),"
+ "hazard_max=1000,history_store=(file_max=0),io_capacity=(total=0)"
+ ",json_output=[],log=(archive=true,compressor=,enabled=false,"
+ "file_max=100MB,os_cache_dirty_pct=0,path=\".\",prealloc=true,"
+ "recover=on,remove=true,zero_fill=false),lsm_manager=(merge=true,"
+ "worker_thread_max=4),mmap=true,mmap_all=false,multiprocess=false"
+ ",operation_timeout_ms=0,operation_tracking=(enabled=false,"
+ "path=\".\"),readonly=false,salvage=false,session_max=100,"
+ "session_scratch_max=2MB,session_table_cache=true,"
+ "shared_cache=(chunk=10MB,name=,quota=0,reserve=0,size=500MB),"
+ "statistics=none,statistics_log=(json=false,on_close=false,"
+ "path=\".\",sources=,timestamp=\"%b %d %H:%M:%S\",wait=0),"
+ "tiered_manager=(threads_max=8,threads_min=1,wait=0),"
"tiered_storage=(auth_token=,bucket=,bucket_prefix=,"
"cache_directory=,local_retention=300,name=,"
"object_target_size=10M),timing_stress_for_test=,"
"transaction_sync=(enabled=false,method=fsync),verbose=[],"
"verify_metadata=false,version=(major=0,minor=0),write_through=",
- confchk_wiredtiger_open_basecfg, 53},
+ confchk_wiredtiger_open_basecfg, 54},
{"wiredtiger_open_usercfg",
"block_cache=(blkcache_eviction_aggression=1800,"
"cache_on_checkpoint=true,cache_on_writes=true,enabled=false,"
@@ -1590,26 +1593,27 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator",
"eviction_checkpoint_target=1,eviction_dirty_target=5,"
"eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95"
",eviction_updates_target=0,eviction_updates_trigger=0,"
- "extensions=,file_extend=,file_manager=(close_handle_minimum=250,"
- "close_idle_time=30,close_scan_interval=10),hash=(buckets=512,"
- "dhandle_buckets=512),hazard_max=1000,history_store=(file_max=0),"
- "io_capacity=(total=0),json_output=[],log=(archive=true,"
- "compressor=,enabled=false,file_max=100MB,os_cache_dirty_pct=0,"
- "path=\".\",prealloc=true,recover=on,remove=true,zero_fill=false)"
- ",lsm_manager=(merge=true,worker_thread_max=4),mmap=true,"
- "mmap_all=false,multiprocess=false,operation_timeout_ms=0,"
- "operation_tracking=(enabled=false,path=\".\"),readonly=false,"
- "salvage=false,session_max=100,session_scratch_max=2MB,"
- "session_table_cache=true,shared_cache=(chunk=10MB,name=,quota=0,"
- "reserve=0,size=500MB),statistics=none,statistics_log=(json=false"
- ",on_close=false,path=\".\",sources=,timestamp=\"%b %d %H:%M:%S\""
- ",wait=0),tiered_manager=(threads_max=8,threads_min=1,wait=0),"
+ "extensions=,file_close_sync=true,file_extend=,"
+ "file_manager=(close_handle_minimum=250,close_idle_time=30,"
+ "close_scan_interval=10),hash=(buckets=512,dhandle_buckets=512),"
+ "hazard_max=1000,history_store=(file_max=0),io_capacity=(total=0)"
+ ",json_output=[],log=(archive=true,compressor=,enabled=false,"
+ "file_max=100MB,os_cache_dirty_pct=0,path=\".\",prealloc=true,"
+ "recover=on,remove=true,zero_fill=false),lsm_manager=(merge=true,"
+ "worker_thread_max=4),mmap=true,mmap_all=false,multiprocess=false"
+ ",operation_timeout_ms=0,operation_tracking=(enabled=false,"
+ "path=\".\"),readonly=false,salvage=false,session_max=100,"
+ "session_scratch_max=2MB,session_table_cache=true,"
+ "shared_cache=(chunk=10MB,name=,quota=0,reserve=0,size=500MB),"
+ "statistics=none,statistics_log=(json=false,on_close=false,"
+ "path=\".\",sources=,timestamp=\"%b %d %H:%M:%S\",wait=0),"
+ "tiered_manager=(threads_max=8,threads_min=1,wait=0),"
"tiered_storage=(auth_token=,bucket=,bucket_prefix=,"
"cache_directory=,local_retention=300,name=,"
"object_target_size=10M),timing_stress_for_test=,"
"transaction_sync=(enabled=false,method=fsync),verbose=[],"
"verify_metadata=false,write_through=",
- confchk_wiredtiger_open_usercfg, 52},
+ confchk_wiredtiger_open_usercfg, 53},
{NULL, NULL, NULL, 0}};
int
diff --git a/src/third_party/wiredtiger/src/conn/conn_api.c b/src/third_party/wiredtiger/src/conn/conn_api.c
index 8fd648cae8e..65e9cd3b35e 100644
--- a/src/third_party/wiredtiger/src/conn/conn_api.c
+++ b/src/third_party/wiredtiger/src/conn/conn_api.c
@@ -2839,6 +2839,10 @@ wiredtiger_open(const char *home, WT_EVENT_HANDLER *event_handler, const char *c
if (cval.val)
F_SET(conn, WT_CONN_CKPT_SYNC);
+ WT_ERR(__wt_config_gets(session, cfg, "file_close_sync", &cval));
+ if (cval.val)
+ F_SET(conn, WT_CONN_FILE_CLOSE_SYNC);
+
WT_ERR(__wt_config_gets(session, cfg, "file_extend", &cval));
/*
* If the log extend length is not set use the default of the configured maximum log file size.
diff --git a/src/third_party/wiredtiger/src/include/connection.h b/src/third_party/wiredtiger/src/include/connection.h
index 3d3c191ff7a..f361eb28311 100644
--- a/src/third_party/wiredtiger/src/include/connection.h
+++ b/src/third_party/wiredtiger/src/include/connection.h
@@ -627,18 +627,19 @@ struct __wt_connection_impl {
#define WT_CONN_COMPATIBILITY 0x000100u
#define WT_CONN_DATA_CORRUPTION 0x000200u
#define WT_CONN_EVICTION_RUN 0x000400u
-#define WT_CONN_HS_OPEN 0x000800u
-#define WT_CONN_INCR_BACKUP 0x001000u
-#define WT_CONN_IN_MEMORY 0x002000u
-#define WT_CONN_LEAK_MEMORY 0x004000u
-#define WT_CONN_LSM_MERGE 0x008000u
-#define WT_CONN_OPTRACK 0x010000u
-#define WT_CONN_PANIC 0x020000u
-#define WT_CONN_READONLY 0x040000u
-#define WT_CONN_RECONFIGURING 0x080000u
-#define WT_CONN_RECOVERING 0x100000u
-#define WT_CONN_SALVAGE 0x200000u
-#define WT_CONN_WAS_BACKUP 0x400000u
+#define WT_CONN_FILE_CLOSE_SYNC 0x000800u
+#define WT_CONN_HS_OPEN 0x001000u
+#define WT_CONN_INCR_BACKUP 0x002000u
+#define WT_CONN_IN_MEMORY 0x004000u
+#define WT_CONN_LEAK_MEMORY 0x008000u
+#define WT_CONN_LSM_MERGE 0x010000u
+#define WT_CONN_OPTRACK 0x020000u
+#define WT_CONN_PANIC 0x040000u
+#define WT_CONN_READONLY 0x080000u
+#define WT_CONN_RECONFIGURING 0x100000u
+#define WT_CONN_RECOVERING 0x200000u
+#define WT_CONN_SALVAGE 0x400000u
+#define WT_CONN_WAS_BACKUP 0x800000u
/* AUTOMATIC FLAG VALUE GENERATION STOP 32 */
uint32_t flags;
};
diff --git a/src/third_party/wiredtiger/src/include/wiredtiger.in b/src/third_party/wiredtiger/src/include/wiredtiger.in
index d879c1247b4..2088d7301a4 100644
--- a/src/third_party/wiredtiger/src/include/wiredtiger.in
+++ b/src/third_party/wiredtiger/src/include/wiredtiger.in
@@ -2983,6 +2983,13 @@ struct __wt_connection {
* specified to a library extension are passed to WT_CONNECTION::load_extension as the \c config
* parameter (for example\, <code>extensions=(/path/ext.so={entry=my_entry})</code>)., a list of
* strings; default empty.}
+ * @config{file_close_sync, control whether to flush modified files to storage independent of a
+ * global checkpoint when closing file handles to acquire exclusive access to a table. If set to
+ * false\, and logging is disabled\, API calls that require exclusive access to tables will return
+ * EBUSY if there have been changes made to the table since the last global checkpoint. When
+ * logging is enabled\, the value for <code>file_close_sync</code> has no effect\, and\, modified
+ * file is always flushed to storage when closing file handles to acquire exclusive access to the
+ * table., a boolean flag; default \c true.}
* @config{file_extend, file extension configuration. If set\, extend files of the set type in
* allocations of the set size\, instead of a block at a time as each new block is written. For
* example\, <code>file_extend=(data=16MB)</code>. If set to 0\, disable the file extension for the
diff --git a/src/third_party/wiredtiger/src/txn/txn_ckpt.c b/src/third_party/wiredtiger/src/txn/txn_ckpt.c
index c2504ea2cd6..d36fafda702 100644
--- a/src/third_party/wiredtiger/src/txn/txn_ckpt.c
+++ b/src/third_party/wiredtiger/src/txn/txn_ckpt.c
@@ -2098,10 +2098,13 @@ __wt_checkpoint_close(WT_SESSION_IMPL *session, bool final)
return (__wt_evict_file(session, WT_SYNC_DISCARD));
/*
- * Don't flush data from modified trees independent of system-wide checkpoint. Flushing trees
- * can lead to files that are inconsistent on disk after a crash.
+ * Don't flush data from modified trees independent of system-wide checkpoint when either there
+ * is a stable timestamp set or the connection is configured to disallow such operation.
+ * Flushing trees can lead to files that are inconsistent on disk after a crash.
*/
- if (btree->modified && !bulk && !metadata)
+ if (btree->modified && !bulk && !__wt_btree_immediately_durable(session) &&
+ (S2C(session)->txn_global.has_stable_timestamp ||
+ (!F_ISSET(S2C(session), WT_CONN_FILE_CLOSE_SYNC) && !metadata)))
return (__wt_set_return(session, EBUSY));
/*
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 042c3adc44f..2b5329dc02d 100644
--- a/src/third_party/wiredtiger/test/csuite/incr_backup/main.c
+++ b/src/third_party/wiredtiger/test/csuite/incr_backup/main.c
@@ -473,7 +473,6 @@ rename_table(WT_SESSION *session, TABLE_INFO *tinfo, uint32_t slot)
olduri = tinfo->table[slot].name;
VERBOSE(3, "rename %s %s\n", olduri, uri);
- testutil_check(session->checkpoint(session, NULL));
testutil_check(session->rename(session, olduri, uri, NULL));
free(olduri);
tinfo->table[slot].name = uri;
@@ -492,7 +491,7 @@ drop_table(WT_SESSION *session, TABLE_INFO *tinfo, uint32_t slot)
uri = tinfo->table[slot].name;
VERBOSE(3, "drop %s\n", uri);
- testutil_drop(session, uri, NULL);
+ testutil_check(session->drop(session, uri, NULL));
free(uri);
tinfo->table[slot].name = NULL;
tinfo->table[slot].change_count = 0;
diff --git a/src/third_party/wiredtiger/test/csuite/wt2323_join_visibility/main.c b/src/third_party/wiredtiger/test/csuite/wt2323_join_visibility/main.c
index 7497a73864e..304bb441e87 100644
--- a/src/third_party/wiredtiger/test/csuite/wt2323_join_visibility/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt2323_join_visibility/main.c
@@ -210,10 +210,10 @@ test_join(TEST_OPTS *opts, SHARED_OPTS *sharedopts, bool bloom, bool sometimes_r
insert_args[i].inserts, insert_args[i].removes, insert_args[i].notfounds,
insert_args[i].rollbacks);
- testutil_drop(session, sharedopts->posturi, NULL);
- testutil_drop(session, sharedopts->baluri, NULL);
- testutil_drop(session, sharedopts->flaguri, NULL);
- testutil_drop(session, opts->uri, NULL);
+ testutil_check(session->drop(session, sharedopts->posturi, NULL));
+ testutil_check(session->drop(session, sharedopts->baluri, NULL));
+ testutil_check(session->drop(session, sharedopts->flaguri, NULL));
+ testutil_check(session->drop(session, opts->uri, NULL));
testutil_check(session->close(session, NULL));
}
diff --git a/src/third_party/wiredtiger/test/csuite/wt3135_search_near_collator/main.c b/src/third_party/wiredtiger/test/csuite/wt3135_search_near_collator/main.c
index f0ba1b330c5..841bd27adf6 100644
--- a/src/third_party/wiredtiger/test/csuite/wt3135_search_near_collator/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt3135_search_near_collator/main.c
@@ -327,8 +327,8 @@ test_one_set(WT_SESSION *session, TEST_SET set)
search_using_item(cursor, set, i);
testutil_check(cursor->close(cursor));
- testutil_drop(session, "table:main", NULL);
- testutil_drop(session, "table:main2", NULL);
+ testutil_check(session->drop(session, "table:main", NULL));
+ testutil_check(session->drop(session, "table:main2", NULL));
}
/*
diff --git a/src/third_party/wiredtiger/test/cursor_order/cursor_order_file.c b/src/third_party/wiredtiger/test/cursor_order/cursor_order_file.c
index 690e8029f43..74addeb001a 100644
--- a/src/third_party/wiredtiger/test/cursor_order/cursor_order_file.c
+++ b/src/third_party/wiredtiger/test/cursor_order/cursor_order_file.c
@@ -124,7 +124,7 @@ verify(SHARED_CONFIG *cfg, const char *name)
testutil_check(conn->open_session(conn, NULL, NULL, &session));
- testutil_verify(session, name, NULL);
+ testutil_check(session->verify(session, name, NULL));
testutil_check(session->close(session, NULL));
}
diff --git a/src/third_party/wiredtiger/test/format/wts.c b/src/third_party/wiredtiger/test/format/wts.c
index 5034cb2c4c3..1c4325aac91 100644
--- a/src/third_party/wiredtiger/test/format/wts.c
+++ b/src/third_party/wiredtiger/test/format/wts.c
@@ -540,12 +540,6 @@ wts_verify(TABLE *table, void *arg)
* LSM, the handle may not be available for a long time.
*/
testutil_check(conn->open_session(conn, NULL, NULL, &session));
- /*
- * Do a full checkpoint to reduce the possibility of returning EBUSY from the following verify
- * call.
- */
- ret = session->checkpoint(session, NULL);
- testutil_assert(ret == 0 || ret == EBUSY);
session->app_private = table->track_prefix;
ret = session->verify(session, table->uri, "strict");
testutil_assert(ret == 0 || ret == EBUSY);
diff --git a/src/third_party/wiredtiger/test/suite/test_autoclose.py b/src/third_party/wiredtiger/test/suite/test_autoclose.py
index 7259c29c30f..b934ae8d1fb 100755
--- a/src/third_party/wiredtiger/test/suite/test_autoclose.py
+++ b/src/third_party/wiredtiger/test/suite/test_autoclose.py
@@ -42,7 +42,7 @@ class test_autoclose(wttest.WiredTigerTestCase):
'key_format=S,value_format=S')
def drop_table(self):
- self.dropUntilSuccess(self.session, self.uri)
+ self.session.drop(self.uri, None)
def open_cursor(self):
cursor = self.session.open_cursor(self.uri, None, None)
diff --git a/src/third_party/wiredtiger/test/suite/test_backup05.py b/src/third_party/wiredtiger/test/suite/test_backup05.py
index 69efc3078a0..55803060866 100644
--- a/src/third_party/wiredtiger/test/suite/test_backup05.py
+++ b/src/third_party/wiredtiger/test/suite/test_backup05.py
@@ -112,7 +112,7 @@ class test_backup05(wttest.WiredTigerTestCase, suite_subprocess):
if i % self.freq == 0:
self.check_manual_backup(i, ".", "RESTART")
else:
- self.verifyUntilSuccess(self.session, self.uri)
+ self.session.verify(self.uri)
def test_backup(self):
with self.expectedStdoutPattern('recreating metadata'):
diff --git a/src/third_party/wiredtiger/test/suite/test_base04.py b/src/third_party/wiredtiger/test/suite/test_base04.py
index 6a4790320ba..39a8f24cc47 100644
--- a/src/third_party/wiredtiger/test/suite/test_base04.py
+++ b/src/third_party/wiredtiger/test/suite/test_base04.py
@@ -46,7 +46,7 @@ class test_base04(wttest.WiredTigerTestCase):
def drop_table(self):
self.pr('drop table')
- self.dropUntilSuccess(self.session, self.tablename)
+ self.session.drop(self.tablename, None)
def cursor(self):
self.pr('open cursor')
diff --git a/src/third_party/wiredtiger/test/suite/test_bug001.py b/src/third_party/wiredtiger/test/suite/test_bug001.py
index d780abf24f0..25620d6bd6a 100644
--- a/src/third_party/wiredtiger/test/suite/test_bug001.py
+++ b/src/third_party/wiredtiger/test/suite/test_bug001.py
@@ -74,7 +74,7 @@ class test_bug001(wttest.WiredTigerTestCase):
self.assertEqual(cursor.prev(), 0)
self.assertEquals(cursor.close(), 0)
- self.dropUntilSuccess(self.session, uri)
+ self.session.drop(uri)
cursor = self.create_implicit(uri, 20, 50, 0)
# Check search inside leading implicit keys.
@@ -98,7 +98,7 @@ class test_bug001(wttest.WiredTigerTestCase):
self.assertEqual(cursor.prev(), 0)
self.assertEquals(cursor.close(), 0)
- self.dropUntilSuccess(self.session, uri)
+ self.session.drop(uri)
# Test a bug where cursor remove inside implicit records looped infinitely.
def test_implicit_record_cursor_remove(self):
@@ -124,7 +124,7 @@ class test_bug001(wttest.WiredTigerTestCase):
self.assertEquals(cursor.remove(), 0)
self.assertEquals(cursor.close(), 0)
- self.dropUntilSuccess(self.session, uri)
+ self.session.drop(uri)
cursor = self.create_implicit(uri, 20, 50, 0)
# Check cursor next/remove inside leading implicit keys.
@@ -146,7 +146,7 @@ class test_bug001(wttest.WiredTigerTestCase):
self.assertEquals(cursor.remove(), 0)
self.assertEquals(cursor.close(), 0)
- self.dropUntilSuccess(self.session, uri)
+ self.session.drop(uri)
if __name__ == '__main__':
wttest.run()
diff --git a/src/third_party/wiredtiger/test/suite/test_bug004.py b/src/third_party/wiredtiger/test/suite/test_bug004.py
index 4338846e049..a3cbc7d55ab 100644
--- a/src/third_party/wiredtiger/test/suite/test_bug004.py
+++ b/src/third_party/wiredtiger/test/suite/test_bug004.py
@@ -74,9 +74,9 @@ class test_bug004(wttest.WiredTigerTestCase):
c1.close()
# Verify the object, force it to disk, and verify the on-disk version.
- self.verifyUntilSuccess(self.session, self.uri)
+ self.session.verify(self.uri)
self.reopen_conn()
- self.verifyUntilSuccess(self.session, self.uri)
+ self.session.verify(self.uri)
# Create a new session and start a transaction to force the engine
# to access old versions of the key/value pairs.
diff --git a/src/third_party/wiredtiger/test/suite/test_bug005.py b/src/third_party/wiredtiger/test/suite/test_bug005.py
index 9b7be91be89..662d2f81061 100644
--- a/src/third_party/wiredtiger/test/suite/test_bug005.py
+++ b/src/third_party/wiredtiger/test/suite/test_bug005.py
@@ -51,9 +51,9 @@ class test_bug005(wttest.WiredTigerTestCase):
cursor.close()
# Verify the object, force it to disk, and verify the on-disk version.
- self.verifyUntilSuccess(self.session, self.uri)
+ self.session.verify(self.uri)
self.reopen_conn()
- self.verifyUntilSuccess(self.session, self.uri)
+ self.session.verify(self.uri)
# Append random data to the end.
f = open('test_bug005', 'a')
@@ -61,7 +61,7 @@ class test_bug005(wttest.WiredTigerTestCase):
f.close()
# Verify the object again.
- self.verifyUntilSuccess(self.session, self.uri)
+ self.session.verify(self.uri)
if __name__ == '__main__':
wttest.run()
diff --git a/src/third_party/wiredtiger/test/suite/test_bug006.py b/src/third_party/wiredtiger/test/suite/test_bug006.py
index 835a3caa506..f2aafb5c0ef 100644
--- a/src/third_party/wiredtiger/test/suite/test_bug006.py
+++ b/src/third_party/wiredtiger/test/suite/test_bug006.py
@@ -65,14 +65,14 @@ class test_bug006(wttest.WiredTigerTestCase):
cursor.close()
# Table operations should succeed, the cursor is closed.
- self.renameUntilSuccess(self.session, uri, self.uri + "new")
- self.renameUntilSuccess(self.session, self.uri + "new", uri)
+ self.session.rename(uri, self.uri + "new", None)
+ self.session.rename(self.uri + "new", uri, None)
self.session.salvage(uri, None)
self.session.truncate(uri, None, None, None)
- self.upgradeUntilSuccess(self.session, uri)
- self.verifyUntilSuccess(self.session, uri)
+ self.session.upgrade(uri, None)
+ self.session.verify(uri, None)
- self.dropUntilSuccess(self.session, uri)
+ self.session.drop(uri, None)
if __name__ == '__main__':
wttest.run()
diff --git a/src/third_party/wiredtiger/test/suite/test_bulk01.py b/src/third_party/wiredtiger/test/suite/test_bulk01.py
index 76893efd9ce..7e7473b57f1 100755
--- a/src/third_party/wiredtiger/test/suite/test_bulk01.py
+++ b/src/third_party/wiredtiger/test/suite/test_bulk01.py
@@ -200,7 +200,6 @@ class test_bulk_load(wttest.WiredTigerTestCase):
cursor[simple_key(cursor, 1)] = simple_value(cursor, 1)
# Close the insert cursor, else we'll get EBUSY.
cursor.close()
- self.session.checkpoint()
msg = '/bulk-load is only supported on newly created objects/'
self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
lambda: self.session.open_cursor(uri, None, "bulk"), msg)
diff --git a/src/third_party/wiredtiger/test/suite/test_collator.py b/src/third_party/wiredtiger/test/suite/test_collator.py
index 64c0e9151d3..d884ac47cf7 100644
--- a/src/third_party/wiredtiger/test/suite/test_collator.py
+++ b/src/third_party/wiredtiger/test/suite/test_collator.py
@@ -64,7 +64,7 @@ class test_collator(wttest.WiredTigerTestCase):
def drop_indices(self):
for i in range(0, self.nindices):
- self.dropUntilSuccess(self.session, "index:collator:x" + str(i))
+ self.session.drop("index:collator:x" + str(i))
def csv(self, s, i):
return s.split(',')[i]
diff --git a/src/third_party/wiredtiger/test/suite/test_config08.py b/src/third_party/wiredtiger/test/suite/test_config08.py
new file mode 100644
index 00000000000..cbffae9bf2d
--- /dev/null
+++ b/src/third_party/wiredtiger/test/suite/test_config08.py
@@ -0,0 +1,87 @@
+#!/usr/bin/env python
+#
+# Public Domain 2014-present 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.
+#
+# test_config08.py
+# Test the configuration that enables/disables dirty table flushing.
+#
+
+import wiredtiger, wttest
+from wtscenario import make_scenarios
+
+class test_config08(wttest.WiredTigerTestCase):
+
+ logging = [
+ ('log_off', dict(logging='false')),
+ ('log_on', dict(logging='true')),
+ ]
+ flush = [
+ ('flush_off', dict(flush='false')),
+ ('flush_on', dict(flush='true')),
+ ]
+
+ scenarios = make_scenarios(logging, flush)
+
+ # This test varies the logging and file flush settings and therefore needs to set up its own
+ # connection config. Override the standard method.
+ def conn_config(self):
+ return 'create,log=(enabled={}),file_close_sync={}'.\
+ format(self.logging,self.flush)
+
+ def test_config08(self):
+ # Create a table with logging setting matching the connection level config.
+ table_params = 'key_format=i,value_format=S,log=(enabled={})'.format(self.logging)
+ self.uri = 'table:config_test'
+
+ # Create a table with some data.
+ self.session.create(self.uri, table_params)
+ c = self.session.open_cursor(self.uri, None)
+ c[0] = 'ABC' * 4096
+ c[1] = 'DEF' * 4096
+ c[2] = 'GHI' * 4096
+ c.close()
+
+ # API calls that require exclusive file handles should return EBUSY if file_close_sync is
+ # set to false and logging is disabled.
+ if self.logging == 'false' and self.flush == 'false':
+ # WT won't allow this operation as exclsuive file handle is not possible
+ # with modified table.
+ self.assertTrue(self.raisesBusy(lambda: self.session.verify(self.uri, None)),
+ "was expecting API call to fail with EBUSY")
+
+ # Taking a checkopoint should make WT happy.
+ self.session.checkpoint()
+ self.session.verify(self.uri, None)
+ else:
+ # All other combinations of configs should not return EBUSY.
+ self.session.verify(self.uri, None)
+
+ # This will catch a bug if we return EBUSY from final shutdown.
+ self.conn.close()
+
+if __name__ == '__main__':
+ wttest.run()
diff --git a/src/third_party/wiredtiger/test/suite/test_cursor13.py b/src/third_party/wiredtiger/test/suite/test_cursor13.py
index b3e3a5175df..7651af1808c 100755
--- a/src/third_party/wiredtiger/test/suite/test_cursor13.py
+++ b/src/third_party/wiredtiger/test/suite/test_cursor13.py
@@ -290,7 +290,7 @@ class test_cursor13_reopens(test_cursor13_base):
ds.check()
c.close()
s2 = self.conn.open_session()
- self.verifyUntilSuccess(s2, self.uri)
+ s2.verify(self.uri)
s2.close()
class test_cursor13_drops(test_cursor13_base):
@@ -302,7 +302,7 @@ class test_cursor13_drops(test_cursor13_base):
c.close()
# The cursor cache is unaffected by the drop, and nothing
# in the cache should prevent the drop from occurring.
- self.dropUntilSuccess(drop_session, uri)
+ drop_session.drop(uri)
confirm_does_not_exist(self, uri)
def test_open_and_drop(self):
@@ -332,7 +332,7 @@ class test_cursor13_drops(test_cursor13_base):
self.assertRaises(wiredtiger.WiredTigerError,
lambda: session.drop(uri))
c.close()
- self.dropUntilSuccess(session, uri)
+ session.drop(uri)
confirm_does_not_exist(self, uri)
# Same test for indices, but with cursor held by another session.
@@ -346,7 +346,7 @@ class test_cursor13_drops(test_cursor13_base):
self.assertRaises(wiredtiger.WiredTigerError,
lambda: session.drop(uri))
c.close()
- self.dropUntilSuccess(session, uri)
+ session.drop(uri)
confirm_does_not_exist(self, uri)
session2.close()
@@ -358,7 +358,7 @@ class test_cursor13_drops(test_cursor13_base):
for i in range(0, 2):
session.create(uri, config)
- self.dropUntilSuccess(session, uri)
+ session.drop(uri)
for i in range(0, 2):
session.create(uri, config)
@@ -367,7 +367,7 @@ class test_cursor13_drops(test_cursor13_base):
self.assertRaises(wiredtiger.WiredTigerError,
lambda: session.drop(uri))
cursor.close()
- self.dropUntilSuccess(session, uri)
+ session.drop(uri)
for i in range(0, 2):
session.create(uri, config)
@@ -377,7 +377,7 @@ class test_cursor13_drops(test_cursor13_base):
self.assertRaises(wiredtiger.WiredTigerError,
lambda: session.drop(uri))
cursor.close()
- self.dropUntilSuccess(session, uri)
+ session.drop(uri)
for i in range(0, 2):
session.create(uri, config)
@@ -389,7 +389,7 @@ class test_cursor13_drops(test_cursor13_base):
self.assertRaises(wiredtiger.WiredTigerError,
lambda: session.drop(uri))
cursor.close()
- self.dropUntilSuccess(session, uri)
+ session.drop(uri)
# Shared base class for some bigger tests.
class test_cursor13_big_base(test_cursor13_base):
diff --git a/src/third_party/wiredtiger/test/suite/test_drop.py b/src/third_party/wiredtiger/test/suite/test_drop.py
index e9f0aaea4ea..97ab51d0ad7 100644
--- a/src/third_party/wiredtiger/test/suite/test_drop.py
+++ b/src/third_party/wiredtiger/test/suite/test_drop.py
@@ -63,7 +63,7 @@ class test_drop(wttest.WiredTigerTestCase):
drop_uri = ds.index_name(0)
else:
drop_uri = uri
- self.dropUntilSuccess(self.session, drop_uri)
+ self.session.drop(drop_uri, None)
confirm_does_not_exist(self, drop_uri)
# Test drop of an object.
diff --git a/src/third_party/wiredtiger/test/suite/test_dupc.py b/src/third_party/wiredtiger/test/suite/test_dupc.py
index 890af88c63c..da93a7be298 100644
--- a/src/third_party/wiredtiger/test/suite/test_dupc.py
+++ b/src/third_party/wiredtiger/test/suite/test_dupc.py
@@ -76,7 +76,7 @@ class test_duplicate_cursor(wttest.WiredTigerTestCase):
key_format=self.keyfmt, value_format=self.valfmt)
ds.populate()
self.iterate(uri, ds)
- self.dropUntilSuccess(self.session, uri)
+ self.session.drop(uri, None)
# A complex, multi-file table object.
if self.uri == "table:" and self.valfmt != '8t':
@@ -84,7 +84,7 @@ class test_duplicate_cursor(wttest.WiredTigerTestCase):
key_format=self.keyfmt, value_format=self.valfmt)
ds.populate()
self.iterate(uri, ds)
- self.dropUntilSuccess(self.session, uri)
+ self.session.drop(uri, None)
if __name__ == '__main__':
wttest.run()
diff --git a/src/third_party/wiredtiger/test/suite/test_durability01.py b/src/third_party/wiredtiger/test/suite/test_durability01.py
index c2210576eae..c9226001040 100644
--- a/src/third_party/wiredtiger/test/suite/test_durability01.py
+++ b/src/third_party/wiredtiger/test/suite/test_durability01.py
@@ -70,7 +70,7 @@ class test_durability01(wttest.WiredTigerTestCase, suite_subprocess):
if i % 5 == 0:
self.session.checkpoint()
else:
- self.verifyUntilSuccess(self.session, self.uri)
+ self.session.verify(self.uri)
self.check_crash_restart(".", "RESTART")
if __name__ == '__main__':
diff --git a/src/third_party/wiredtiger/test/suite/test_import01.py b/src/third_party/wiredtiger/test/suite/test_import01.py
index 79a6e45a8e2..aebcaacef5c 100644
--- a/src/third_party/wiredtiger/test/suite/test_import01.py
+++ b/src/third_party/wiredtiger/test/suite/test_import01.py
@@ -169,7 +169,7 @@ class test_import01(test_import_base):
self.session.create(self.uri, import_config)
# Verify object.
- self.verifyUntilSuccess(self.session, self.uri, None)
+ self.session.verify(self.uri)
# Check that the previously inserted values survived the import.
self.check(self.uri, self.keys[:max_idx], self.values[:max_idx])
@@ -232,7 +232,7 @@ class test_import01(test_import_base):
self.session.create(self.uri, import_config)
# Verify object.
- self.verifyUntilSuccess(self.session, self.uri, None)
+ self.session.verify(self.uri)
# Check that the previously inserted values survived the import.
self.check(self.uri, self.keys, self.values)
diff --git a/src/third_party/wiredtiger/test/suite/test_import03.py b/src/third_party/wiredtiger/test/suite/test_import03.py
index 73e0d67debb..564db864558 100644
--- a/src/third_party/wiredtiger/test/suite/test_import03.py
+++ b/src/third_party/wiredtiger/test/suite/test_import03.py
@@ -128,7 +128,7 @@ class test_import03(test_import_base):
self.session.create(uri, import_config)
# Verify object.
- self.verifyUntilSuccess(self.session, uri, None)
+ self.session.verify(uri)
# Check that the previously inserted values survived the import.
self.check(uri, keys[:max_idx], values[:max_idx])
diff --git a/src/third_party/wiredtiger/test/suite/test_import04.py b/src/third_party/wiredtiger/test/suite/test_import04.py
index f2ff1626f28..23f1a1ab379 100644
--- a/src/third_party/wiredtiger/test/suite/test_import04.py
+++ b/src/third_party/wiredtiger/test/suite/test_import04.py
@@ -191,7 +191,7 @@ class test_import04(test_import_base):
self.session.create(uri, import_config)
# Verify object.
- self.verifyUntilSuccess(self.session, uri, None)
+ self.session.verify(uri)
# Check that the previously inserted values survived the import.
self.check(uri, keys[:max_idx], values[:max_idx])
diff --git a/src/third_party/wiredtiger/test/suite/test_import06.py b/src/third_party/wiredtiger/test/suite/test_import06.py
index f56c7a218d0..0046f8e0c8c 100644
--- a/src/third_party/wiredtiger/test/suite/test_import06.py
+++ b/src/third_party/wiredtiger/test/suite/test_import06.py
@@ -143,7 +143,7 @@ class test_import06(test_import_base):
self.session.create(self.uri, import_config)
# Verify object.
- self.verifyUntilSuccess(self.session, self.uri, None)
+ self.session.verify(self.uri)
# Check that the previously inserted values survived the import.
self.check(self.uri, self.keys[:max_idx], self.values[:max_idx])
diff --git a/src/third_party/wiredtiger/test/suite/test_import08.py b/src/third_party/wiredtiger/test/suite/test_import08.py
index bfa06bfc184..c6eb6a7da4a 100644
--- a/src/third_party/wiredtiger/test/suite/test_import08.py
+++ b/src/third_party/wiredtiger/test/suite/test_import08.py
@@ -142,7 +142,7 @@ class test_import08(test_import_base):
self.session.create(self.uri, import_config)
# Verify object.
- self.verifyUntilSuccess(self.session, self.uri, None)
+ self.session.verify(self.uri)
# Check the write generation of the new table.
#
diff --git a/src/third_party/wiredtiger/test/suite/test_import09.py b/src/third_party/wiredtiger/test/suite/test_import09.py
index e5ba1be8e0f..603708aada8 100644
--- a/src/third_party/wiredtiger/test/suite/test_import09.py
+++ b/src/third_party/wiredtiger/test/suite/test_import09.py
@@ -169,7 +169,7 @@ class test_import09(test_import_base):
self.session.create(uri, import_config)
# Verify object.
- self.verifyUntilSuccess(self.session, uri, None)
+ self.session.verify(uri)
# Check that the previously inserted values survived the import.
self.check(uri, keys[:max_idx], values[:max_idx])
diff --git a/src/third_party/wiredtiger/test/suite/test_import10.py b/src/third_party/wiredtiger/test/suite/test_import10.py
index 1b46d989f85..7715a2754ad 100644
--- a/src/third_party/wiredtiger/test/suite/test_import10.py
+++ b/src/third_party/wiredtiger/test/suite/test_import10.py
@@ -78,7 +78,7 @@ class test_import10(backup_base):
self.session.create(table_uri, import_config)
# Verify object.
- self.verifyUntilSuccess(self.session, table_uri)
+ self.session.verify(table_uri)
# Check that the data got imported correctly.
cursor = self.session.open_cursor(table_uri)
diff --git a/src/third_party/wiredtiger/test/suite/test_index01.py b/src/third_party/wiredtiger/test/suite/test_index01.py
index 9d3b1f63338..037e623b881 100755
--- a/src/third_party/wiredtiger/test/suite/test_index01.py
+++ b/src/third_party/wiredtiger/test/suite/test_index01.py
@@ -52,7 +52,7 @@ class test_index01(wttest.WiredTigerTestCase):
def drop_table(self):
self.pr('drop table')
- self.dropUntilSuccess(self.session, self.tablename)
+ self.session.drop(self.tablename, None)
def cursor(self, config=None):
self.pr('open cursor')
diff --git a/src/third_party/wiredtiger/test/suite/test_index03.py b/src/third_party/wiredtiger/test/suite/test_index03.py
index 7cdf41b33bf..c619a7fa6f6 100644
--- a/src/third_party/wiredtiger/test/suite/test_index03.py
+++ b/src/third_party/wiredtiger/test/suite/test_index03.py
@@ -65,7 +65,7 @@ class test_index03(wttest.WiredTigerTestCase):
self.assertRaises(wiredtiger.WiredTigerError,
lambda: session.drop(index2_uri))
c1.close()
- self.dropUntilSuccess(session, index2_uri)
+ session.drop(index2_uri)
if __name__ == '__main__':
wttest.run()
diff --git a/src/third_party/wiredtiger/test/suite/test_join01.py b/src/third_party/wiredtiger/test/suite/test_join01.py
index cabb8a23f1a..1449b679247 100644
--- a/src/third_party/wiredtiger/test/suite/test_join01.py
+++ b/src/third_party/wiredtiger/test/suite/test_join01.py
@@ -335,7 +335,7 @@ class test_join01(wttest.WiredTigerTestCase):
nest2.close()
for c in closeme:
c.close()
- self.dropUntilSuccess(self.session, 'table:join01')
+ self.session.drop('table:join01')
if __name__ == '__main__':
wttest.run()
diff --git a/src/third_party/wiredtiger/test/suite/test_join03.py b/src/third_party/wiredtiger/test/suite/test_join03.py
index 9d96306c39a..0eff3f26dba 100644
--- a/src/third_party/wiredtiger/test/suite/test_join03.py
+++ b/src/third_party/wiredtiger/test/suite/test_join03.py
@@ -118,7 +118,7 @@ class test_join03(wttest.WiredTigerTestCase):
c1a.close()
c1b.close()
c0.close()
- self.dropUntilSuccess(self.session, 'table:join03')
+ self.session.drop('table:join03')
# Test joins using CSV fields that are interpreted as different types
# to make sure all the extractor plumbing used in joins is working.
diff --git a/src/third_party/wiredtiger/test/suite/test_join06.py b/src/third_party/wiredtiger/test/suite/test_join06.py
index 811079ecfd8..e6e5dd81506 100644
--- a/src/third_party/wiredtiger/test/suite/test_join06.py
+++ b/src/third_party/wiredtiger/test/suite/test_join06.py
@@ -152,7 +152,7 @@ class test_join06(wttest.WiredTigerTestCase):
c0.close()
if self.isolation != '':
self.session.commit_transaction()
- self.dropUntilSuccess(self.session, 'table:join06')
+ self.session.drop('table:join06')
if __name__ == '__main__':
wttest.run()
diff --git a/src/third_party/wiredtiger/test/suite/test_join07.py b/src/third_party/wiredtiger/test/suite/test_join07.py
index 5eff0250d26..b51113dfe34 100644
--- a/src/third_party/wiredtiger/test/suite/test_join07.py
+++ b/src/third_party/wiredtiger/test/suite/test_join07.py
@@ -496,7 +496,7 @@ class test_join07(wttest.WiredTigerTestCase):
self.iterate(jc, mbr)
self.close_cursors(jc)
- self.dropUntilSuccess(self.session, 'table:join07')
+ self.session.drop('table:join07')
def test_join_string(self):
self.interpret("[N=1000][key=r] 7 < A <= 500 && B < 150 && C > 17")
diff --git a/src/third_party/wiredtiger/test/suite/test_join09.py b/src/third_party/wiredtiger/test/suite/test_join09.py
index 9405acba1d7..2fedd0c99ed 100644
--- a/src/third_party/wiredtiger/test/suite/test_join09.py
+++ b/src/third_party/wiredtiger/test/suite/test_join09.py
@@ -108,7 +108,7 @@ class test_join09(wttest.WiredTigerTestCase):
jc.close()
c1.close()
c0.close()
- self.dropUntilSuccess(self.session, 'table:join09')
+ self.session.drop('table:join09')
if __name__ == '__main__':
wttest.run()
diff --git a/src/third_party/wiredtiger/test/suite/test_lsm02.py b/src/third_party/wiredtiger/test/suite/test_lsm02.py
index deaa94e3038..6a9b62331f2 100755
--- a/src/third_party/wiredtiger/test/suite/test_lsm02.py
+++ b/src/third_party/wiredtiger/test/suite/test_lsm02.py
@@ -62,13 +62,13 @@ class test_lsm02(wttest.WiredTigerTestCase):
def test_lsm_rename01(self):
self.session.create(self.uri, 'key_format=S,value_format=S')
self.add_key(self.uri, 'a', 'a')
- self.renameUntilSuccess(self.session, self.uri, self.uri + 'renamed')
+ self.session.rename(self.uri, self.uri + 'renamed', None)
self.verify_key_exists(self.uri + 'renamed', 'a', 'a')
def test_lsm_rename02(self):
self.session.create(self.uri, 'key_format=S,value_format=S')
self.add_key(self.uri, 'a', 'a')
- self.renameUntilSuccess(self.session, self.uri, self.uri + 'renamed')
+ self.session.rename(self.uri, self.uri + 'renamed', None)
# Create a new LSM with the original name
self.session.create(self.uri, 'key_format=S,value_format=S')
diff --git a/src/third_party/wiredtiger/test/suite/test_lsm03.py b/src/third_party/wiredtiger/test/suite/test_lsm03.py
index 6994b557da7..c7cc20255b1 100644
--- a/src/third_party/wiredtiger/test/suite/test_lsm03.py
+++ b/src/third_party/wiredtiger/test/suite/test_lsm03.py
@@ -59,4 +59,4 @@ class test_lsm03(wttest.WiredTigerTestCase):
ds = SimpleDataSet(self, uri, 50000, config=self.config)
ds.populate()
# The drop should succeed even when LSM work units are active
- self.dropUntilSuccess(self.session, uri)
+ self.session.drop(uri)
diff --git a/src/third_party/wiredtiger/test/suite/test_rename.py b/src/third_party/wiredtiger/test/suite/test_rename.py
index 3ec8ef3bdbc..d46280108f9 100644
--- a/src/third_party/wiredtiger/test/suite/test_rename.py
+++ b/src/third_party/wiredtiger/test/suite/test_rename.py
@@ -59,11 +59,11 @@ class test_rename(wttest.WiredTigerTestCase):
lambda: self.session.rename(uri1, uri2, None))
cursor.close()
- self.renameUntilSuccess(self.session, uri1, uri2)
+ self.session.rename(uri1, uri2, None)
confirm_does_not_exist(self, uri1)
ds2.check()
- self.renameUntilSuccess(self.session, uri2, uri1)
+ self.session.rename(uri2, uri1, None)
confirm_does_not_exist(self, uri2)
ds1.check()
diff --git a/src/third_party/wiredtiger/test/suite/test_salvage.py b/src/third_party/wiredtiger/test/suite/test_salvage.py
index 49f8462362f..fc035cf1d2f 100755
--- a/src/third_party/wiredtiger/test/suite/test_salvage.py
+++ b/src/third_party/wiredtiger/test/suite/test_salvage.py
@@ -261,7 +261,7 @@ class test_salvage(wttest.WiredTigerTestCase, suite_subprocess):
self.moreinit()
self.session.create('table:' + self.tablename, self.session_params)
self.populate(self.tablename)
- self.salvageUntilSuccess(self.session, 'file:' + self.tablename + ".wt")
+ self.session.salvage('file:' + self.tablename + ".wt", None)
self.check_populate(self.tablename)
def test_salvage_api_damaged(self):
diff --git a/src/third_party/wiredtiger/test/suite/test_schema01.py b/src/third_party/wiredtiger/test/suite/test_schema01.py
index d4b8f9f5799..5e5496f6fb0 100644
--- a/src/third_party/wiredtiger/test/suite/test_schema01.py
+++ b/src/third_party/wiredtiger/test/suite/test_schema01.py
@@ -66,7 +66,7 @@ class test_schema01(wttest.WiredTigerTestCase):
def drop_table(self):
self.pr('drop table')
- self.dropUntilSuccess(self.session, self.tablename)
+ self.session.drop(self.tablename)
def cursor(self, config=None):
self.pr('open cursor')
diff --git a/src/third_party/wiredtiger/test/suite/test_schema05.py b/src/third_party/wiredtiger/test/suite/test_schema05.py
index c99f65dad4a..470c1b42fbd 100644
--- a/src/third_party/wiredtiger/test/suite/test_schema05.py
+++ b/src/third_party/wiredtiger/test/suite/test_schema05.py
@@ -71,7 +71,7 @@ class test_schema05(wttest.WiredTigerTestCase):
def drop_indices(self):
for i in range(0, self.nindices):
- self.dropUntilSuccess(self.session, "index:schema05:x" + str(i))
+ self.session.drop("index:schema05:x" + str(i))
def csv(self, s, i):
return s.split(',')[i]
diff --git a/src/third_party/wiredtiger/test/suite/test_schema06.py b/src/third_party/wiredtiger/test/suite/test_schema06.py
index f23d6de834f..6224b409b33 100644
--- a/src/third_party/wiredtiger/test/suite/test_schema06.py
+++ b/src/third_party/wiredtiger/test/suite/test_schema06.py
@@ -64,7 +64,7 @@ class test_schema06(wttest.WiredTigerTestCase):
def drop_index(self, inum):
colname = "s" + str(inum)
- self.dropUntilSuccess(self.session, "index:schema06:" + colname)
+ self.session.drop("index:schema06:" + colname, None)
def test_index_stress(self):
self.session.create("table:schema06",
diff --git a/src/third_party/wiredtiger/test/suite/test_sweep03.py b/src/third_party/wiredtiger/test/suite/test_sweep03.py
index 92ff2b59b78..265f8c44dce 100644
--- a/src/third_party/wiredtiger/test/suite/test_sweep03.py
+++ b/src/third_party/wiredtiger/test/suite/test_sweep03.py
@@ -153,7 +153,7 @@ class test_sweep03(wttest.WiredTigerTestCase, suite_subprocess):
sweep_baseline = stat_cursor[stat.conn.dh_sweeps][2]
stat_cursor.close()
- self.dropUntilSuccess(self.session, drop_uri)
+ self.session.drop(drop_uri, None)
sweep_baseline = self.wait_for_sweep(sweep_baseline)
diff --git a/src/third_party/wiredtiger/test/suite/test_truncate01.py b/src/third_party/wiredtiger/test/suite/test_truncate01.py
index 3e99611a549..39bffc5f163 100644
--- a/src/third_party/wiredtiger/test/suite/test_truncate01.py
+++ b/src/third_party/wiredtiger/test/suite/test_truncate01.py
@@ -96,13 +96,13 @@ class test_truncate_uri(wttest.WiredTigerTestCase):
SimpleDataSet(self, uri, 100).populate()
self.session.truncate(uri, None, None, None)
confirm_empty(self, uri)
- self.dropUntilSuccess(self.session, uri)
+ self.session.drop(uri, None)
if self.type == "table:":
ComplexDataSet(self, uri, 100).populate()
self.session.truncate(uri, None, None, None)
confirm_empty(self, uri)
- self.dropUntilSuccess(self.session, uri)
+ self.session.drop(uri, None)
# Test truncation of cursors in an illegal order.
class test_truncate_cursor_order(wttest.WiredTigerTestCase):
@@ -165,7 +165,7 @@ class test_truncate_cursor_end(wttest.WiredTigerTestCase):
self.session.truncate(None, c1, c2, None)
self.assertEqual(c1.close(), 0)
self.assertEqual(c2.close(), 0)
- self.dropUntilSuccess(self.session, uri)
+ self.session.drop(uri)
if self.type == "table:":
ds = ComplexDataSet(self, uri, 100, key_format=self.keyfmt)
@@ -177,7 +177,7 @@ class test_truncate_cursor_end(wttest.WiredTigerTestCase):
self.session.truncate(None, c1, c2, None)
self.assertEqual(c1.close(), 0)
self.assertEqual(c2.close(), 0)
- self.dropUntilSuccess(self.session, uri)
+ self.session.drop(uri)
# Test truncation of empty objects.
class test_truncate_empty(wttest.WiredTigerTestCase):
@@ -428,7 +428,7 @@ class test_truncate_cursor(wttest.WiredTigerTestCase):
cursor.close()
self.truncateRangeAndCheck(ds, uri, begin, end, expected)
- self.dropUntilSuccess(self.session, uri)
+ self.session.drop(uri, None)
# Test truncation of complex tables using cursors. We can't do the kind of
# layout and detailed testing as we can with files, but this will at least
@@ -487,7 +487,7 @@ class test_truncate_cursor(wttest.WiredTigerTestCase):
self.reopen_conn()
self.truncateRangeAndCheck(ds, uri, begin, end, expected)
- self.dropUntilSuccess(self.session, uri)
+ self.session.drop(uri, None)
if __name__ == '__main__':
wttest.run()
diff --git a/src/third_party/wiredtiger/test/suite/test_upgrade.py b/src/third_party/wiredtiger/test/suite/test_upgrade.py
index 363f305c627..02691aa0c12 100644
--- a/src/third_party/wiredtiger/test/suite/test_upgrade.py
+++ b/src/third_party/wiredtiger/test/suite/test_upgrade.py
@@ -52,8 +52,8 @@ class test_upgrade(wttest.WiredTigerTestCase):
lambda: self.session.drop(uri, None))
cursor.close()
- self.upgradeUntilSuccess(self.session, uri)
- self.dropUntilSuccess(self.session, uri)
+ self.session.upgrade(uri, None)
+ self.session.drop(uri)
# Test upgrade of an object.
def test_upgrade(self):
diff --git a/src/third_party/wiredtiger/test/suite/test_util11.py b/src/third_party/wiredtiger/test/suite/test_util11.py
index fd4e359e279..024813e20ec 100644
--- a/src/third_party/wiredtiger/test/suite/test_util11.py
+++ b/src/third_party/wiredtiger/test/suite/test_util11.py
@@ -95,8 +95,8 @@ class test_util11(wttest.WiredTigerTestCase, suite_subprocess):
self.session.create('table:' + pfx + '4', params)
self.populate(pfx + '2')
self.populate(pfx + '3')
- self.dropUntilSuccess(self.session, 'table:' + pfx + '2')
- self.dropUntilSuccess(self.session, 'table:' + pfx + '4')
+ self.session.drop('table:' + pfx + '2', None)
+ self.session.drop('table:' + pfx + '4', None)
# Construct what we think we'll find
tablelist = ''.join('table:' + pfx + str(i) + '\n' for i in (1, 3, 5))
@@ -119,11 +119,11 @@ class test_util11(wttest.WiredTigerTestCase, suite_subprocess):
self.session.create('table:' + pfx + '4', params)
self.populate(pfx + '2')
self.populate(pfx + '3')
- self.dropUntilSuccess(self.session, 'table:' + pfx + '5')
- self.dropUntilSuccess(self.session, 'table:' + pfx + '4')
- self.dropUntilSuccess(self.session, 'table:' + pfx + '3')
- self.dropUntilSuccess(self.session, 'table:' + pfx + '2')
- self.dropUntilSuccess(self.session, 'table:' + pfx + '1')
+ self.session.drop('table:' + pfx + '5', None)
+ self.session.drop('table:' + pfx + '4', None)
+ self.session.drop('table:' + pfx + '3', None)
+ self.session.drop('table:' + pfx + '2', None)
+ self.session.drop('table:' + pfx + '1', None)
# Construct what we think we'll find
filelist = ''
diff --git a/src/third_party/wiredtiger/test/suite/test_verify.py b/src/third_party/wiredtiger/test/suite/test_verify.py
index af0ae6e5f11..c135362cb58 100755
--- a/src/third_party/wiredtiger/test/suite/test_verify.py
+++ b/src/third_party/wiredtiger/test/suite/test_verify.py
@@ -117,7 +117,7 @@ class test_verify(wttest.WiredTigerTestCase, suite_subprocess):
params = 'key_format=S,value_format=S'
self.session.create('table:' + self.tablename, params)
self.populate(self.tablename)
- self.verifyUntilSuccess(self.session, 'table:' + self.tablename)
+ self.session.verify('table:' + self.tablename, None)
self.check_populate(self.tablename)
def test_verify_api_75pct_null(self):
diff --git a/src/third_party/wiredtiger/test/suite/wttest.py b/src/third_party/wiredtiger/test/suite/wttest.py
index 0eb9dfa5612..60064c130f3 100755
--- a/src/third_party/wiredtiger/test/suite/wttest.py
+++ b/src/third_party/wiredtiger/test/suite/wttest.py
@@ -662,56 +662,6 @@ class WiredTigerTestCase(unittest.TestCase):
def timestamp_str(self, t):
return '%x' % t
- def dropUntilSuccess(self, session, uri, config=None):
- while True:
- try:
- session.drop(uri, config)
- return
- except wiredtiger.WiredTigerError as err:
- if str(err) != os.strerror(errno.EBUSY):
- raise err
- session.checkpoint()
-
- def verifyUntilSuccess(self, session, uri, config=None):
- while True:
- try:
- session.verify(uri, config)
- return
- except wiredtiger.WiredTigerError as err:
- if str(err) != os.strerror(errno.EBUSY):
- raise err
- session.checkpoint()
-
- def renameUntilSuccess(self, session, uri, newUri, config=None):
- while True:
- try:
- session.rename(uri, newUri, config)
- return
- except wiredtiger.WiredTigerError as err:
- if str(err) != os.strerror(errno.EBUSY):
- raise err
- session.checkpoint()
-
- def upgradeUntilSuccess(self, session, uri, config=None):
- while True:
- try:
- session.upgrade(uri, config)
- return
- except wiredtiger.WiredTigerError as err:
- if str(err) != os.strerror(errno.EBUSY):
- raise err
- session.checkpoint()
-
- def salvageUntilSuccess(self, session, uri, config=None):
- while True:
- try:
- session.salvage(uri, config)
- return
- except wiredtiger.WiredTigerError as err:
- if str(err) != os.strerror(errno.EBUSY):
- raise err
- session.checkpoint()
-
def exceptionToStderr(self, expr):
"""
Used by assertRaisesHavingMessage to convert an expression
diff --git a/src/third_party/wiredtiger/test/thread/file.c b/src/third_party/wiredtiger/test/thread/file.c
index 104e0cec770..5717e72c63e 100644
--- a/src/third_party/wiredtiger/test/thread/file.c
+++ b/src/third_party/wiredtiger/test/thread/file.c
@@ -105,15 +105,11 @@ load(const char *name)
void
verify(const char *name)
{
- WT_DECL_RET;
WT_SESSION *session;
testutil_check(conn->open_session(conn, NULL, NULL, &session));
- while ((ret = session->verify(session, name, NULL)) == EBUSY)
- testutil_check(session->checkpoint(session, NULL));
-
- testutil_check(ret);
+ testutil_check(session->verify(session, name, NULL));
testutil_check(session->close(session, NULL));
}
diff --git a/src/third_party/wiredtiger/test/utility/test_util.h b/src/third_party/wiredtiger/test/utility/test_util.h
index 0f12e5687af..441634cfa90 100644
--- a/src/third_party/wiredtiger/test/utility/test_util.h
+++ b/src/third_party/wiredtiger/test/utility/test_util.h
@@ -152,30 +152,6 @@ typedef struct {
} while (0)
/*
- * testutil_drop --
- * Drop a table
- */
-#define testutil_drop(session, uri, config) \
- do { \
- int __ret; \
- while ((__ret = session->drop(session, uri, config)) == EBUSY) \
- testutil_check(session->checkpoint(session, NULL)); \
- testutil_check(__ret); \
- } while (0)
-
-/*
- * testutil_verify --
- * Verify a table
- */
-#define testutil_verify(session, uri, config) \
- do { \
- int __ret; \
- while ((__ret = session->verify(session, uri, config)) == EBUSY) \
- testutil_check(session->checkpoint(session, NULL)); \
- testutil_check(__ret); \
- } while (0)
-
-/*
* error_sys_check --
* Complain and quit if a function call fails. A special name because it appears in the
* documentation. Allow any non-negative values.