summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2012-10-10 16:26:21 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2012-10-10 16:26:21 +1100
commit080d0c5d08ad33793fd8d1a07e975f8d62921be8 (patch)
treece99ebddf270b1566d204992b8f81cdabceef4fa
parent75498f1b4ce9c4d34702243becac59fab305ff2b (diff)
downloadmongo-080d0c5d08ad33793fd8d1a07e975f8d62921be8.tar.gz
If an application thread helps with eviction before it has a transaction context, release the snapshot it creates when eviction is done.
-rw-r--r--src/btree/bt_evict.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/btree/bt_evict.c b/src/btree/bt_evict.c
index a8c019f52f4..2362c5687b3 100644
--- a/src/btree/bt_evict.c
+++ b/src/btree/bt_evict.c
@@ -335,7 +335,8 @@ __evict_page(WT_SESSION_IMPL *session, WT_PAGE *page)
WT_ASSERT(session, txn->snapshot == NULL ||
txn->snapshot != saved_txn.snapshot);
__wt_txn_destroy(session);
- }
+ } else
+ __wt_txn_release_snapshot(session);
*txn = saved_txn;
return (ret);