diff options
author | Dianna Hohensee <dianna.hohensee@mongodb.com> | 2021-12-06 17:29:01 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-12-06 17:53:08 +0000 |
commit | ce6aa8504efc89566558eba86bb753076b36472c (patch) | |
tree | 7a68be7a54ba0e174f507de3885913d6403f8e2e | |
parent | 8c82e865d31fe143173753689bca0170bd715250 (diff) | |
download | mongo-ce6aa8504efc89566558eba86bb753076b36472c.tar.gz |
SERVER-61484 JournalFlusher should log a warning on ExceededMemoryLimit errors rather than crash
-rw-r--r-- | src/mongo/db/storage/control/journal_flusher.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mongo/db/storage/control/journal_flusher.cpp b/src/mongo/db/storage/control/journal_flusher.cpp index 60cceb00b63..212f51cd88f 100644 --- a/src/mongo/db/storage/control/journal_flusher.cpp +++ b/src/mongo/db/storage/control/journal_flusher.cpp @@ -116,11 +116,7 @@ void JournalFlusher::run() { // Signal the waiters that a round completed. _currentSharedPromise->emplaceValue(); } catch (const AssertionException& e) { - invariant(ErrorCodes::isShutdownError(e.code()) || - e.code() == ErrorCodes::InterruptedDueToReplStateChange || - e.code() == ErrorCodes::Interrupted, // Can be caused by killOp. - e.toString()); - + // Can be caused by killOp. if (e.code() == ErrorCodes::Interrupted) { // This thread should not be affected by killOp. Therefore, the thread will // immediately restart the journal flush without sending errors to waiting callers. @@ -133,6 +129,12 @@ void JournalFlusher::run() { continue; } + // We want to log errors for debugability. + LOGV2_WARNING( + 6148401, + "The JournalFlusher encountered an error attempting to flush data to disk", + "JournalFlusherError"_attr = e.toString()); + // Signal the waiters that the fsync was interrupted. _currentSharedPromise->setError(e.toStatus()); } |