summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2013-05-13 08:24:05 -0400
committerKeith Bostic <keith@wiredtiger.com>2013-05-13 08:24:05 -0400
commit7a5a75568e16c4615a826f0c30a4521a02915e34 (patch)
tree35c6ee2fdf3e02e04fce7fc16ed1c363fd625ad2
parent1299134ee3ecb352075fe2c10f23946654cfdc24 (diff)
parenta7a8135990cea26a1d94a4cec9e858e9520cdec7 (diff)
downloadmongo-7a5a75568e16c4615a826f0c30a4521a02915e34.tar.gz
Merge branch 'develop' into file-extend
-rw-r--r--src/btree/rec_evict.c32
-rw-r--r--src/btree/rec_merge.c3
-rw-r--r--src/docs/upgrading.dox11
3 files changed, 24 insertions, 22 deletions
diff --git a/src/btree/rec_evict.c b/src/btree/rec_evict.c
index d9333694dfd..c567d6ad5c5 100644
--- a/src/btree/rec_evict.c
+++ b/src/btree/rec_evict.c
@@ -8,7 +8,6 @@
#include "wt_internal.h"
static int __hazard_exclusive(WT_SESSION_IMPL *, WT_REF *, int);
-static void __rec_discard_page(WT_SESSION_IMPL *, WT_PAGE *, int);
static void __rec_discard_tree(WT_SESSION_IMPL *, WT_PAGE *, int);
static void __rec_excl_clear(WT_SESSION_IMPL *);
static void __rec_page_clean_update(WT_SESSION_IMPL *, WT_PAGE *);
@@ -88,7 +87,7 @@ __wt_rec_evict(WT_SESSION_IMPL *session, WT_PAGE *page, int exclusive)
__rec_page_clean_update(session, page);
/* Discard the page. */
- __rec_discard_page(session, page, exclusive);
+ __wt_page_out(session, &page);
WT_CSTAT_INCR(session, cache_eviction_clean);
WT_DSTAT_INCR(session, cache_eviction_clean);
@@ -258,27 +257,12 @@ __rec_discard_tree(WT_SESSION_IMPL *session, WT_PAGE *page, int exclusive)
}
/* FALLTHROUGH */
default:
- __rec_discard_page(session, page, exclusive);
+ __wt_page_out(session, &page);
break;
}
}
/*
- * __rec_discard_page --
- * Discard the page.
- */
-static void
-__rec_discard_page(WT_SESSION_IMPL *session, WT_PAGE *page, int exclusive)
-{
- /* Make sure a page is not in the eviction request list. */
- if (!exclusive)
- __wt_evict_list_clr_page(session, page);
-
- /* Discard the page. */
- __wt_page_out(session, &page);
-}
-
-/*
* __rec_review --
* Get exclusive access to the page and review the page and its subtree
* for conditions that would block its eviction.
@@ -305,9 +289,19 @@ __rec_review(WT_SESSION_IMPL *session,
* Get exclusive access to the page if our caller doesn't have the tree
* locked down.
*/
- if (!exclusive)
+ if (!exclusive) {
WT_RET(__hazard_exclusive(session, ref, top));
+ /*
+ * Now that the page is locked, remove it from the LRU eviction
+ * queue. We have to do this before freeing the page memory or
+ * otherwise touching the reference because eviction paths
+ * assume that a non-NULL page pointer on the queue is pointing
+ * at valid memory.
+ */
+ __wt_evict_list_clr_page(session, page);
+ }
+
/*
* Recurse through the page's subtree: this happens first because we
* have to write pages in depth-first order, otherwise we'll dirty
diff --git a/src/btree/rec_merge.c b/src/btree/rec_merge.c
index 9138c44e34e..528fba45885 100644
--- a/src/btree/rec_merge.c
+++ b/src/btree/rec_merge.c
@@ -84,9 +84,6 @@ __merge_count(WT_PAGE *parent, WT_REF *ref, WT_VISIT_STATE *state)
WT_UNUSED(parent);
if (ref->state == WT_REF_LOCKED) {
- /* Prevent eviction until it is hooked into the new tree. */
- __wt_evict_list_clr_page(state->session, ref->page);
-
if (!state->seen_live) {
state->first_live = state->refcnt;
state->seen_live = 1;
diff --git a/src/docs/upgrading.dox b/src/docs/upgrading.dox
index 6edacc27a43..0f59c18ca21 100644
--- a/src/docs/upgrading.dox
+++ b/src/docs/upgrading.dox
@@ -1,5 +1,16 @@
/*! @page upgrading Upgrading WiredTiger applications
+@section version_154 Upgrading to Version 1.5.4
+<dl>
+
+<dt>File format changes</dt>
+<dd>
+The underlying file formats changed in the 1.5.4 release; tables and files
+should be dumped and re-loaded into a new database.
+</dd>
+
+</dl>
+<hr>
@section version_153 Upgrading to Version 1.5.3
<dl>