summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2013-10-03 08:16:14 -0400
committerKeith Bostic <keith@wiredtiger.com>2013-10-03 08:16:14 -0400
commit7746ed0d5926e9e86394b65c145014624aa95c9c (patch)
treea7a9cec0d355be2ac1b310126bbd6be4ae561f58 /src
parent4713784247dadb179ca9c1f98ce1d97a2abc47d4 (diff)
downloadmongo-7746ed0d5926e9e86394b65c145014624aa95c9c.tar.gz
Michael fixed the real problem in #682; remove the test code, but leave
the change that supports discarding a clean internal node with children; I'm not sure we're going to keep it, though.
Diffstat (limited to 'src')
-rw-r--r--src/btree/rec_evict.c31
1 files changed, 4 insertions, 27 deletions
diff --git a/src/btree/rec_evict.c b/src/btree/rec_evict.c
index b531fdbc70c..c2202a903e0 100644
--- a/src/btree/rec_evict.c
+++ b/src/btree/rec_evict.c
@@ -102,30 +102,6 @@ __wt_rec_evict(WT_SESSION_IMPL *session, WT_PAGE *page, int exclusive)
else
__rec_page_clean_update(session, parent_ref);
- /* Discard the page. */
- {
- WT_REF *ref;
- uint32_t i;
- switch (page->type) {
- case WT_PAGE_COL_INT:
- case WT_PAGE_ROW_INT:
- WT_REF_FOREACH(page, ref, i) {
- if (ref->state == WT_REF_DISK ||
- ref->state == WT_REF_DELETED)
- continue;
- fprintf(stderr, "\n\n");
- fprintf(stderr, "HIT: #682\n");
- fprintf(stderr, "HIT: #682\n");
- fprintf(stderr, "HIT: #682\n");
- fprintf(stderr, "\n\n");
- WT_ASSERT(session,
- exclusive || ref->state == WT_REF_LOCKED);
- break;
- }
- }
- }
- __rec_discard_tree(session, page, exclusive);
-
WT_CSTAT_INCR(session, cache_eviction_clean);
WT_DSTAT_INCR(session, cache_eviction_clean);
} else {
@@ -135,12 +111,13 @@ __wt_rec_evict(WT_SESSION_IMPL *session, WT_PAGE *page, int exclusive)
WT_ERR(__rec_page_dirty_update(
session, parent_ref, page));
- /* Discard the tree rooted in this page. */
- __rec_discard_tree(session, page, exclusive);
-
WT_CSTAT_INCR(session, cache_eviction_dirty);
WT_DSTAT_INCR(session, cache_eviction_dirty);
}
+
+ /* Discard the tree rooted in this page. */
+ __rec_discard_tree(session, page, exclusive);
+
if (0) {
err: /*
* If unable to evict this page, release exclusive reference(s)