diff options
author | Michael Cahill <michael.cahill@mongodb.com> | 2016-11-16 21:10:29 +1100 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2016-11-16 21:10:29 +1100 |
commit | fb4ae3792065e98696e391ac1c4602216b8502cb (patch) | |
tree | 7d6ab84b45c4eb26bbe59e73a3950e9aa2233f41 /src/third_party/wiredtiger/src/include/txn.h | |
parent | 6904d0ac5ea4bba1822103eb4e7a623cc81de641 (diff) | |
download | mongo-fb4ae3792065e98696e391ac1c4602216b8502cb.tar.gz |
Import wiredtiger: ca6eee06ffdacc8e191987e64b3791740dad21e1 from branch mongodb-3.4
ref: 74430da40c..ca6eee06ff
for: 3.4.0
WT-2962 Provide a way to configure builtin extensions
WT-2984 Search of metadata for recently created collection gets WT_NOTFOUND
WT-3000 Missing log records in recovery when crashing after a log file switch
WT-3002 Allow applications to exempt threads from eviction.
WT-3004 lint: declare functions that don't return a value as void
WT-3011 __wt_curjoin_open() saves the wrong URI in the cursor.
WT-3012 Test format hanging on LSM configurations
WT-3015 Test format stuck with 2mb cache
WT-3016 Tests needed for systems without ftruncate
WT-3017 Hazard pointer race with page replace causes error
WT-3018 lint
WT-3020 LSM primary changes impact parallel-pop-lsm load time
WT-3022 LSM operations get stuck in __wt_clsm_await_switch waiting for switch on tree to complete
WT-3023 Test format hang on zSeries
WT-3024 wtperf medium-lsm-compact test can hang
Diffstat (limited to 'src/third_party/wiredtiger/src/include/txn.h')
-rw-r--r-- | src/third_party/wiredtiger/src/include/txn.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/third_party/wiredtiger/src/include/txn.h b/src/third_party/wiredtiger/src/include/txn.h index 8128e8e4cc2..344275e23d0 100644 --- a/src/third_party/wiredtiger/src/include/txn.h +++ b/src/third_party/wiredtiger/src/include/txn.h @@ -49,8 +49,11 @@ WT_ASSERT((s), (s)->txn.forced_iso > 0); \ (s)->txn.forced_iso--; \ WT_ASSERT((s), txn_state->id == saved_state.id && \ + (txn_state->metadata_pinned == saved_state.metadata_pinned ||\ + saved_state.metadata_pinned == WT_TXN_NONE) && \ (txn_state->pinned_id == saved_state.pinned_id || \ saved_state.pinned_id == WT_TXN_NONE)); \ + txn_state->metadata_pinned = saved_state.metadata_pinned; \ txn_state->pinned_id = saved_state.pinned_id; \ } while (0) @@ -67,6 +70,7 @@ struct __wt_named_snapshot { struct WT_COMPILER_TYPE_ALIGN(WT_CACHE_LINE_ALIGNMENT) __wt_txn_state { volatile uint64_t id; volatile uint64_t pinned_id; + volatile uint64_t metadata_pinned; }; struct __wt_txn_global { @@ -94,12 +98,18 @@ struct __wt_txn_global { * for a long time so we keep them out of regular visibility checks. * Eviction and checkpoint operations know when they need to be aware * of checkpoint transactions. + * + * We rely on the fact that (a) the only table a checkpoint updates is + * the metadata; and (b) once checkpoint has finished reading a table, + * it won't revisit it. */ volatile uint32_t checkpoint_id; /* Checkpoint's session ID */ - volatile uint64_t checkpoint_gen; - volatile uint64_t checkpoint_pinned; + volatile uint64_t checkpoint_gen; /* Checkpoint generation */ + volatile uint64_t checkpoint_pinned; /* Oldest ID for checkpoint */ volatile uint64_t checkpoint_txnid; /* Checkpoint's txn ID */ + volatile uint64_t metadata_pinned; /* Oldest ID for metadata */ + /* Named snapshot state. */ WT_RWLOCK *nsnap_rwlock; volatile uint64_t nsnap_oldest_id; |