diff options
author | Luke Chen <luke.chen@mongodb.com> | 2018-01-05 22:07:41 +1100 |
---|---|---|
committer | Luke Chen <luke.chen@mongodb.com> | 2018-01-05 22:07:41 +1100 |
commit | bd9ed5bbe07754221ad014dceefc0ebdb0ecab32 (patch) | |
tree | 622a3cc94249954a7bf0757231c40792c9ef5378 /src/third_party/wiredtiger/src/include/txn.i | |
parent | 2158ea8d6c84c9a68b50f76c9dd23b8a193b65f8 (diff) | |
download | mongo-bd9ed5bbe07754221ad014dceefc0ebdb0ecab32.tar.gz |
Import wiredtiger: 9e5044823185feffa71e56a6593cfb92e0741a41 from branch mongodb-3.8
ref: 1a29eac4dc..9e50448231
for: 3.7.1
WT-2705 High throughput cache bound many threaded workloads can experience long latencies
WT-3725 Add statistics to locks around timestamp structures
WT-3750 Fast-path fs_directory_list of a single file.
WT-3768 Lookaside optimization: birthmarks
WT-3769 Fix a bug in reverse cursor walks with particular delete patterns and prefix compression enabled
WT-3779 Add support for string formats with WT_CURSOR::modify
WT-3800 test_wt2834_join_bloom_fix hang
WT-3806 Make sure rdtsc values move forward in time
WT-3807 clang static analysis updates
WT-3810 wt_rdtsc calibration needs to be longer and verify validity
WT-3812 debugging page output should handle complex key/value items.
WT-3816 Enable prefix compression on the lookaside table
WT-3819 clang static analysis improvements
WT-3820 Add a WT_SESSION.breakpoint method for Python debugging.
WT-3822 Update WiredTiger copyrights to 2018
WT-3824 tsc_nsec_ratio can compute to zero and cause divide by zero bug
Diffstat (limited to 'src/third_party/wiredtiger/src/include/txn.i')
-rw-r--r-- | src/third_party/wiredtiger/src/include/txn.i | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/third_party/wiredtiger/src/include/txn.i b/src/third_party/wiredtiger/src/include/txn.i index 1683ce8fbe2..360a6cf1edb 100644 --- a/src/third_party/wiredtiger/src/include/txn.i +++ b/src/third_party/wiredtiger/src/include/txn.i @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014-2017 MongoDB, Inc. + * Copyright (c) 2014-2018 MongoDB, Inc. * Copyright (c) 2008-2014 WiredTiger, Inc. * All rights reserved. * @@ -494,13 +494,25 @@ __wt_txn_upd_visible(WT_SESSION_IMPL *session, WT_UPDATE *upd) static inline WT_UPDATE * __wt_txn_read(WT_SESSION_IMPL *session, WT_UPDATE *upd) { - /* Skip reserved place-holders, they're never visible. */ - for (; upd != NULL; upd = upd->next) - if (upd->type != WT_UPDATE_RESERVED && + static WT_UPDATE tombstone = { + .txnid = WT_TXN_NONE, .type = WT_UPDATE_TOMBSTONE + }; + bool skipped_birthmark; + + for (skipped_birthmark = false; upd != NULL; upd = upd->next) { + /* Skip reserved place-holders, they're never visible. */ + if (upd->type != WT_UPDATE_RESERVE && __wt_txn_upd_visible(session, upd)) break; + /* An invisible birthmark is equivalent to a tombstone. */ + if (upd->type == WT_UPDATE_BIRTHMARK) + skipped_birthmark = true; + } + + if (upd == NULL && skipped_birthmark) + upd = &tombstone; - return (upd); + return (upd == NULL || upd->type == WT_UPDATE_BIRTHMARK ? NULL : upd); } /* |