diff options
author | Michael Cahill <michael.cahill@wiredtiger.com> | 2013-01-09 16:13:30 +1100 |
---|---|---|
committer | Michael Cahill <michael.cahill@wiredtiger.com> | 2013-01-09 16:13:30 +1100 |
commit | 4c6722d417573d57c979f23205b942f7ac010cab (patch) | |
tree | d130b8e3f43e4803f9cfd9b0da4011472b0d283b | |
parent | b23b5454d9814d6ab55e113f865ceb62adf6336c (diff) | |
download | mongo-4c6722d417573d57c979f23205b942f7ac010cab.tar.gz |
Don't deadlock just because a checkpoint is in progress.
-rw-r--r-- | src/btree/rec_evict.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/btree/rec_evict.c b/src/btree/rec_evict.c index d48f39e02ac..34e53da1a5b 100644 --- a/src/btree/rec_evict.c +++ b/src/btree/rec_evict.c @@ -390,7 +390,15 @@ __rec_review(WT_SESSION_IMPL *session, WT_VERBOSE_RET(session, evict, "eviction failed, reconciled page not clean"); + /* + * A pathological case: if we're in the middle of a + * transaction and we're stuck trying to find space, + * abort the transaction to give up all hazard + * references before trying again. Don't fail while + * a checkpoint is running: we know that will pass. + */ if (F_ISSET(txn, TXN_RUNNING) && + !btree->checkpointing && ++txn->eviction_fails >= 100) { txn->eviction_fails = 0; ret = WT_DEADLOCK; |