diff options
author | Michael Cahill <michael.cahill@mongodb.com> | 2015-05-29 15:52:50 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2015-05-29 15:52:50 +1000 |
commit | 08779b412a1179c0b501843a2b1e660b0d096ab1 (patch) | |
tree | a6b3951890c5fa63846cc2c5dda5ce21c47af476 | |
parent | 0f3098e6ff3ad2ddfb2a03390b5b46515ecb7afb (diff) | |
download | mongo-08779b412a1179c0b501843a2b1e660b0d096ab1.tar.gz |
Fixes for cherry-pick merge failures.
-rw-r--r-- | dist/flags.py | 2 | ||||
-rw-r--r-- | src/evict/evict_page.c | 8 | ||||
-rw-r--r-- | src/include/flags.h | 2 | ||||
-rw-r--r-- | src/include/txn.i | 40 | ||||
-rw-r--r-- | src/log/log.c | 2 | ||||
-rw-r--r-- | src/txn/txn_ckpt.c | 4 | ||||
-rw-r--r-- | src/txn/txn_log.c | 2 |
7 files changed, 11 insertions, 49 deletions
diff --git a/dist/flags.py b/dist/flags.py index 34f3ab3e02f..b8d9e5db469 100644 --- a/dist/flags.py +++ b/dist/flags.py @@ -50,7 +50,7 @@ flags = { 'SKIP_UPDATE_RESTORE', ], 'txn_log_checkpoint' : [ - 'TXN_LOG_CKPT_FAIL', + 'TXN_LOG_CKPT_CLEANUP', 'TXN_LOG_CKPT_PREPARE', 'TXN_LOG_CKPT_START', 'TXN_LOG_CKPT_STOP', diff --git a/src/evict/evict_page.c b/src/evict/evict_page.c index c58827e0e4d..92ad8d296df 100644 --- a/src/evict/evict_page.c +++ b/src/evict/evict_page.c @@ -352,14 +352,14 @@ __evict_review( reconcile_flags = WT_EVICTING; if (__wt_page_is_modified(page)) { if (exclusive) - LF_SET(WT_SKIP_UPDATE_ERR); + FLD_SET(reconcile_flags, WT_SKIP_UPDATE_ERR); else if (!WT_PAGE_IS_INTERNAL(page) && page->read_gen == WT_READGEN_OLDEST) - LF_SET(WT_SKIP_UPDATE_RESTORE); - WT_RET(__wt_reconcile(session, ref, NULL, flags)); + FLD_SET(reconcile_flags, WT_SKIP_UPDATE_RESTORE); + WT_RET(__wt_reconcile(session, ref, NULL, reconcile_flags)); WT_ASSERT(session, !__wt_page_is_modified(page) || - LF_ISSET(WT_SKIP_UPDATE_RESTORE)); + FLD_ISSET(reconcile_flags, WT_SKIP_UPDATE_RESTORE)); } /* diff --git a/src/include/flags.h b/src/include/flags.h index 99c77c94f49..1d7173743e5 100644 --- a/src/include/flags.h +++ b/src/include/flags.h @@ -61,7 +61,7 @@ #define WT_SYNC_DISCARD 0x00000004 #define WT_SYNC_DISCARD_FORCE 0x00000008 #define WT_SYNC_WRITE_LEAVES 0x00000010 -#define WT_TXN_LOG_CKPT_FAIL 0x00000001 +#define WT_TXN_LOG_CKPT_CLEANUP 0x00000001 #define WT_TXN_LOG_CKPT_PREPARE 0x00000002 #define WT_TXN_LOG_CKPT_START 0x00000004 #define WT_TXN_LOG_CKPT_STOP 0x00000008 diff --git a/src/include/txn.i b/src/include/txn.i index 8212fe7fdd8..4ae80231c65 100644 --- a/src/include/txn.i +++ b/src/include/txn.i @@ -219,47 +219,9 @@ __wt_txn_read(WT_SESSION_IMPL *session, WT_UPDATE *upd) } /* - * __wt_txn_begin -- - * Begin a transaction. - */ -static inline int -__wt_txn_begin(WT_SESSION_IMPL *session, const char *cfg[]) -{ - WT_TXN *txn; - - txn = &session->txn; - txn->isolation = session->isolation; - txn->txn_logsync = S2C(session)->txn_logsync; - - if (cfg != NULL) - WT_RET(__wt_txn_config(session, cfg)); - - /* - * Allocate a snapshot if required. Named snapshot transactions already - * have an ID setup. - */ - if (txn->isolation == WT_ISO_SNAPSHOT && - !F_ISSET(txn, WT_TXN_NAMED_SNAPSHOT)) { - if (session->ncursors > 0) - WT_RET(__wt_session_copy_values(session)); - - /* - * We're about to allocate a snapshot: if we need to block for - * eviction, it's better to do it beforehand. - */ - WT_RET(__wt_cache_full_check(session)); - - __wt_txn_get_snapshot(session); - } - - F_SET(txn, WT_TXN_RUNNING); - return (0); -} - -/* * __wt_txn_autocommit_check -- * If an auto-commit transaction is required, start one. -*/ + */ static inline int __wt_txn_autocommit_check(WT_SESSION_IMPL *session) { diff --git a/src/log/log.c b/src/log/log.c index e6f0ea6d1ab..b63038b976e 100644 --- a/src/log/log.c +++ b/src/log/log.c @@ -65,7 +65,7 @@ __wt_log_force_sync(WT_SESSION_IMPL *session, WT_LSN *min_lsn) /* * Sync the log file if needed. */ - if (WT_LOG_CMP(&log->sync_lsn, min_lsn) < 0) { + if (LOG_CMP(&log->sync_lsn, min_lsn) < 0) { WT_ERR(__wt_verbose(session, WT_VERB_LOG, "log_force_sync: sync to LSN %d/%lu", min_lsn->file, min_lsn->offset)); diff --git a/src/txn/txn_ckpt.c b/src/txn/txn_ckpt.c index 3954e22583c..1361b1a6682 100644 --- a/src/txn/txn_ckpt.c +++ b/src/txn/txn_ckpt.c @@ -353,14 +353,14 @@ __wt_txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[]) { WT_CONFIG_BASE(session, session_begin_transaction), "isolation=snapshot", NULL }; void *saved_meta_next; - int full, logging, tracking; + int full, idle, logging, tracking; u_int i; conn = S2C(session); txn_global = &conn->txn_global; saved_isolation = session->isolation; txn = &session->txn; - full = logging = tracking = 0; + full = idle = logging = tracking = 0; /* Ensure the metadata table is open before taking any locks. */ WT_RET(__wt_metadata_open(session)); diff --git a/src/txn/txn_log.c b/src/txn/txn_log.c index e87c3cf0e3c..1f19dcfc3ac 100644 --- a/src/txn/txn_log.c +++ b/src/txn/txn_log.c @@ -361,7 +361,7 @@ __wt_txn_checkpoint_log( WT_ERR(__wt_log_ckpt(session, ckpt_lsn)); /* FALLTHROUGH */ - case WT_TXN_LOG_CKPT_FAIL: + case WT_TXN_LOG_CKPT_CLEANUP: /* Cleanup any allocated resources */ WT_INIT_LSN(ckpt_lsn); txn->ckpt_nsnapshot = 0; |