diff options
author | Luke Chen <luke.chen@mongodb.com> | 2020-09-21 16:16:01 +1000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-09-21 06:41:04 +0000 |
commit | f4dd1b0c7ee46c6882ffe36f08c97099fda27fbc (patch) | |
tree | 770712218e5e4be338c0187af964bf8fe338bf7f | |
parent | 99b136078c726df92a19d8ed5feb37a920369a16 (diff) | |
download | mongo-f4dd1b0c7ee46c6882ffe36f08c97099fda27fbc.tar.gz |
Import wiredtiger: 472039bd1c9fd31f22730ba25afc23f4b09f59a8 from branch mongodb-4.6
ref: 3e693213fe..472039bd1c
for: 4.8.0
WT-6685 Add import configuration option to WT_SESSION::create
-rw-r--r-- | src/third_party/wiredtiger/dist/api_data.py | 12 | ||||
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/config/config_def.c | 8 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/include/wiredtiger.in | 10 |
4 files changed, 30 insertions, 2 deletions
diff --git a/src/third_party/wiredtiger/dist/api_data.py b/src/third_party/wiredtiger/dist/api_data.py index c2139a07202..a849dad416a 100644 --- a/src/third_party/wiredtiger/dist/api_data.py +++ b/src/third_party/wiredtiger/dist/api_data.py @@ -1172,6 +1172,18 @@ methods = { object exists, check that its settings match the specified configuration''', type='boolean'), + Config('import', '', r''' + configure import of an existing object into the currently running database''', + type='category', subconfig=[ + Config('enabled', 'false', r''' + whether to import the input URI from disk''', + type='boolean'), + Config('repair', 'false', r''' + whether to reconstruct the metadata from the raw file content''', + type='boolean'), + Config('file_metadata', '', r''' + the file configuration extracted from the metadata of the export database'''), + ]), ]), 'WT_SESSION.drop' : Method([ diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index f2592cc9087..5ffef917cfd 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.6", - "commit": "3e693213fe4c31f84ead39bb3bef575f2f222af6" + "commit": "472039bd1c9fd31f22730ba25afc23f4b09f59a8" } diff --git a/src/third_party/wiredtiger/src/config/config_def.c b/src/third_party/wiredtiger/src/config/config_def.c index 6c7931360fb..1725fef3250 100644 --- a/src/third_party/wiredtiger/src/config/config_def.c +++ b/src/third_party/wiredtiger/src/config/config_def.c @@ -223,6 +223,10 @@ static const WT_CONFIG_CHECK confchk_WT_SESSION_create_encryption_subconfigs[] = {"keyid", "string", NULL, NULL, NULL, 0}, {"name", "string", NULL, NULL, NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; +static const WT_CONFIG_CHECK confchk_WT_SESSION_create_import_subconfigs[] = { + {"enabled", "boolean", NULL, NULL, NULL, 0}, {"file_metadata", "string", NULL, NULL, NULL, 0}, + {"repair", "boolean", NULL, NULL, NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; + static const WT_CONFIG_CHECK confchk_WT_SESSION_create_merge_custom_subconfigs[] = { {"prefix", "string", NULL, NULL, NULL, 0}, {"start_generation", "int", NULL, "min=0,max=10", NULL, 0}, @@ -258,6 +262,7 @@ static const WT_CONFIG_CHECK confchk_WT_SESSION_create[] = { {"huffman_key", "string", NULL, NULL, NULL, 0}, {"huffman_value", "string", NULL, NULL, NULL, 0}, {"ignore_in_memory_cache_size", "boolean", NULL, NULL, NULL, 0}, {"immutable", "boolean", NULL, NULL, NULL, 0}, + {"import", "category", NULL, NULL, confchk_WT_SESSION_create_import_subconfigs, 3}, {"internal_item_max", "int", NULL, "min=0", NULL, 0}, {"internal_key_max", "int", NULL, "min=0", NULL, 0}, {"internal_key_truncate", "boolean", NULL, NULL, NULL, 0}, @@ -908,6 +913,7 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator", "columns=,dictionary=0,encryption=(keyid=,name=),exclusive=false," "extractor=,format=btree,huffman_key=,huffman_value=," "ignore_in_memory_cache_size=false,immutable=false," + "import=(enabled=false,file_metadata=,repair=false)," "internal_item_max=0,internal_key_max=0," "internal_key_truncate=true,internal_page_max=4KB,key_format=u," "key_gap=10,leaf_item_max=0,leaf_key_max=0,leaf_page_max=32KB," @@ -920,7 +926,7 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator", "prefix_compression=false,prefix_compression_min=4,source=," "split_deepen_min_child=0,split_deepen_per_child=0,split_pct=90," "type=file,value_format=u", - confchk_WT_SESSION_create, 44}, + confchk_WT_SESSION_create, 45}, {"WT_SESSION.drop", "checkpoint_wait=true,force=false,lock_wait=true," "remove_files=true", diff --git a/src/third_party/wiredtiger/src/include/wiredtiger.in b/src/third_party/wiredtiger/src/include/wiredtiger.in index c3e7a0e9dc9..7b1a81e714f 100644 --- a/src/third_party/wiredtiger/src/include/wiredtiger.in +++ b/src/third_party/wiredtiger/src/include/wiredtiger.in @@ -1283,6 +1283,16 @@ struct __wt_session { * the configured cache limit., a boolean flag; default \c false.} * @config{immutable, configure the index to be immutable - that is an index is not changed * by any update to a record in the table., a boolean flag; default \c false.} + * @config{import = (, configure import of an existing object into the currently running + * database., a set of related configuration options defined below.} + * @config{ enabled, whether to import the input URI from disk., a + * boolean flag; default \c false.} + * @config{ file_metadata, the file + * configuration extracted from the metadata of the export database., a string; default + * empty.} + * @config{ repair, whether to reconstruct the metadata from + * the raw file content., a boolean flag; default \c false.} + * @config{ ),,} * @config{internal_key_max, the largest key stored in an internal node\, in bytes. If * set\, keys larger than the specified size are stored as overflow items (which may require * additional I/O to access). The default and the maximum allowed value are both one-tenth |