summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2015-09-15 11:04:16 +1000
committerMichael Cahill <michael.cahill@mongodb.com>2015-09-28 16:35:32 +1000
commitffb29c7576ed162fe9ba119fd6d1936da6acf385 (patch)
treea4832ec7fd1acbaf088becd2ff6f76b5659e383b
parent8e212cf8907a5d2462dead47aebcce074dd3c066 (diff)
downloadmongo-ffb29c7576ed162fe9ba119fd6d1936da6acf385.tar.gz
WT-2101 Don't update the logging ckpt_lsn on clean shutdown.
Merge pull request #2190 from wiredtiger/wt-2101 (cherry picked from commit 41db2ee37d11b0a885fc883dbcb2a92394e598d1)
-rw-r--r--src/conn/conn_log.c3
-rw-r--r--src/txn/txn_log.c8
2 files changed, 7 insertions, 4 deletions
diff --git a/src/conn/conn_log.c b/src/conn/conn_log.c
index 1e5e322016c..65e0f684382 100644
--- a/src/conn/conn_log.c
+++ b/src/conn/conn_log.c
@@ -145,10 +145,9 @@ __log_archive_once(WT_SESSION_IMPL *session, uint32_t backup_file)
for (i = 0; i < logcount; i++) {
WT_ERR(__wt_log_extract_lognum(
session, logfiles[i], &lognum));
- if (lognum < min_lognum) {
+ if (lognum < min_lognum)
WT_ERR(__wt_log_remove(
session, WT_LOG_FILENAME, lognum));
- }
}
}
__wt_spin_unlock(session, &conn->hot_backup_lock);
diff --git a/src/txn/txn_log.c b/src/txn/txn_log.c
index 634f8a9c803..26c1d7ba415 100644
--- a/src/txn/txn_log.c
+++ b/src/txn/txn_log.c
@@ -355,9 +355,13 @@ __wt_txn_checkpoint_log(
/*
* If this full checkpoint completed successfully and there is
* no hot backup in progress, tell the logging subsystem the
- * checkpoint LSN so that it can archive.
+ * checkpoint LSN so that it can archive. Do not update the
+ * logging checkpoint LSN if this is during a clean connection
+ * close, only during a full checkpoint. A clean close may not
+ * update any metadata LSN and we do not want to archive in
+ * that case.
*/
- if (!S2C(session)->hot_backup)
+ if (!S2C(session)->hot_backup && txn->full_ckpt)
WT_ERR(__wt_log_ckpt(session, ckpt_lsn));
/* FALLTHROUGH */