summaryrefslogtreecommitdiff
path: root/src/meta/meta_table.c
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2014-12-09 15:58:28 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2014-12-09 15:58:28 +1100
commitbe364821d75c0c42169d79c486fa582c777f7082 (patch)
tree19fbf92ecc10835c4fdbbeb6009f9e5f8dff1c6d /src/meta/meta_table.c
parent7907694fe1a38612b958cf15be82082b3e356583 (diff)
downloadmongo-be364821d75c0c42169d79c486fa582c777f7082.tar.gz
Sweep old handles more aggressively:
1. don't have checkpoint or other periodic operations like statistics logging keep old handles alive; 2. don't wait for all sessions to empty the file from their cache before closing; 3. only update the time of death from the sweep thread.
Diffstat (limited to 'src/meta/meta_table.c')
-rw-r--r--src/meta/meta_table.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/meta/meta_table.c b/src/meta/meta_table.c
index d1e0b2f4bfe..0f2d37a2e55 100644
--- a/src/meta/meta_table.c
+++ b/src/meta/meta_table.c
@@ -68,12 +68,11 @@ __wt_metadata_cursor(
/*
* We use the metadata a lot, so we have a handle cached; lock it and
- * increment the in-use counter.
+ * increment the in-use counter once the cursor is open.
*/
WT_ERR(__wt_session_lock_dhandle(session, 0));
- __wt_session_dhandle_incr_use(session);
-
- ret = __wt_curfile_create(session, NULL, cfg, 0, 0, cursorp);
+ WT_ERR(__wt_curfile_create(session, NULL, cfg, 0, 0, cursorp));
+ __wt_cursor_dhandle_incr_use(session);
/* Restore the caller's btree. */
err: session->dhandle = saved_dhandle;