diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2020-03-23 10:04:42 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-03-24 20:22:44 +0000 |
commit | edb8778350326d2b33f056b1b5f0b25a4b5b444a (patch) | |
tree | 15afcaa7a707be0872b764cd054aee55d855ba92 /src/mongo/db/repl/bgsync.cpp | |
parent | 51b338ad41653a8188adcc67b682ea12bbe63b4d (diff) | |
download | mongo-edb8778350326d2b33f056b1b5f0b25a4b5b444a.tar.gz |
SERVER-47040 LOGV2_FATAL also fasserts
Added LOGV2_FATAL_NOTRACE and LOGV2_CONTINUE to have different behavior.
Diffstat (limited to 'src/mongo/db/repl/bgsync.cpp')
-rw-r--r-- | src/mongo/db/repl/bgsync.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mongo/db/repl/bgsync.cpp b/src/mongo/db/repl/bgsync.cpp index fe6e56e5fff..0d25c62ca9f 100644 --- a/src/mongo/db/repl/bgsync.cpp +++ b/src/mongo/db/repl/bgsync.cpp @@ -216,11 +216,10 @@ void BackgroundSync::_run() { sleepmillis(100); // sleep a bit to keep from hammering this thread with temp. errors. } catch (const std::exception& e2) { // redact(std::exception&) doesn't work - LOGV2_FATAL(21127, + LOGV2_FATAL(28546, "sync producer exception: {error}", "Sync producer error", "error"_attr = redact(e2.what())); - fassertFailed(28546); } } // No need to reset optimes here because we are shutting down. @@ -784,10 +783,10 @@ void BackgroundSync::_runRollbackViaRecoverToCheckpoint( if (status.isOK()) { LOGV2(21105, "Rollback successful"); } else if (status == ErrorCodes::UnrecoverableRollbackError) { - LOGV2_FATAL(21128, - "Rollback failed with unrecoverable error: {error}", - "Rollback failed with unrecoverable error", - "error"_attr = status); + LOGV2_FATAL_CONTINUE(21128, + "Rollback failed with unrecoverable error: {error}", + "Rollback failed with unrecoverable error", + "error"_attr = status); fassertFailedWithStatusNoTrace(50666, status); } else { LOGV2_WARNING(21124, @@ -907,12 +906,11 @@ OpTime BackgroundSync::_readLastAppliedOpTime(OperationContext* opCtx) { } catch (const ExceptionForCat<ErrorCategory::ShutdownError>&) { throw; } catch (const DBException& ex) { - LOGV2_FATAL(21129, + LOGV2_FATAL(18904, "Problem reading {namespace}: {error}", "Problem reading from namespace", "namespace"_attr = NamespaceString::kRsOplogNamespace.ns(), "error"_attr = redact(ex)); - fassertFailed(18904); } OplogEntry parsedEntry(oplogEntry); |