summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2014-12-18 17:33:06 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2014-12-18 17:33:06 +1100
commit541714072c1e15bd94f30d18e30e4678f7a43170 (patch)
tree44a4328832f950ad2124a6d2fc42a6bf99aabfcf
parent1953776ada137f3deae50169bf889d2063b353d3 (diff)
downloadmongo-541714072c1e15bd94f30d18e30e4678f7a43170.tar.gz
Set split-gen when deepening the tree, add paranoia that the eviction server doesn't keep split-gen pinned.
-rw-r--r--src/btree/bt_split.c3
-rw-r--r--src/evict/evict_lru.c5
-rw-r--r--src/txn/txn.c1
3 files changed, 7 insertions, 2 deletions
diff --git a/src/btree/bt_split.c b/src/btree/bt_split.c
index 2af6c806be5..f1b96ad37f5 100644
--- a/src/btree/bt_split.c
+++ b/src/btree/bt_split.c
@@ -978,7 +978,8 @@ __split_parent(WT_SESSION_IMPL *session, WT_REF *ref, WT_REF **ref_new,
* are holding it locked.
*/
if (ret == 0 && !exclusive && __split_should_deepen(session, parent))
- ret = __split_deepen(session, parent);
+ WT_WITH_PAGE_INDEX(session,
+ ret = __split_deepen(session, parent));
err: if (locked)
F_CLR_ATOMIC(parent, WT_PAGE_SPLITTING);
diff --git a/src/evict/evict_lru.c b/src/evict/evict_lru.c
index 9037a4a1fcc..dbf3a71f222 100644
--- a/src/evict/evict_lru.c
+++ b/src/evict/evict_lru.c
@@ -941,9 +941,11 @@ retry: while (slot < max_entries && ret == 0) {
* Re-check the "no eviction" flag -- it is used to enforce
* exclusive access when a handle is being closed.
*/
- if (!F_ISSET(btree, WT_BTREE_NO_EVICTION))
+ if (!F_ISSET(btree, WT_BTREE_NO_EVICTION)) {
WT_WITH_BTREE(session, btree,
ret = __evict_walk_file(session, &slot, flags));
+ WT_ASSERT(session, session->split_gen == 0);
+ }
__wt_spin_unlock(session, &cache->evict_walk_lock);
@@ -1281,6 +1283,7 @@ __wt_evict_lru_page(WT_SESSION_IMPL *session, int is_app)
page->read_gen = __wt_cache_read_gen_set(session);
WT_WITH_BTREE(session, btree, ret = __wt_evict_page(session, ref));
+ WT_ASSERT(session, is_app || session->split_gen == 0);
(void)WT_ATOMIC_SUB4(btree->evict_busy, 1);
diff --git a/src/txn/txn.c b/src/txn/txn.c
index f958361a905..d6aa483c18a 100644
--- a/src/txn/txn.c
+++ b/src/txn/txn.c
@@ -322,6 +322,7 @@ __wt_txn_release(WT_SESSION_IMPL *session)
__wt_logrec_free(session, &txn->logrec);
/* Discard any memory from the session's split stash that we can. */
+ WT_ASSERT(session, session->split_gen == 0);
if (session->split_stash_cnt > 0)
__wt_split_stash_discard(session);