summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/config')
-rw-r--r--src/third_party/wiredtiger/src/config/config.c2
-rw-r--r--src/third_party/wiredtiger/src/config/config_def.c132
-rw-r--r--src/third_party/wiredtiger/src/config/config_ext.c77
3 files changed, 134 insertions, 77 deletions
diff --git a/src/third_party/wiredtiger/src/config/config.c b/src/third_party/wiredtiger/src/config/config.c
index 3416153d160..a47dfe76aec 100644
--- a/src/third_party/wiredtiger/src/config/config.c
+++ b/src/third_party/wiredtiger/src/config/config.c
@@ -711,7 +711,7 @@ __wt_config_getones(WT_SESSION_IMPL *session,
/*
* __wt_config_getones_none --
* Get the value for a given string key from a single config string.
- * Treat "none" as empty.
+ * Treat "none" as empty.
*/
int
__wt_config_getones_none(WT_SESSION_IMPL *session,
diff --git a/src/third_party/wiredtiger/src/config/config_def.c b/src/third_party/wiredtiger/src/config/config_def.c
index d57bc418c93..35fea16b1a5 100644
--- a/src/third_party/wiredtiger/src/config/config_def.c
+++ b/src/third_party/wiredtiger/src/config/config_def.c
@@ -24,6 +24,7 @@ static const WT_CONFIG_CHECK confchk_WT_CONNECTION_load_extension[] = {
};
static const WT_CONFIG_CHECK confchk_WT_CONNECTION_open_session[] = {
+ { "ignore_cache_size", "boolean", NULL, NULL, NULL, 0 },
{ "isolation", "string",
NULL, "choices=[\"read-uncommitted\",\"read-committed\","
"\"snapshot\"]",
@@ -344,6 +345,7 @@ static const WT_CONFIG_CHECK confchk_WT_SESSION_open_cursor[] = {
};
static const WT_CONFIG_CHECK confchk_WT_SESSION_reconfigure[] = {
+ { "ignore_cache_size", "boolean", NULL, NULL, NULL, 0 },
{ "isolation", "string",
NULL, "choices=[\"read-uncommitted\",\"read-committed\","
"\"snapshot\"]",
@@ -657,6 +659,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open[] = {
NULL, NULL,
confchk_wiredtiger_open_async_subconfigs, 3 },
{ "buffer_alignment", "int", NULL, "min=-1,max=1MB", NULL, 0 },
+ { "builtin_extension_config", "string", NULL, NULL, NULL, 0 },
{ "cache_overhead", "int", NULL, "min=0,max=30", NULL, 0 },
{ "cache_size", "int", NULL, "min=1MB,max=10TB", NULL, 0 },
{ "checkpoint", "category",
@@ -742,6 +745,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_all[] = {
NULL, NULL,
confchk_wiredtiger_open_async_subconfigs, 3 },
{ "buffer_alignment", "int", NULL, "min=-1,max=1MB", NULL, 0 },
+ { "builtin_extension_config", "string", NULL, NULL, NULL, 0 },
{ "cache_overhead", "int", NULL, "min=0,max=30", NULL, 0 },
{ "cache_size", "int", NULL, "min=1MB,max=10TB", NULL, 0 },
{ "checkpoint", "category",
@@ -828,6 +832,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_basecfg[] = {
NULL, NULL,
confchk_wiredtiger_open_async_subconfigs, 3 },
{ "buffer_alignment", "int", NULL, "min=-1,max=1MB", NULL, 0 },
+ { "builtin_extension_config", "string", NULL, NULL, NULL, 0 },
{ "cache_overhead", "int", NULL, "min=0,max=30", NULL, 0 },
{ "cache_size", "int", NULL, "min=1MB,max=10TB", NULL, 0 },
{ "checkpoint", "category",
@@ -908,6 +913,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_usercfg[] = {
NULL, NULL,
confchk_wiredtiger_open_async_subconfigs, 3 },
{ "buffer_alignment", "int", NULL, "min=-1,max=1MB", NULL, 0 },
+ { "builtin_extension_config", "string", NULL, NULL, NULL, 0 },
{ "cache_overhead", "int", NULL, "min=0,max=30", NULL, 0 },
{ "cache_size", "int", NULL, "min=1MB,max=10TB", NULL, 0 },
{ "checkpoint", "category",
@@ -1017,8 +1023,8 @@ static const WT_CONFIG_ENTRY config_entries[] = {
confchk_WT_CONNECTION_load_extension, 4
},
{ "WT_CONNECTION.open_session",
- "isolation=read-committed",
- confchk_WT_CONNECTION_open_session, 1
+ "ignore_cache_size=false,isolation=read-committed",
+ confchk_WT_CONNECTION_open_session, 2
},
{ "WT_CONNECTION.reconfigure",
"async=(enabled=false,ops_max=1024,threads=2),cache_overhead=8,"
@@ -1116,8 +1122,8 @@ static const WT_CONFIG_ENTRY config_entries[] = {
NULL, 0
},
{ "WT_SESSION.reconfigure",
- "isolation=read-committed",
- confchk_WT_SESSION_reconfigure, 1
+ "ignore_cache_size=false,isolation=read-committed",
+ confchk_WT_SESSION_reconfigure, 2
},
{ "WT_SESSION.rename",
"",
@@ -1226,62 +1232,64 @@ static const WT_CONFIG_ENTRY config_entries[] = {
},
{ "wiredtiger_open",
"async=(enabled=false,ops_max=1024,threads=2),buffer_alignment=-1"
- ",cache_overhead=8,cache_size=100MB,checkpoint=(log_size=0,"
- "wait=0),checkpoint_sync=true,config_base=true,create=false,"
- "direct_io=,encryption=(keyid=,name=,secretkey=),error_prefix=,"
- "eviction=(threads_max=1,threads_min=1),"
- "eviction_checkpoint_target=5,eviction_dirty_target=5,"
- "eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95"
- ",exclusive=false,extensions=,file_extend=,"
- "file_manager=(close_handle_minimum=250,close_idle_time=30,"
- "close_scan_interval=10),hazard_max=1000,in_memory=false,"
- "log=(archive=true,compressor=,enabled=false,file_max=100MB,"
- "path=\".\",prealloc=true,recover=on,zero_fill=false),"
- "lsm_manager=(merge=true,worker_thread_max=4),lsm_merge=true,"
- "mmap=true,multiprocess=false,readonly=false,session_max=100,"
- "session_scratch_max=2MB,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),transaction_sync=(enabled=false,method=fsync),"
+ ",builtin_extension_config=,cache_overhead=8,cache_size=100MB,"
+ "checkpoint=(log_size=0,wait=0),checkpoint_sync=true,"
+ "config_base=true,create=false,direct_io=,encryption=(keyid=,"
+ "name=,secretkey=),error_prefix=,eviction=(threads_max=1,"
+ "threads_min=1),eviction_checkpoint_target=5,"
+ "eviction_dirty_target=5,eviction_dirty_trigger=20,"
+ "eviction_target=80,eviction_trigger=95,exclusive=false,"
+ "extensions=,file_extend=,file_manager=(close_handle_minimum=250,"
+ "close_idle_time=30,close_scan_interval=10),hazard_max=1000,"
+ "in_memory=false,log=(archive=true,compressor=,enabled=false,"
+ "file_max=100MB,path=\".\",prealloc=true,recover=on,"
+ "zero_fill=false),lsm_manager=(merge=true,worker_thread_max=4),"
+ "lsm_merge=true,mmap=true,multiprocess=false,readonly=false,"
+ "session_max=100,session_scratch_max=2MB,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),"
+ "transaction_sync=(enabled=false,method=fsync),"
"use_environment=true,use_environment_priv=false,verbose=,"
"write_through=",
- confchk_wiredtiger_open, 39
+ confchk_wiredtiger_open, 40
},
{ "wiredtiger_open_all",
"async=(enabled=false,ops_max=1024,threads=2),buffer_alignment=-1"
- ",cache_overhead=8,cache_size=100MB,checkpoint=(log_size=0,"
- "wait=0),checkpoint_sync=true,config_base=true,create=false,"
- "direct_io=,encryption=(keyid=,name=,secretkey=),error_prefix=,"
- "eviction=(threads_max=1,threads_min=1),"
- "eviction_checkpoint_target=5,eviction_dirty_target=5,"
- "eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95"
- ",exclusive=false,extensions=,file_extend=,"
- "file_manager=(close_handle_minimum=250,close_idle_time=30,"
- "close_scan_interval=10),hazard_max=1000,in_memory=false,"
- "log=(archive=true,compressor=,enabled=false,file_max=100MB,"
- "path=\".\",prealloc=true,recover=on,zero_fill=false),"
- "lsm_manager=(merge=true,worker_thread_max=4),lsm_merge=true,"
- "mmap=true,multiprocess=false,readonly=false,session_max=100,"
- "session_scratch_max=2MB,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),transaction_sync=(enabled=false,method=fsync),"
+ ",builtin_extension_config=,cache_overhead=8,cache_size=100MB,"
+ "checkpoint=(log_size=0,wait=0),checkpoint_sync=true,"
+ "config_base=true,create=false,direct_io=,encryption=(keyid=,"
+ "name=,secretkey=),error_prefix=,eviction=(threads_max=1,"
+ "threads_min=1),eviction_checkpoint_target=5,"
+ "eviction_dirty_target=5,eviction_dirty_trigger=20,"
+ "eviction_target=80,eviction_trigger=95,exclusive=false,"
+ "extensions=,file_extend=,file_manager=(close_handle_minimum=250,"
+ "close_idle_time=30,close_scan_interval=10),hazard_max=1000,"
+ "in_memory=false,log=(archive=true,compressor=,enabled=false,"
+ "file_max=100MB,path=\".\",prealloc=true,recover=on,"
+ "zero_fill=false),lsm_manager=(merge=true,worker_thread_max=4),"
+ "lsm_merge=true,mmap=true,multiprocess=false,readonly=false,"
+ "session_max=100,session_scratch_max=2MB,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),"
+ "transaction_sync=(enabled=false,method=fsync),"
"use_environment=true,use_environment_priv=false,verbose=,"
"version=(major=0,minor=0),write_through=",
- confchk_wiredtiger_open_all, 40
+ confchk_wiredtiger_open_all, 41
},
{ "wiredtiger_open_basecfg",
"async=(enabled=false,ops_max=1024,threads=2),buffer_alignment=-1"
- ",cache_overhead=8,cache_size=100MB,checkpoint=(log_size=0,"
- "wait=0),checkpoint_sync=true,direct_io=,encryption=(keyid=,name="
- ",secretkey=),error_prefix=,eviction=(threads_max=1,"
- "threads_min=1),eviction_checkpoint_target=5,"
- "eviction_dirty_target=5,eviction_dirty_trigger=20,"
- "eviction_target=80,eviction_trigger=95,extensions=,file_extend=,"
- "file_manager=(close_handle_minimum=250,close_idle_time=30,"
- "close_scan_interval=10),hazard_max=1000,log=(archive=true,"
- "compressor=,enabled=false,file_max=100MB,path=\".\","
- "prealloc=true,recover=on,zero_fill=false),"
+ ",builtin_extension_config=,cache_overhead=8,cache_size=100MB,"
+ "checkpoint=(log_size=0,wait=0),checkpoint_sync=true,direct_io=,"
+ "encryption=(keyid=,name=,secretkey=),error_prefix=,"
+ "eviction=(threads_max=1,threads_min=1),"
+ "eviction_checkpoint_target=5,eviction_dirty_target=5,"
+ "eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95"
+ ",extensions=,file_extend=,file_manager=(close_handle_minimum=250"
+ ",close_idle_time=30,close_scan_interval=10),hazard_max=1000,"
+ "log=(archive=true,compressor=,enabled=false,file_max=100MB,"
+ "path=\".\",prealloc=true,recover=on,zero_fill=false),"
"lsm_manager=(merge=true,worker_thread_max=4),lsm_merge=true,"
"mmap=true,multiprocess=false,readonly=false,session_max=100,"
"session_scratch_max=2MB,shared_cache=(chunk=10MB,name=,quota=0,"
@@ -1289,20 +1297,20 @@ static const WT_CONFIG_ENTRY config_entries[] = {
",on_close=false,path=\".\",sources=,timestamp=\"%b %d %H:%M:%S\""
",wait=0),transaction_sync=(enabled=false,method=fsync),verbose=,"
"version=(major=0,minor=0),write_through=",
- confchk_wiredtiger_open_basecfg, 34
+ confchk_wiredtiger_open_basecfg, 35
},
{ "wiredtiger_open_usercfg",
"async=(enabled=false,ops_max=1024,threads=2),buffer_alignment=-1"
- ",cache_overhead=8,cache_size=100MB,checkpoint=(log_size=0,"
- "wait=0),checkpoint_sync=true,direct_io=,encryption=(keyid=,name="
- ",secretkey=),error_prefix=,eviction=(threads_max=1,"
- "threads_min=1),eviction_checkpoint_target=5,"
- "eviction_dirty_target=5,eviction_dirty_trigger=20,"
- "eviction_target=80,eviction_trigger=95,extensions=,file_extend=,"
- "file_manager=(close_handle_minimum=250,close_idle_time=30,"
- "close_scan_interval=10),hazard_max=1000,log=(archive=true,"
- "compressor=,enabled=false,file_max=100MB,path=\".\","
- "prealloc=true,recover=on,zero_fill=false),"
+ ",builtin_extension_config=,cache_overhead=8,cache_size=100MB,"
+ "checkpoint=(log_size=0,wait=0),checkpoint_sync=true,direct_io=,"
+ "encryption=(keyid=,name=,secretkey=),error_prefix=,"
+ "eviction=(threads_max=1,threads_min=1),"
+ "eviction_checkpoint_target=5,eviction_dirty_target=5,"
+ "eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95"
+ ",extensions=,file_extend=,file_manager=(close_handle_minimum=250"
+ ",close_idle_time=30,close_scan_interval=10),hazard_max=1000,"
+ "log=(archive=true,compressor=,enabled=false,file_max=100MB,"
+ "path=\".\",prealloc=true,recover=on,zero_fill=false),"
"lsm_manager=(merge=true,worker_thread_max=4),lsm_merge=true,"
"mmap=true,multiprocess=false,readonly=false,session_max=100,"
"session_scratch_max=2MB,shared_cache=(chunk=10MB,name=,quota=0,"
@@ -1310,7 +1318,7 @@ static const WT_CONFIG_ENTRY config_entries[] = {
",on_close=false,path=\".\",sources=,timestamp=\"%b %d %H:%M:%S\""
",wait=0),transaction_sync=(enabled=false,method=fsync),verbose=,"
"write_through=",
- confchk_wiredtiger_open_usercfg, 33
+ confchk_wiredtiger_open_usercfg, 34
},
{ NULL, NULL, NULL, 0 }
};
diff --git a/src/third_party/wiredtiger/src/config/config_ext.c b/src/third_party/wiredtiger/src/config/config_ext.c
index 56c0018f8c3..88f1390843a 100644
--- a/src/third_party/wiredtiger/src/config/config_ext.c
+++ b/src/third_party/wiredtiger/src/config/config_ext.c
@@ -9,22 +9,9 @@
#include "wt_internal.h"
/*
- * __wt_ext_config_parser_open --
- * WT_EXTENSION_API->config_parser_open implementation
- */
-int
-__wt_ext_config_parser_open(WT_EXTENSION_API *wt_ext, WT_SESSION *wt_session,
- const char *config, size_t len, WT_CONFIG_PARSER **config_parserp)
-{
- WT_UNUSED(wt_ext);
- return (wiredtiger_config_parser_open(
- wt_session, config, len, config_parserp));
-}
-
-/*
* __wt_ext_config_get --
* Given a NULL-terminated list of configuration strings, find the final
- * value for a given string key (external API version).
+ * value for a given string key (external API version).
*/
int
__wt_ext_config_get(WT_EXTENSION_API *wt_api,
@@ -43,3 +30,65 @@ __wt_ext_config_get(WT_EXTENSION_API *wt_api,
return (WT_NOTFOUND);
return (__wt_config_gets(session, cfg, key, cval));
}
+
+/*
+ * __wt_ext_config_get_string --
+ * Given a configuration string, find the value for a given string key
+ * (external API version).
+ */
+int
+__wt_ext_config_get_string(WT_EXTENSION_API *wt_api,
+ WT_SESSION *wt_session, const char *config, const char *key,
+ WT_CONFIG_ITEM *cval)
+{
+ WT_CONNECTION_IMPL *conn;
+ WT_SESSION_IMPL *session;
+
+ conn = (WT_CONNECTION_IMPL *)wt_api->conn;
+ if ((session = (WT_SESSION_IMPL *)wt_session) == NULL)
+ session = conn->default_session;
+
+ return (__wt_config_getones(session, config, key, cval));
+}
+
+/*
+ * __wt_ext_config_parser_open --
+ * WT_EXTENSION_API->config_parser_open implementation
+ */
+int
+__wt_ext_config_parser_open(WT_EXTENSION_API *wt_ext, WT_SESSION *wt_session,
+ const char *config, size_t len, WT_CONFIG_PARSER **config_parserp)
+{
+ WT_UNUSED(wt_ext);
+ return (wiredtiger_config_parser_open(
+ wt_session, config, len, config_parserp));
+}
+
+/*
+ * __wt_ext_config_parser_open_arg --
+ * WT_EXTENSION_API->config_parser_open_arg implementation
+ */
+int
+__wt_ext_config_parser_open_arg(WT_EXTENSION_API *wt_ext,
+ WT_SESSION *wt_session, WT_CONFIG_ARG *cfg_arg,
+ WT_CONFIG_PARSER **config_parserp)
+{
+ const char **cfg, *p;
+ size_t len;
+
+ WT_UNUSED(wt_ext);
+
+ /* Find the last non-NULL entry in the configuration stack. */
+ if ((cfg = (const char **)cfg_arg) == NULL || *cfg == NULL) {
+ p = NULL;
+ len = 0;
+ } else {
+ while (cfg[1] != NULL)
+ ++cfg;
+ p = *cfg;
+ len = strlen(p);
+ }
+
+ return (wiredtiger_config_parser_open(
+ wt_session, p, len, config_parserp));
+}