Skip to content

Commit cea81ca

Browse files
siyingfacebook-github-bot
authored andcommitted
Disabling some IO error assertion in EnvLogger (facebook#11314)
Summary: Right now, EnvLogger has the same IO error assertion as most other places: if we are writing to the file after we've seen an IO error, the assertion would trigger. This is too strict for info logger: we would not fail DB if info logger fails and we would try the best to continue logging. For now, we simplify the problem by disabling the assertion for EnvLogger. Pull Request resolved: facebook#11314 Test Plan: Run env_logger_test to make sure at least it doesn't fail in normal cases. Reviewed By: anand1976 Differential Revision: D44227732 fbshipit-source-id: e3d31a221a5757f018a67ccaa96dcf89eb981f66
1 parent 8c44540 commit cea81ca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

logging/env_logger.h

+2
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ class EnvLogger : public Logger {
7676
if (flush_pending_) {
7777
flush_pending_ = false;
7878
file_.Flush().PermitUncheckedError();
79+
file_.reset_seen_error();
7980
}
8081
last_flush_micros_ = clock_->NowMicros();
8182
}
@@ -162,6 +163,7 @@ class EnvLogger : public Logger {
162163
FileOpGuard guard(*this);
163164
// We will ignore any error returned by Append().
164165
file_.Append(Slice(base, p - base)).PermitUncheckedError();
166+
file_.reset_seen_error();
165167
flush_pending_ = true;
166168
const uint64_t now_micros = clock_->NowMicros();
167169
if (now_micros - last_flush_micros_ >= flush_every_seconds_ * 1000000) {

0 commit comments

Comments
 (0)