summaryrefslogtreecommitdiff
path: root/src/conn
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2016-04-21 09:24:26 +1000
committerMichael Cahill <michael.cahill@mongodb.com>2016-04-21 09:24:26 +1000
commit0369589555874293f334a95efebfec37604a9eae (patch)
treebae87223dd736e9e33730f8ad5e6ef11f2968307 /src/conn
parent66f465d4e626979eb22e7f1f49db9054be9b05b1 (diff)
downloadmongo-0369589555874293f334a95efebfec37604a9eae.tar.gz
WT-2567 Review comments on style.
Diffstat (limited to 'src/conn')
-rw-r--r--src/conn/conn_log.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/conn/conn_log.c b/src/conn/conn_log.c
index 5e95ecfba05..672071b59bf 100644
--- a/src/conn/conn_log.c
+++ b/src/conn/conn_log.c
@@ -316,12 +316,13 @@ __wt_log_truncate_files(
conn = S2C(session);
if (!FLD_ISSET(conn->log_flags, WT_CONN_LOG_ENABLED))
return (0);
- log = conn->log;
if (F_ISSET(conn, WT_CONN_SERVER_RUN) &&
FLD_ISSET(conn->log_flags, WT_CONN_LOG_ARCHIVE))
WT_RET_MSG(session, EINVAL,
"Attempt to archive manually while a server is running");
+ log = conn->log;
+
backup_file = 0;
if (cursor != NULL)
backup_file = WT_CURSOR_BACKUP_ID(cursor);
@@ -329,6 +330,7 @@ __wt_log_truncate_files(
WT_RET(__wt_verbose(session, WT_VERB_LOG,
"log_truncate_files: Archive once up to %" PRIu32,
backup_file));
+
WT_RET(__wt_writelock(session, log->log_archive_lock));
locked = true;
WT_ERR(__log_archive_once(session, backup_file));