summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsueloverso <sue@mongodb.com>2015-01-26 19:36:24 -0500
committersueloverso <sue@mongodb.com>2015-01-26 19:36:24 -0500
commit6061d9b21e0d0f586e5ddd0c27458d5d9f2906cf (patch)
tree6de16c27d7171f1b2cb5f698ada844aedad0b415
parent13ab5da875bbc700f84d8593fe3d95c51536a540 (diff)
parentc2e108e2774ae79504579bcdca33f26fcff8cb07 (diff)
downloadmongo-6061d9b21e0d0f586e5ddd0c27458d5d9f2906cf.tar.gz
Merge pull request #1603 from wiredtiger/recovery-assertion
Change recovery to start from the checkpoint LSN in the metadata
-rw-r--r--src/txn/txn_recover.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/txn/txn_recover.c b/src/txn/txn_recover.c
index b2515e3c8cd..62890db7895 100644
--- a/src/txn/txn_recover.c
+++ b/src/txn/txn_recover.c
@@ -452,12 +452,17 @@ __wt_txn_recover(WT_SESSION_IMPL *session)
if (WT_IS_INIT_LSN(&metafile->ckpt_lsn))
WT_ERR(__wt_log_scan(session,
NULL, WT_LOGSCAN_FIRST, __txn_log_recover, &r));
- else
+ else {
+ /*
+ * Start at the last checkpoint LSN referenced in the
+ * metadata. If we see the end of a checkpoint while
+ * scanning, we will change the full scan to start from
+ * there.
+ */
+ r.ckpt_lsn = metafile->ckpt_lsn;
WT_ERR(__wt_log_scan(session,
&metafile->ckpt_lsn, 0, __txn_log_recover, &r));
-
- WT_ASSERT(session,
- LOG_CMP(&r.ckpt_lsn, &conn->log->first_lsn) >= 0);
+ }
}
/* Scan the metadata to find the live files and their IDs. */