summaryrefslogtreecommitdiff
path: root/src/btree
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2015-04-23 17:52:42 -0400
committerMichael Cahill <michael.cahill@mongodb.com>2015-04-27 17:13:35 +1000
commit04f9af1c4fb9a9287786948a818c88eef68cb8a4 (patch)
tree7965be8ccddcc0aa85f0ca6bdf0e5ee4e3bac598 /src/btree
parent1980475337ce5802994e6e521dc1aea3aebc3ccd (diff)
downloadmongo-04f9af1c4fb9a9287786948a818c88eef68cb8a4.tar.gz
If a file is marked cache-resident, it can never be evicted,
this fixes SERVER-18192.
Diffstat (limited to 'src/btree')
-rw-r--r--src/btree/bt_handle.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/btree/bt_handle.c b/src/btree/bt_handle.c
index caab996fc4b..9d9ab66e0f7 100644
--- a/src/btree/bt_handle.c
+++ b/src/btree/bt_handle.c
@@ -507,8 +507,11 @@ __wt_btree_evictable(WT_SESSION_IMPL *session, int on)
btree = S2BT(session);
- /* The metadata file is never evicted. */
- if (on && !WT_IS_METADATA(btree->dhandle))
+ /* Permanently cache-resident files can never be evicted. */
+ if (F_ISSET(btree, WT_BTREE_IN_MEMORY))
+ return;
+
+ if (on)
F_CLR(btree, WT_BTREE_NO_EVICTION);
else
F_SET(btree, WT_BTREE_NO_EVICTION);