diff options
author | Keith Bostic <keith.bostic@mongodb.com> | 2015-09-16 08:17:00 -0400 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2015-09-18 12:33:50 +1000 |
commit | 08e884609d9be6bcff8bb580e3ce85ef2b5a6b5d (patch) | |
tree | b4382a87f70c5138acc36e4f3b3448b75dd153dc | |
parent | 828b4fffb727a419360a631cdd392dad005ca5e8 (diff) | |
download | mongo-08e884609d9be6bcff8bb580e3ce85ef2b5a6b5d.tar.gz |
WT-2042 Only try to evict tombstones that are visible to all readers.
Merge pull request #2196 from wiredtiger/WT-2042
(cherry picked from commit 5ab26af636f8c6a5a86200d1c18f249d0749fc9a)
-rw-r--r-- | src/btree/bt_curnext.c | 12 | ||||
-rw-r--r-- | src/btree/bt_curprev.c | 12 |
2 files changed, 16 insertions, 8 deletions
diff --git a/src/btree/bt_curnext.c b/src/btree/bt_curnext.c index d80a5f4740d..5e866dc9233 100644 --- a/src/btree/bt_curnext.c +++ b/src/btree/bt_curnext.c @@ -144,7 +144,8 @@ new_page: if (cbt->ins == NULL) if ((upd = __wt_txn_read(session, cbt->ins->upd)) == NULL) continue; if (WT_UPDATE_DELETED_ISSET(upd)) { - ++cbt->page_deleted_count; + if (__wt_txn_visible_all(session, upd->txnid)) + ++cbt->page_deleted_count; continue; } val->data = WT_UPDATE_DATA(upd); @@ -200,7 +201,8 @@ new_page: /* Find the matching WT_COL slot. */ NULL : __wt_txn_read(session, cbt->ins->upd); if (upd != NULL) { if (WT_UPDATE_DELETED_ISSET(upd)) { - ++cbt->page_deleted_count; + if (__wt_txn_visible_all(session, upd->txnid)) + ++cbt->page_deleted_count; continue; } @@ -285,7 +287,8 @@ new_insert: if ((ins = cbt->ins) != NULL) { if ((upd = __wt_txn_read(session, ins->upd)) == NULL) continue; if (WT_UPDATE_DELETED_ISSET(upd)) { - ++cbt->page_deleted_count; + if (__wt_txn_visible_all(session, upd->txnid)) + ++cbt->page_deleted_count; continue; } key->data = WT_INSERT_KEY(ins); @@ -317,7 +320,8 @@ new_insert: if ((ins = cbt->ins) != NULL) { rip = &page->pg_row_d[cbt->slot]; upd = __wt_txn_read(session, WT_ROW_UPDATE(page, rip)); if (upd != NULL && WT_UPDATE_DELETED_ISSET(upd)) { - ++cbt->page_deleted_count; + if (__wt_txn_visible_all(session, upd->txnid)) + ++cbt->page_deleted_count; continue; } diff --git a/src/btree/bt_curprev.c b/src/btree/bt_curprev.c index f1ca81ee145..08388938080 100644 --- a/src/btree/bt_curprev.c +++ b/src/btree/bt_curprev.c @@ -281,7 +281,8 @@ new_page: if (cbt->ins == NULL) if ((upd = __wt_txn_read(session, cbt->ins->upd)) == NULL) continue; if (WT_UPDATE_DELETED_ISSET(upd)) { - ++cbt->page_deleted_count; + if (__wt_txn_visible_all(session, upd->txnid)) + ++cbt->page_deleted_count; continue; } val->data = WT_UPDATE_DATA(upd); @@ -338,7 +339,8 @@ new_page: if (cbt->recno < page->pg_var_recno) NULL : __wt_txn_read(session, cbt->ins->upd); if (upd != NULL) { if (WT_UPDATE_DELETED_ISSET(upd)) { - ++cbt->page_deleted_count; + if (__wt_txn_visible_all(session, upd->txnid)) + ++cbt->page_deleted_count; continue; } @@ -434,7 +436,8 @@ new_insert: if ((ins = cbt->ins) != NULL) { if ((upd = __wt_txn_read(session, ins->upd)) == NULL) continue; if (WT_UPDATE_DELETED_ISSET(upd)) { - ++cbt->page_deleted_count; + if (__wt_txn_visible_all(session, upd->txnid)) + ++cbt->page_deleted_count; continue; } key->data = WT_INSERT_KEY(ins); @@ -468,7 +471,8 @@ new_insert: if ((ins = cbt->ins) != NULL) { rip = &page->pg_row_d[cbt->slot]; upd = __wt_txn_read(session, WT_ROW_UPDATE(page, rip)); if (upd != NULL && WT_UPDATE_DELETED_ISSET(upd)) { - ++cbt->page_deleted_count; + if (__wt_txn_visible_all(session, upd->txnid)) + ++cbt->page_deleted_count; continue; } |