diff options
author | Keith Bostic <keith@wiredtiger.com> | 2015-04-23 17:52:42 -0400 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2015-04-27 17:13:35 +1000 |
commit | 04f9af1c4fb9a9287786948a818c88eef68cb8a4 (patch) | |
tree | 7965be8ccddcc0aa85f0ca6bdf0e5ee4e3bac598 | |
parent | 1980475337ce5802994e6e521dc1aea3aebc3ccd (diff) | |
download | mongo-04f9af1c4fb9a9287786948a818c88eef68cb8a4.tar.gz |
If a file is marked cache-resident, it can never be evicted,
this fixes SERVER-18192.
-rw-r--r-- | src/btree/bt_handle.c | 7 | ||||
-rw-r--r-- | src/lsm/lsm_work_unit.c | 2 |
2 files changed, 6 insertions, 3 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); diff --git a/src/lsm/lsm_work_unit.c b/src/lsm/lsm_work_unit.c index dea012ccb9e..15c3d34d5b0 100644 --- a/src/lsm/lsm_work_unit.c +++ b/src/lsm/lsm_work_unit.c @@ -344,7 +344,7 @@ __wt_lsm_checkpoint_chunk(WT_SESSION_IMPL *session, WT_RET_MSG(session, ret, "LSM metadata write"); /* - * Clear the "cache resident" flag so the primary can be evicted and + * Clear the no-eviction flag so the primary can be evicted and * eventually closed. Only do this once the checkpoint has succeeded: * otherwise, accessing the leaf page during the checkpoint can trigger * forced eviction. |