diff options
author | Chenhao Qu <chenhao.qu@mongodb.com> | 2021-04-07 11:34:53 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-04-07 12:05:17 +0000 |
commit | c344a14d23044d7b88fc8a048265ffbdbe22f00f (patch) | |
tree | 7df0fc72d2044c6aaf3cc970f8c643fd7d884a1b /src/third_party | |
parent | a00ccbb751af270a8118427dd441f5710ec8b357 (diff) | |
download | mongo-c344a14d23044d7b88fc8a048265ffbdbe22f00f.tar.gz |
Import wiredtiger: 98c008d62c87b07f424fe4ddc374334469bab970 from branch mongodb-5.0
ref: dd3f5c8d3e..98c008d62c
for: 5.0.0
WT-7387 Replace cluster/member with hostid
Diffstat (limited to 'src/third_party')
-rw-r--r-- | src/third_party/wiredtiger/dist/api_data.py | 12 | ||||
-rw-r--r-- | src/third_party/wiredtiger/examples/c/Makefile.am | 1 | ||||
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/config/config_def.c | 50 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/conn/conn_tiered.c | 14 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/include/connection.h | 3 | ||||
-rwxr-xr-x | src/third_party/wiredtiger/test/suite/test_tiered06.py | 2 |
7 files changed, 38 insertions, 46 deletions
diff --git a/src/third_party/wiredtiger/dist/api_data.py b/src/third_party/wiredtiger/dist/api_data.py index 03c9ff70e67..7a8cdbc272c 100644 --- a/src/third_party/wiredtiger/dist/api_data.py +++ b/src/third_party/wiredtiger/dist/api_data.py @@ -977,14 +977,10 @@ wiredtiger_open_tiered_storage_configuration = [ authentication string identifier'''), Config('bucket', '', r''' bucket string identifier where the objects should reside'''), - Config('cluster', '', r''' - unique string identifier identifying the cluster owning these objects. - This identifier is used in naming since objects multiple instances can share - the object storage bucket'''), - Config('member', '', r''' - unique string identifier identifying the member within a cluster. - This identifier is used in naming objects since multiple nodes in a - cluster could write to the same table in the object storage bucket'''), + Config('bucket_prefix', '', r''' + unique string prefix to identify our objects in the bucket. + Multiple instances can share the storage bucket and this + identifier is used in naming objects'''), Config('name', 'none', r''' Permitted values are \c "none" or custom storage name created with diff --git a/src/third_party/wiredtiger/examples/c/Makefile.am b/src/third_party/wiredtiger/examples/c/Makefile.am index a2923fe5df1..6c20b31a146 100644 --- a/src/third_party/wiredtiger/examples/c/Makefile.am +++ b/src/third_party/wiredtiger/examples/c/Makefile.am @@ -30,7 +30,6 @@ noinst_PROGRAMS = \ ex_encrypt_LDFLAGS = -rdynamic ex_file_system_LDFLAGS = -rdynamic -ex_storage_source_LDFLAGS = -rdynamic # The examples can be run with no arguments as simple smoke tests TESTS = $(noinst_PROGRAMS) diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 27eeeefd5ec..18f6f482ab7 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-5.0", - "commit": "dd3f5c8d3ecda736fbc9094c65264ff7907f7f77" + "commit": "98c008d62c87b07f424fe4ddc374334469bab970" } diff --git a/src/third_party/wiredtiger/src/config/config_def.c b/src/third_party/wiredtiger/src/config/config_def.c index 8b16e0a11ea..cdae90b9733 100644 --- a/src/third_party/wiredtiger/src/config/config_def.c +++ b/src/third_party/wiredtiger/src/config/config_def.c @@ -634,9 +634,9 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_statistics_log_subconfigs[] static const WT_CONFIG_CHECK confchk_tiered_storage_subconfigs[] = { {"auth_token", "string", NULL, NULL, NULL, 0}, {"bucket", "string", NULL, NULL, NULL, 0}, - {"cluster", "string", NULL, NULL, NULL, 0}, + {"bucket_prefix", "string", NULL, NULL, NULL, 0}, {"local_retention", "int", NULL, "min=0,max=10000", NULL, 0}, - {"member", "string", NULL, NULL, NULL, 0}, {"name", "string", NULL, NULL, NULL, 0}, + {"name", "string", NULL, NULL, NULL, 0}, {"object_target_size", "int", NULL, "min=100K,max=10TB", NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; @@ -695,7 +695,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open[] = { NULL, 0}, {"statistics_log", "category", NULL, NULL, confchk_wiredtiger_open_statistics_log_subconfigs, 6}, {"tiered_manager", "category", NULL, NULL, confchk_tiered_manager_subconfigs, 3}, - {"tiered_storage", "category", NULL, NULL, confchk_tiered_storage_subconfigs, 7}, + {"tiered_storage", "category", NULL, NULL, confchk_tiered_storage_subconfigs, 6}, {"timing_stress_for_test", "list", NULL, "choices=[\"aggressive_sweep\",\"backup_rename\"," "\"checkpoint_slow\",\"history_store_checkpoint_delay\"," @@ -773,7 +773,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_all[] = { NULL, 0}, {"statistics_log", "category", NULL, NULL, confchk_wiredtiger_open_statistics_log_subconfigs, 6}, {"tiered_manager", "category", NULL, NULL, confchk_tiered_manager_subconfigs, 3}, - {"tiered_storage", "category", NULL, NULL, confchk_tiered_storage_subconfigs, 7}, + {"tiered_storage", "category", NULL, NULL, confchk_tiered_storage_subconfigs, 6}, {"timing_stress_for_test", "list", NULL, "choices=[\"aggressive_sweep\",\"backup_rename\"," "\"checkpoint_slow\",\"history_store_checkpoint_delay\"," @@ -848,7 +848,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_basecfg[] = { NULL, 0}, {"statistics_log", "category", NULL, NULL, confchk_wiredtiger_open_statistics_log_subconfigs, 6}, {"tiered_manager", "category", NULL, NULL, confchk_tiered_manager_subconfigs, 3}, - {"tiered_storage", "category", NULL, NULL, confchk_tiered_storage_subconfigs, 7}, + {"tiered_storage", "category", NULL, NULL, confchk_tiered_storage_subconfigs, 6}, {"timing_stress_for_test", "list", NULL, "choices=[\"aggressive_sweep\",\"backup_rename\"," "\"checkpoint_slow\",\"history_store_checkpoint_delay\"," @@ -921,7 +921,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_usercfg[] = { NULL, 0}, {"statistics_log", "category", NULL, NULL, confchk_wiredtiger_open_statistics_log_subconfigs, 6}, {"tiered_manager", "category", NULL, NULL, confchk_tiered_manager_subconfigs, 3}, - {"tiered_storage", "category", NULL, NULL, confchk_tiered_storage_subconfigs, 7}, + {"tiered_storage", "category", NULL, NULL, confchk_tiered_storage_subconfigs, 6}, {"timing_stress_for_test", "list", NULL, "choices=[\"aggressive_sweep\",\"backup_rename\"," "\"checkpoint_slow\",\"history_store_checkpoint_delay\"," @@ -1199,11 +1199,11 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator", "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=,cluster=,local_retention=300" - ",member=,name=,object_target_size=10M),timing_stress_for_test=," - "transaction_sync=(enabled=false,method=fsync)," - "use_environment=true,use_environment_priv=false,verbose=[]," - "verify_metadata=false,write_through=", + "tiered_storage=(auth_token=,bucket=,bucket_prefix=," + "local_retention=300,name=,object_target_size=10M)," + "timing_stress_for_test=,transaction_sync=(enabled=false," + "method=fsync),use_environment=true,use_environment_priv=false," + "verbose=[],verify_metadata=false,write_through=", confchk_wiredtiger_open, 57}, {"wiredtiger_open_all", "buffer_alignment=-1,builtin_extension_config=,cache_cursors=true" @@ -1234,11 +1234,12 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator", "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=,cluster=,local_retention=300" - ",member=,name=,object_target_size=10M),timing_stress_for_test=," - "transaction_sync=(enabled=false,method=fsync)," - "use_environment=true,use_environment_priv=false,verbose=[]," - "verify_metadata=false,version=(major=0,minor=0),write_through=", + "tiered_storage=(auth_token=,bucket=,bucket_prefix=," + "local_retention=300,name=,object_target_size=10M)," + "timing_stress_for_test=,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, 58}, {"wiredtiger_open_basecfg", "buffer_alignment=-1,builtin_extension_config=,cache_cursors=true" @@ -1268,10 +1269,11 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator", "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=,cluster=,local_retention=300" - ",member=,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=", + "tiered_storage=(auth_token=,bucket=,bucket_prefix=," + "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, 52}, {"wiredtiger_open_usercfg", "buffer_alignment=-1,builtin_extension_config=,cache_cursors=true" @@ -1301,10 +1303,10 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator", "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=,cluster=,local_retention=300" - ",member=,name=,object_target_size=10M),timing_stress_for_test=," - "transaction_sync=(enabled=false,method=fsync),verbose=[]," - "verify_metadata=false,write_through=", + "tiered_storage=(auth_token=,bucket=,bucket_prefix=," + "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, 51}, {NULL, NULL, NULL, 0}}; diff --git a/src/third_party/wiredtiger/src/conn/conn_tiered.c b/src/third_party/wiredtiger/src/conn/conn_tiered.c index 2c0d95542ce..9771cced268 100644 --- a/src/third_party/wiredtiger/src/conn/conn_tiered.c +++ b/src/third_party/wiredtiger/src/conn/conn_tiered.c @@ -221,19 +221,16 @@ __tiered_config(WT_SESSION_IMPL *session, const char **cfg, bool *runp, bool rec WT_STAT_CONN_SET(session, tiered_object_size, conn->bstorage->object_size); WT_STAT_CONN_SET(session, tiered_retention, conn->bstorage->retain_secs); - /* The strings for unique identification are connection level not per bucket. */ - WT_RET(__wt_config_gets(session, cfg, "tiered_storage.cluster", &cval)); - WT_ERR(__wt_strndup(session, cval.str, cval.len, &conn->tiered_cluster)); - WT_ERR(__wt_config_gets(session, cfg, "tiered_storage.member", &cval)); - WT_ERR(__wt_strndup(session, cval.str, cval.len, &conn->tiered_member)); + /* The strings for unique identification are connection level. */ + WT_RET(__wt_config_gets(session, cfg, "tiered_storage.bucket_prefix", &cval)); + WT_ERR(__wt_strndup(session, cval.str, cval.len, &conn->tiered_prefix)); return (__tiered_manager_config(session, cfg, runp)); err: __wt_free(session, conn->bstorage->auth_token); __wt_free(session, conn->bstorage->bucket); __wt_free(session, conn->bstorage); - __wt_free(session, conn->tiered_cluster); - __wt_free(session, conn->tiered_member); + __wt_free(session, conn->tiered_prefix); return (ret); } @@ -346,8 +343,7 @@ __wt_tiered_storage_destroy(WT_SESSION_IMPL *session) WT_DECL_RET; conn = S2C(session); - __wt_free(session, conn->tiered_cluster); - __wt_free(session, conn->tiered_member); + __wt_free(session, conn->tiered_prefix); /* Stop the server thread. */ FLD_CLR(conn->server_flags, WT_CONN_SERVER_TIERED); diff --git a/src/third_party/wiredtiger/src/include/connection.h b/src/third_party/wiredtiger/src/include/connection.h index 61bbe022371..16d5b4a596a 100644 --- a/src/third_party/wiredtiger/src/include/connection.h +++ b/src/third_party/wiredtiger/src/include/connection.h @@ -407,8 +407,7 @@ struct __wt_connection_impl { bool tiered_tid_set; /* Tiered thread set */ WT_CONDVAR *tiered_cond; /* Tiered wait mutex */ - const char *tiered_cluster; /* Tiered storage cluster name */ - const char *tiered_member; /* Tiered storage member name */ + const char *tiered_prefix; /* Tiered storage naming prefix */ WT_TIERED_MANAGER tiered_manager; /* Tiered worker thread information */ bool tiered_server_running; /* Internal tiered server operating */ diff --git a/src/third_party/wiredtiger/test/suite/test_tiered06.py b/src/third_party/wiredtiger/test/suite/test_tiered06.py index 7cab8142608..d5eed1cbfe8 100755 --- a/src/third_party/wiredtiger/test/suite/test_tiered06.py +++ b/src/third_party/wiredtiger/test/suite/test_tiered06.py @@ -189,7 +189,7 @@ class test_tiered06(wttest.WiredTigerTestCase): self.assertEquals(got, expect) def test_local_locations(self): - # Test using various buckets, clusters + # Test using various buckets, hosts session = self.session local = self.conn.get_storage_source('local_store') |