summaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2014-04-07 15:24:50 +1000
committerMichael Cahill <michael.cahill@wiredtiger.com>2014-04-07 15:24:50 +1000
commit0a4c6531c5845a115a026ccadeb67da7a8486dd7 (patch)
tree8ac68e284d1d17dded1546e2bc28fe033363bf1b /src/config
parent97975f9326d2ca64ab3ef60dc9965ff5970ac9a2 (diff)
parenteb25e6fe933df6f2bde9f1acbdcd500af0f7a227 (diff)
downloadmongo-0a4c6531c5845a115a026ccadeb67da7a8486dd7.tar.gz
Merge branch 'develop' into multiple-eviction-threads
Conflicts: src/btree/bt_evict.c
Diffstat (limited to 'src/config')
-rw-r--r--src/config/config_check.c46
-rw-r--r--src/config/config_def.c9
2 files changed, 32 insertions, 23 deletions
diff --git a/src/config/config_check.c b/src/config/config_check.c
index 501ccc94c1a..310e54c3349 100644
--- a/src/config/config_check.c
+++ b/src/config/config_check.c
@@ -22,17 +22,6 @@ __conn_foc_add(WT_SESSION_IMPL *session, const void *p)
conn = S2C(session);
/*
- * Instead of using locks to protect configuration information, assume
- * we can atomically update a pointer to a chunk of memory, and because
- * a pointer is never partially written, readers will correctly see the
- * original or new versions of the memory. Readers might be using the
- * old version as it's being updated, though, which means we cannot free
- * the old chunk of memory until all possible readers have finished.
- * Currently, that's on connection close: in other words, we can use
- * this because it's small amounts of memory, and we really, really do
- * not want to acquire locks every time we access configuration strings,
- * since that's done on every API call.
- *
* Our caller is expected to be holding any locks we need.
*/
WT_RET(__wt_realloc_def(
@@ -181,16 +170,33 @@ __wt_configure_method(WT_SESSION_IMPL *session,
/*
* The next time this configuration is updated, we don't want to figure
* out which of these pieces of memory were allocated and will need to
- * be free'd on close, add them all to the free-on-close list now.
+ * be free'd on close (this isn't a heavily used API and it's too much
+ * work); add them all to the free-on-close list now. We don't check
+ * for errors deliberately, we'd have to figure out which elements have
+ * already been added to the free-on-close array and which have not in
+ * order to avoid freeing chunks of memory twice. Again, this isn't a
+ * commonly used API and it shouldn't ever happen, just leak it.
+ */
+ (void)__conn_foc_add(session, entry->base);
+ (void)__conn_foc_add(session, entry);
+ (void)__conn_foc_add(session, checks);
+ (void)__conn_foc_add(session, newcheck->type);
+ (void)__conn_foc_add(session, newcheck->checks);
+ (void)__conn_foc_add(session, newcheck_name);
+
+ /*
+ * Instead of using locks to protect configuration information, assume
+ * we can atomically update a pointer to a chunk of memory, and because
+ * a pointer is never partially written, readers will correctly see the
+ * original or new versions of the memory. Readers might be using the
+ * old version as it's being updated, though, which means we cannot free
+ * the old chunk of memory until all possible readers have finished.
+ * Currently, that's on connection close: in other words, we can use
+ * this because it's small amounts of memory, and we really, really do
+ * not want to acquire locks every time we access configuration strings,
+ * since that's done on every API call.
*/
- WT_ERR(__conn_foc_add(session, entry));
- WT_ERR(__conn_foc_add(session, entry->base));
- WT_ERR(__conn_foc_add(session, checks));
- WT_ERR(__conn_foc_add(session, newcheck->name));
- WT_ERR(__conn_foc_add(session, newcheck->type));
- WT_ERR(__conn_foc_add(session, newcheck->checks));
-
- *epp = entry;
+ WT_PUBLISH(*epp, entry);
if (0) {
err: if (entry != NULL) {
diff --git a/src/config/config_def.c b/src/config/config_def.c
index d5961d6372f..4a02a99a0e0 100644
--- a/src/config/config_def.c
+++ b/src/config/config_def.c
@@ -47,7 +47,8 @@ static const WT_CONFIG_CHECK confchk_connection_reconfigure[] = {
"choices=[\"block\",\"checkpoint\",\"compact\",\"evict\","
"\"evictserver\",\"fileops\",\"log\",\"lsm\",\"mutex\","
"\"overflow\",\"read\",\"readserver\",\"reconcile\",\"recovery\","
- "\"salvage\",\"shared_cache\",\"verify\",\"version\",\"write\"]",
+ "\"salvage\",\"shared_cache\",\"split\",\"verify\",\"version\","
+ "\"write\"]",
NULL},
{ NULL, NULL, NULL, NULL }
};
@@ -209,6 +210,7 @@ static const WT_CONFIG_CHECK confchk_session_salvage[] = {
static const WT_CONFIG_CHECK confchk_session_verify[] = {
{ "dump_address", "boolean", NULL, NULL},
{ "dump_blocks", "boolean", NULL, NULL},
+ { "dump_offsets", "list", NULL, NULL},
{ "dump_pages", "boolean", NULL, NULL},
{ NULL, NULL, NULL, NULL }
};
@@ -281,7 +283,8 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open[] = {
"choices=[\"block\",\"checkpoint\",\"compact\",\"evict\","
"\"evictserver\",\"fileops\",\"log\",\"lsm\",\"mutex\","
"\"overflow\",\"read\",\"readserver\",\"reconcile\",\"recovery\","
- "\"salvage\",\"shared_cache\",\"verify\",\"version\",\"write\"]",
+ "\"salvage\",\"shared_cache\",\"split\",\"verify\",\"version\","
+ "\"write\"]",
NULL},
{ NULL, NULL, NULL, NULL }
};
@@ -419,7 +422,7 @@ static const WT_CONFIG_ENTRY config_entries[] = {
NULL
},
{ "session.verify",
- "dump_address=0,dump_blocks=0,dump_pages=0",
+ "dump_address=0,dump_blocks=0,dump_offsets=,dump_pages=0",
confchk_session_verify
},
{ "table.meta",