summaryrefslogtreecommitdiff
path: root/src/conn
diff options
context:
space:
mode:
authorKeith Bostic <keith.bostic@mongodb.com>2017-02-28 22:55:30 -0500
committerMichael Cahill <michael.cahill@mongodb.com>2017-03-01 14:55:30 +1100
commitaf29e5e78eed5c80427179024543bd88c5f2549d (patch)
tree8652420d19b8c76c528083721075f62cbb76144e /src/conn
parent930369ce8dd3fcf43a77dc6c911b0038748228d3 (diff)
downloadmongo-af29e5e78eed5c80427179024543bd88c5f2549d.tar.gz
WT-3193 Close a race between verify opening a handle and eviction visiting it (#3316)
Leave the WT_BTREE structure mostly untouched until discarding the upper-level data handle, hopefully resolving the problems we've been having with accessing WT_BTREE fields after "closing" the handle.
Diffstat (limited to 'src/conn')
-rw-r--r--src/conn/conn_dhandle.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/conn/conn_dhandle.c b/src/conn/conn_dhandle.c
index 866b8633f71..7b265c372db 100644
--- a/src/conn/conn_dhandle.c
+++ b/src/conn/conn_dhandle.c
@@ -18,7 +18,7 @@ __conn_dhandle_destroy(WT_SESSION_IMPL *session, WT_DATA_HANDLE *dhandle)
__wt_rwlock_destroy(session, &dhandle->rwlock);
__wt_free(session, dhandle->name);
__wt_free(session, dhandle->checkpoint);
- __wt_free(session, dhandle->handle);
+ __wt_btree_discard(session, &dhandle->handle);
__wt_spin_destroy(session, &dhandle->close_lock);
__wt_stat_dsrc_discard(session, dhandle);
__wt_overwrite_and_free(session, dhandle);
@@ -192,6 +192,7 @@ __wt_conn_btree_sync_and_close(WT_SESSION_IMPL *session, bool final, bool force)
}
WT_TRET(__wt_btree_close(session));
+ F_CLR(btree, WT_BTREE_SPECIAL_FLAGS);
/*
* If we marked a handle dead it will be closed by sweep, via