summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2012-04-16 10:22:53 +1000
committerMichael Cahill <michael.cahill@wiredtiger.com>2012-04-16 10:22:53 +1000
commitc9d775fcff0ae3b87e9c734de4602f13ec76efdd (patch)
treeb9834f719cb5095488cd311a2968f3236d2cc81d
parent01f650c5af4515b95cd7af81128b7ef60a65bfd5 (diff)
downloadmongo-c9d775fcff0ae3b87e9c734de4602f13ec76efdd.tar.gz
Fix an unlikely bug where the EVICT_LRU flag was cleared when a page in the LRU queue was overwritten with itself during a walk. This led to an assertion failure when the page was later evicted.
-rw-r--r--src/btree/bt_evict.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/btree/bt_evict.c b/src/btree/bt_evict.c
index 4708c43bf14..7aec3eb7143 100644
--- a/src/btree/bt_evict.c
+++ b/src/btree/bt_evict.c
@@ -673,13 +673,13 @@ __evict_walk_file(WT_SESSION_IMPL *session, u_int *slotp)
WT_ASSERT(session, page->ref->state == WT_REF_EVICT_WALK);
- /* Mark the page on the list */
- F_SET(page, WT_PAGE_EVICT_LRU);
-
__evict_clr(session, evict);
evict->page = page;
evict->btree = btree;
++evict;
+
+ /* Mark the page on the list */
+ F_SET(page, WT_PAGE_EVICT_LRU);
}
*slotp += (u_int)(evict - start);