summaryrefslogtreecommitdiff
path: root/src/include/cursor.i
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2015-02-04 11:34:24 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2015-02-04 11:34:24 +1100
commitfcd5b44200c4ff2d0ccae7b254c318b0996da567 (patch)
tree5cb816a8aa7ca88ab2854a0f2e603ad6845c883c /src/include/cursor.i
parent57121e153cc0fb6b932b345ab5494b181dbb85d6 (diff)
downloadmongo-fcd5b44200c4ff2d0ccae7b254c318b0996da567.tar.gz
Take more care to clear dhandle->timeofdeath: we sometimes seem to be sweeping handles while a workload is still running.
Diffstat (limited to 'src/include/cursor.i')
-rw-r--r--src/include/cursor.i5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/include/cursor.i b/src/include/cursor.i
index 8fa9790e096..d261635706e 100644
--- a/src/include/cursor.i
+++ b/src/include/cursor.i
@@ -164,8 +164,11 @@ __wt_cursor_dhandle_decr_use(WT_SESSION_IMPL *session)
dhandle = session->dhandle;
+ /* If we close a handle with a time of death set, clear it. */
WT_ASSERT(session, dhandle->session_inuse > 0);
- (void)WT_ATOMIC_SUB4(dhandle->session_inuse, 1);
+ if (WT_ATOMIC_SUB4(dhandle->session_inuse, 1) == 0 &&
+ dhandle->timeofdeath != 0)
+ dhandle->timeofdeath = 0;
}
/*