diff options
author | Susan LoVerso <sue@wiredtiger.com> | 2014-12-02 11:24:55 -0500 |
---|---|---|
committer | Susan LoVerso <sue@wiredtiger.com> | 2014-12-02 11:24:55 -0500 |
commit | 91e2e694ed558b66b6a9561e4dc5c74edaca7edf (patch) | |
tree | 263cf273d2ec4d2dde6164dd8e9153586cec6dbe /src/txn | |
parent | e1c185dd64706dbbb650e3d5abf32cd79a8b1d7a (diff) | |
download | mongo-91e2e694ed558b66b6a9561e4dc5c74edaca7edf.tar.gz |
Make pre-alloc a boolean and convert connection log settings to flags.
Diffstat (limited to 'src/txn')
-rw-r--r-- | src/txn/txn.c | 4 | ||||
-rw-r--r-- | src/txn/txn_ckpt.c | 8 | ||||
-rw-r--r-- | src/txn/txn_log.c | 3 |
3 files changed, 8 insertions, 7 deletions
diff --git a/src/txn/txn.c b/src/txn/txn.c index 48cdc1c08be..f958361a905 100644 --- a/src/txn/txn.c +++ b/src/txn/txn.c @@ -357,8 +357,8 @@ __wt_txn_commit(WT_SESSION_IMPL *session, const char *cfg[]) (WT_SESSION *)session, txn->id, 1)); /* If we are logging, write a commit log record. */ - if (ret == 0 && - txn->mod_count > 0 && S2C(session)->logging && + if (ret == 0 && txn->mod_count > 0 && + FLD_ISSET(S2C(session)->log_flags, WT_CONN_LOG_ENABLED) && !F_ISSET(session, WT_SESSION_NO_LOGGING)) ret = __wt_txn_log_commit(session, cfg); diff --git a/src/txn/txn_ckpt.c b/src/txn/txn_ckpt.c index 9254692ea93..e149cdeaa15 100644 --- a/src/txn/txn_ckpt.c +++ b/src/txn/txn_ckpt.c @@ -376,7 +376,7 @@ __wt_txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[]) tracking = 1; /* Tell logging that we are about to start a database checkpoint. */ - if (conn->logging && full) + if (FLD_ISSET(conn->log_flags, WT_CONN_LOG_ENABLED) && full) WT_ERR(__wt_txn_checkpoint_log( session, full, WT_TXN_LOG_CKPT_PREPARE, NULL)); @@ -392,7 +392,7 @@ __wt_txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[]) WT_ERR(__wt_txn_begin(session, txn_cfg)); /* Tell logging that we have started a database checkpoint. */ - if (conn->logging && full) { + if (FLD_ISSET(conn->log_flags, WT_CONN_LOG_ENABLED) && full) { WT_ERR(__wt_txn_checkpoint_log( session, full, WT_TXN_LOG_CKPT_START, NULL)); logging = 1; @@ -877,7 +877,7 @@ __checkpoint_worker( WT_FULL_BARRIER(); /* Tell logging that a file checkpoint is starting. */ - if (conn->logging) + if (FLD_ISSET(conn->log_flags, WT_CONN_LOG_ENABLED)) WT_ERR(__wt_txn_checkpoint_log( session, 0, WT_TXN_LOG_CKPT_START, &ckptlsn)); @@ -914,7 +914,7 @@ fake: /* Update the object's metadata. */ } /* Tell logging that the checkpoint is complete. */ - if (conn->logging) + if (FLD_ISSET(conn->log_flags, WT_CONN_LOG_ENABLED)) WT_ERR(__wt_txn_checkpoint_log( session, 0, WT_TXN_LOG_CKPT_STOP, NULL)); diff --git a/src/txn/txn_log.c b/src/txn/txn_log.c index 03a71056a9a..2ca0dfd0aee 100644 --- a/src/txn/txn_log.c +++ b/src/txn/txn_log.c @@ -138,7 +138,8 @@ __wt_txn_log_op(WT_SESSION_IMPL *session, WT_CURSOR_BTREE *cbt) WT_TXN *txn; WT_TXN_OP *op; - if (!S2C(session)->logging || F_ISSET(session, WT_SESSION_NO_LOGGING)) + if (!FLD_ISSET(S2C(session)->log_flags, WT_CONN_LOG_ENABLED) || + F_ISSET(session, WT_SESSION_NO_LOGGING)) return (0); txn = &session->txn; |