diff options
author | Michael Cahill <michael.cahill@wiredtiger.com> | 2014-12-22 12:42:46 +1100 |
---|---|---|
committer | Michael Cahill <michael.cahill@wiredtiger.com> | 2014-12-22 12:42:46 +1100 |
commit | 995d6f8c26ae19013a1eb921fd871481ca643f47 (patch) | |
tree | 53a0ce83e1f92674e0f8f048a8423565385ebb4e | |
parent | 01818b70ac4df0c54afd08f5721f0ffc1d90e2d5 (diff) | |
download | mongo-995d6f8c26ae19013a1eb921fd871481ca643f47.tar.gz |
Eviction should do update-restore if upper layers are trying to force out a page, regardless of its size. Also, only look at ref->page after checking for exclusive access. It is possible (but very unlikely) that a child page pointer could be replaced in the window where we are checking hazard pointers.
-rw-r--r-- | src/evict/evict_page.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/evict/evict_page.c b/src/evict/evict_page.c index 4f0ab62bc6d..e840fb83cfb 100644 --- a/src/evict/evict_page.c +++ b/src/evict/evict_page.c @@ -315,7 +315,6 @@ __evict_review(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t flags; btree = S2BT(session); - page = ref->page; /* * Get exclusive access to the page if our caller doesn't have the tree @@ -334,6 +333,10 @@ __evict_review(WT_SESSION_IMPL *session, WT_REF *ref, __wt_evict_list_clear_page(session, ref); } + /* Now that we have exclusive access, review the page. */ + page = ref->page; + mod = page->modify; + /* * Recurse through the page's subtree: this happens first because we * have to write pages in depth-first order, otherwise we'll dirty @@ -345,8 +348,6 @@ __evict_review(WT_SESSION_IMPL *session, WT_REF *ref, WT_RET(ret); } - mod = page->modify; - /* * If the tree was deepened, there's a requirement that newly created * internal pages not be evicted until all threads are known to have @@ -456,7 +457,7 @@ __evict_review(WT_SESSION_IMPL *session, WT_REF *ref, if (exclusive) LF_SET(WT_SKIP_UPDATE_ERR); else if (top && !WT_PAGE_IS_INTERNAL(page) && - page->memory_footprint > 10 * btree->maxleafpage) + page->read_gen == WT_READGEN_OLDEST) LF_SET(WT_SKIP_UPDATE_RESTORE); WT_RET(__wt_reconcile(session, ref, NULL, flags)); WT_ASSERT(session, |