diff options
author | Keith Bostic <keith@wiredtiger.com> | 2015-04-23 15:08:06 -0400 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2015-04-27 17:11:38 +1000 |
commit | 96f85a0987217074dd91de689a499cd0a4c16bbb (patch) | |
tree | 23bef19230eeb264d913d218220f41433feb676c | |
parent | 7de835c6347ce5c76d4de27af87397abf455fc4d (diff) | |
download | mongo-96f85a0987217074dd91de689a499cd0a4c16bbb.tar.gz |
Always clear WT_BTREE_NO_HAZARD when cache_resident is not configured,
otherwise we can (1) create a file with cache_resident configured
(setting both no-eviction and no-hazard), (2) drop the file, then
(3) re-create the file without cache_resident configured (clearing only
no-eviction), and the result will be a file that can be evicted and
where we aren't maintaining hazard pointers, and nothing good is going
to happen after that.
-rw-r--r-- | src/btree/bt_handle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/btree/bt_handle.c b/src/btree/bt_handle.c index 1e0f95d3131..d885ec9e3c0 100644 --- a/src/btree/bt_handle.c +++ b/src/btree/bt_handle.c @@ -260,7 +260,7 @@ __btree_conf(WT_SESSION_IMPL *session, WT_CKPT *ckpt) if (cval.val) F_SET(btree, WT_BTREE_NO_EVICTION | WT_BTREE_NO_HAZARD); else - F_CLR(btree, WT_BTREE_NO_EVICTION); + F_CLR(btree, WT_BTREE_NO_EVICTION | WT_BTREE_NO_HAZARD); } /* Checksums */ |