summaryrefslogtreecommitdiff
path: root/src/txn
diff options
context:
space:
mode:
authorAlex Gorrod <alexg@wiredtiger.com>2014-11-07 05:45:07 +0000
committerAlex Gorrod <alexg@wiredtiger.com>2014-11-07 05:45:07 +0000
commit4ade9e2f84f5d33d0ce6621f33213bc81e4abd2c (patch)
tree53074081d0f2596794d70c566c2dd9946a231b55 /src/txn
parente74252edce9a20c1b62e6c20019f4325b51f34a1 (diff)
downloadmongo-4ade9e2f84f5d33d0ce6621f33213bc81e4abd2c.tar.gz
Flush checkpoint handles prior to taking schema lock.
This should save time when flushing again while holding the schema lock.
Diffstat (limited to 'src/txn')
-rw-r--r--src/txn/txn_ckpt.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/txn/txn_ckpt.c b/src/txn/txn_ckpt.c
index 555eec649c6..de69a8ea12a 100644
--- a/src/txn/txn_ckpt.c
+++ b/src/txn/txn_ckpt.c
@@ -282,6 +282,16 @@ __checkpoint_write_leaves(WT_SESSION_IMPL *session, const char *cfg[])
WT_WITH_DHANDLE(session, dhandle,
WT_TRET(__wt_session_release_btree(session)));
WT_ERR(ret);
+
+ /*
+ * Sync the current state of the file this should save some
+ * work while holding the schema lock.
+ */
+ if (F_ISSET(S2C(session), WT_CONN_CKPT_SYNC)) {
+ WT_WITH_DHANDLE(session, dhandle,
+ ret = __wt_checkpoint_sync(session, NULL));
+ WT_ERR(ret);
+ }
}
err: while (i < session->ckpt_handle_next) {