diff options
-rw-r--r-- | src/conn/conn_log.c | 3 | ||||
-rw-r--r-- | src/txn/txn_log.c | 8 |
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 */ |