summaryrefslogtreecommitdiff
path: root/src/btree
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2016-02-29 10:20:33 -0500
committerKeith Bostic <keith@wiredtiger.com>2016-02-29 10:20:33 -0500
commitfcb8e77b0fc1602f90a4d7619461a6d40a88ea4a (patch)
tree29ff8cb04c40b8c90fbe7847575ac6de934e2252 /src/btree
parent0a8aac89fbefb8e376210720d4163f5cde78a134 (diff)
downloadmongo-fcb8e77b0fc1602f90a4d7619461a6d40a88ea4a.tar.gz
WT-2345: __wt_evict_file_exclusive_on/off cleanups
Add a per-file count of the no-eviction requests, only set the flag when the count goes from 0 to 1, and only clear the flag when the count goes from 1 to 0.
Diffstat (limited to 'src/btree')
-rw-r--r--src/btree/bt_rebalance.c3
-rw-r--r--src/btree/bt_sync.c6
2 files changed, 4 insertions, 5 deletions
diff --git a/src/btree/bt_rebalance.c b/src/btree/bt_rebalance.c
index e1fb6227779..d94eb2ddd80 100644
--- a/src/btree/bt_rebalance.c
+++ b/src/btree/bt_rebalance.c
@@ -439,7 +439,8 @@ __wt_bt_rebalance(WT_SESSION_IMPL *session, const char *cfg[])
* cache is the root page, and that cannot be evicted; however, this way
* eviction ignores the tree entirely.)
*/
- WT_ERR(__wt_evict_file_exclusive_on(session, &evict_reset));
+ WT_ERR(__wt_evict_file_exclusive_on(session));
+ evict_reset = true;
/* Recursively walk the tree. */
switch (rs->type) {
diff --git a/src/btree/bt_sync.c b/src/btree/bt_sync.c
index 5273f0ee2c3..5d0944bd092 100644
--- a/src/btree/bt_sync.c
+++ b/src/btree/bt_sync.c
@@ -25,7 +25,6 @@ __sync_file(WT_SESSION_IMPL *session, WT_CACHE_OP syncop)
uint64_t internal_bytes, internal_pages, leaf_bytes, leaf_pages;
uint64_t oldest_id, saved_snap_min;
uint32_t flags;
- bool evict_reset;
btree = S2BT(session);
walk = NULL;
@@ -123,9 +122,8 @@ __sync_file(WT_SESSION_IMPL *session, WT_CACHE_OP syncop)
*/
WT_PUBLISH(btree->checkpointing, WT_CKPT_PREPARE);
- WT_ERR(__wt_evict_file_exclusive_on(session, &evict_reset));
- if (evict_reset)
- __wt_evict_file_exclusive_off(session);
+ WT_ERR(__wt_evict_file_exclusive_on(session));
+ __wt_evict_file_exclusive_off(session);
WT_PUBLISH(btree->checkpointing, WT_CKPT_RUNNING);