From 04f9af1c4fb9a9287786948a818c88eef68cb8a4 Mon Sep 17 00:00:00 2001 From: Keith Bostic Date: Thu, 23 Apr 2015 17:52:42 -0400 Subject: If a file is marked cache-resident, it can never be evicted, this fixes SERVER-18192. --- src/btree/bt_handle.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/btree') 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); -- cgit v1.2.1