summaryrefslogtreecommitdiff
path: root/src/txn
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2015-05-28 15:29:46 +1000
committerMichael Cahill <michael.cahill@mongodb.com>2015-05-29 15:44:06 +1000
commitd805b6cdbe986f9c95bb97521e17fd8f00c768be (patch)
tree7234da28312720c2c8d2e5c782e33a8e3ea6063f /src/txn
parent0642c315daa703f539d20ddd6bcdb1247837f3a7 (diff)
downloadmongo-d805b6cdbe986f9c95bb97521e17fd8f00c768be.tar.gz
Merge pull request #2000 from wiredtiger/auto-txn-logsync
If we have no config, explicitly check for flushing and clear txn_logsync (cherry picked from commit 476a20e6dc6135df1cafa9df39e4533ddf6718a8)
Diffstat (limited to 'src/txn')
-rw-r--r--src/txn/txn.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/txn/txn.c b/src/txn/txn.c
index a1bec569ce7..c838785a9c3 100644
--- a/src/txn/txn.c
+++ b/src/txn/txn.c
@@ -286,10 +286,13 @@ __wt_txn_begin(WT_SESSION_IMPL *session, const char *cfg[])
* The default sync setting is inherited from the connection, but can
* be overridden by an explicit "sync" setting for this transaction.
*
+ * If the flush flag is not set, then either the connection-wide
+ * transaction sync is disabled (the default), or this transaction was
+ * configured with sync=false. Either way, if we are not flushing,
+ * clear all flags that cause the log write to flush.
+ *
* !!! This is an unusual use of the config code: the "default" value
- * we pass in is inherited from the connection. If flush is not set in
- * the connection-wide flag and not overridden here, we end up clearing
- * all flags.
+ * we pass in is inherited from the connection.
*/
txn->txn_logsync = S2C(session)->txn_logsync;
WT_RET(__wt_config_gets_def(session, cfg, "sync",