summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2015-12-02 13:10:01 +1100
committerMichael Cahill <michael.cahill@mongodb.com>2015-12-02 13:10:01 +1100
commit745eb56977bb7b636572d7eb8e7b1619f561bbb3 (patch)
tree85c6adbac33988fa09dd8e1d47a5d8dd99bf6dbf
parent6c82703fd06d34a4daa8a5e4be0e1250108a1e27 (diff)
downloadmongo-745eb56977bb7b636572d7eb8e7b1619f561bbb3.tar.gz
SERVER-21553 If truncate leaves an internal page empty, evict it asap.
(Note: works in conjunction with the change to LRU policy for internal pages in WT-2553).
-rw-r--r--src/btree/bt_walk.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/btree/bt_walk.c b/src/btree/bt_walk.c
index 8e0f4036b79..c7d83d8dfff 100644
--- a/src/btree/bt_walk.c
+++ b/src/btree/bt_walk.c
@@ -244,7 +244,8 @@ ascend: /*
* If we see any child states other than deleted, the
* page isn't empty.
*/
- if (ref->state != WT_REF_DELETED)
+ if (ref->state != WT_REF_DELETED &&
+ !LF_ISSET(WT_READ_TRUNCATE))
empty_internal = false;
if (LF_ISSET(WT_READ_CACHE)) {
@@ -270,6 +271,7 @@ ascend: /*
WT_ERR(__wt_delete_page(session, ref, &skip));
if (skip)
break;
+ empty_internal = false;
} else if (LF_ISSET(WT_READ_COMPACT)) {
/*
* Skip deleted pages, rewriting them doesn't