diff options
author | Michael Cahill <michael.cahill@mongodb.com> | 2015-05-01 22:20:32 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2015-05-01 22:20:32 +1000 |
commit | 64f304ef5c13383d5989078541734b305f6a6400 (patch) | |
tree | 36f51141c7865c5e6f1ef2f4372b302bb519dcd0 /src/btree/bt_page.c | |
parent | 8b2b88a41c30dc1c175be9c53c8f3fef4ddf9165 (diff) | |
download | mongo-64f304ef5c13383d5989078541734b305f6a6400.tar.gz |
Don't start a transaction when reading a page if eviction is prohibited.
Fixes a deadlock introduced by WT-1912 but should also improve performance
generally.
Diffstat (limited to 'src/btree/bt_page.c')
-rw-r--r-- | src/btree/bt_page.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/btree/bt_page.c b/src/btree/bt_page.c index 8086806b3a4..57dd50a6064 100644 --- a/src/btree/bt_page.c +++ b/src/btree/bt_page.c @@ -181,8 +181,11 @@ __wt_page_in_func(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t flags skip_evict: /* * Check if we need an autocommit transaction. + * Starting a transaction can trigger eviction, so skip + * it if eviction isn't permitted. */ - return (__wt_txn_autocommit_check(session)); + return (LF_ISSET(WT_READ_NO_EVICT) ? 0 : + __wt_txn_autocommit_check(session)); WT_ILLEGAL_VALUE(session); } |