diff options
author | sueloverso <sue@mongodb.com> | 2017-02-08 01:53:18 -0500 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2017-02-08 17:53:18 +1100 |
commit | 2a59c1fd79ff98b89046404ccb756114d74fa5f4 (patch) | |
tree | c54a1515738a11ac957c641f0f2ed4f2bf06370e | |
parent | 2185e4206c238389665fa024c3f891160942c04d (diff) | |
download | mongo-2a59c1fd79ff98b89046404ccb756114d74fa5f4.tar.gz |
WT-3161 Panic on a write error in logging. (#3278)
It is not possible to continue without risking data loss.
-rw-r--r-- | src/log/log.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/log/log.c b/src/log/log.c index 1482cc0aca1..b07ef8c1bd5 100644 --- a/src/log/log.c +++ b/src/log/log.c @@ -62,6 +62,8 @@ static int __log_fs_write(WT_SESSION_IMPL *session, WT_LOGSLOT *slot, wt_off_t offset, size_t len, const void *buf) { + WT_DECL_RET; + /* * If we're writing into a new log file, we have to wait for all * writes to the previous log file to complete otherwise there could @@ -71,7 +73,10 @@ __log_fs_write(WT_SESSION_IMPL *session, __log_wait_for_earlier_slot(session, slot); WT_RET(__wt_log_force_sync(session, &slot->slot_release_lsn)); } - return (__wt_write(session, slot->slot_fh, offset, len, buf)); + if ((ret = __wt_write(session, slot->slot_fh, offset, len, buf)) != 0) + WT_PANIC_MSG(session, ret, + "%s: fatal log failure", slot->slot_fh->name); + return (ret); } /* |