diff options
author | Michael Cahill <michael.cahill@mongodb.com> | 2016-06-06 15:33:04 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2016-06-06 15:33:04 +1000 |
commit | d58f67f7c6873592b0823dbe746340c43404ede3 (patch) | |
tree | 931ba0f9456a4e9a9341873dbb75d1dfebfaed65 | |
parent | 36b0757c3c0d0af725ebea4290f0302274f16646 (diff) | |
download | mongo-d58f67f7c6873592b0823dbe746340c43404ede3.tar.gz |
WT-2686 Report an error any time we fail to scan the log. (#2779)
Don't use a flag on the log structure: we may not have one if logging
is disabled, but we still scan log files if they exist.
-rw-r--r-- | src/include/log.h | 3 | ||||
-rw-r--r-- | src/log/log.c | 4 |
2 files changed, 1 insertions, 6 deletions
diff --git a/src/include/log.h b/src/include/log.h index 7655cfbb3e9..11cbfbb3639 100644 --- a/src/include/log.h +++ b/src/include/log.h @@ -256,9 +256,6 @@ struct __wt_log { #ifdef HAVE_DIAGNOSTIC uint64_t write_calls; /* Calls to log_write */ #endif - -#define WT_LOG_NOT_VERIFIED 0x1 /* Log just started */ - uint32_t flags; }; struct __wt_log_record { diff --git a/src/log/log.c b/src/log/log.c index 56e9f65f914..fd2b3444398 100644 --- a/src/log/log.c +++ b/src/log/log.c @@ -1090,7 +1090,6 @@ __wt_log_open(WT_SESSION_IMPL *session) logcount = 0; lastlog = 0; firstlog = UINT32_MAX; - F_SET(log, WT_LOG_NOT_VERIFIED); /* * Open up a file handle to the log directory if we haven't. @@ -1750,7 +1749,7 @@ err: WT_STAT_FAST_CONN_INCR(session, log_scans); * an error recovery is likely going to fail. Try to provide * a helpful failure message. */ - if (ret != 0 && F_ISSET(log, WT_LOG_NOT_VERIFIED)) { + if (ret != 0 && firstrecord) { __wt_errx(session, "WiredTiger is unable to read the recovery log."); __wt_errx(session, "This may be due to the log" @@ -1760,7 +1759,6 @@ err: WT_STAT_FAST_CONN_INCR(session, log_scans); " opened the database with the correct options including" " all encryption and compression options"); } - F_CLR(log, WT_LOG_NOT_VERIFIED); WT_TRET(__wt_fs_directory_list_free(session, &logfiles, logcount)); |