diff options
author | Michael Cahill <michael.cahill@wiredtiger.com> | 2014-02-28 17:11:36 +1100 |
---|---|---|
committer | Michael Cahill <michael.cahill@wiredtiger.com> | 2014-02-28 17:11:36 +1100 |
commit | f4d2c0ff304259e3d34d9dcbe59d8432c0a250f3 (patch) | |
tree | 32768d8e99742f40b368e67d4550ce12b730668c /src/include/txn.i | |
parent | ad9de86fe52aa32ea67e25864fa3eb6c072abc87 (diff) | |
download | mongo-f4d2c0ff304259e3d34d9dcbe59d8432c0a250f3.tar.gz |
Fix another bug regarding when pages can be evicted: have reconcilition track the maximum transaction ID on the page (regardless of whether it is skipped). A page can only be evicted when it is clean and has no updates that are too new.
refs #884
Diffstat (limited to 'src/include/txn.i')
-rw-r--r-- | src/include/txn.i | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/include/txn.i b/src/include/txn.i index 8ec1f52bff4..0c51751ccd2 100644 --- a/src/include/txn.i +++ b/src/include/txn.i @@ -170,17 +170,22 @@ __wt_txn_visible(WT_SESSION_IMPL *session, uint64_t id) * and report whether there are an uncommitted changes in the list. */ static inline WT_UPDATE * -__wt_txn_read_skip(WT_SESSION_IMPL *session, WT_UPDATE *upd, int *skipp) +__wt_txn_read_skip( + WT_SESSION_IMPL *session, WT_UPDATE *upd, uint64_t *max_txn, int *skipp) { WT_UPDATE *first_upd; *skipp = 0; for (first_upd = NULL; upd != NULL; upd = upd->next) if (upd->txnid != WT_TXN_ABORTED) { - if (!__wt_txn_visible(session, upd->txnid)) - *skipp = 1; - else if (first_upd == NULL) - first_upd = upd; + if (TXNID_LT(*max_txn, upd->txnid)) + *max_txn = upd->txnid; + if (first_upd == NULL) { + if (__wt_txn_visible(session, upd->txnid)) + first_upd = upd; + else + *skipp = 1; + } } return (first_upd); |