diff options
author | Michael Cahill <michael.cahill@mongodb.com> | 2016-04-18 13:28:34 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2016-04-20 16:39:01 +1000 |
commit | 2389dbb24ccad4a4eb06bd9418fc56d0da51f58c (patch) | |
tree | e76537633ab5103aa8201291c008c4806a36d9a0 /src/txn/txn_ckpt.c | |
parent | eb8080b6eeca88bd6c3ee1faf40d487067cab01c (diff) | |
download | mongo-2389dbb24ccad4a4eb06bd9418fc56d0da51f58c.tar.gz |
WT-2560 Use a rwlock to protect transaction state, don't spin.
Diffstat (limited to 'src/txn/txn_ckpt.c')
-rw-r--r-- | src/txn/txn_ckpt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/txn/txn_ckpt.c b/src/txn/txn_ckpt.c index 27e18b254b8..d5c9137c11e 100644 --- a/src/txn/txn_ckpt.c +++ b/src/txn/txn_ckpt.c @@ -404,7 +404,7 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[]) * This is particularly important for compact, so that all dirty pages * can be fully written. */ - __wt_txn_update_oldest(session, true); + WT_ERR(__wt_txn_update_oldest(session, true)); /* Flush data-sources before we start the checkpoint. */ WT_ERR(__checkpoint_data_source(session, cfg)); @@ -1281,7 +1281,7 @@ __wt_checkpoint_close(WT_SESSION_IMPL *session, bool final) * for active readers. */ if (!btree->modified && !bulk) { - __wt_txn_update_oldest(session, true); + WT_RET(__wt_txn_update_oldest(session, true)); return (__wt_txn_visible_all(session, btree->rec_max_txn) ? __wt_cache_op(session, WT_SYNC_DISCARD) : EBUSY); } |