3333
3434#include " mongo/db/repl/oplog.h"
3535
36+ #include < fmt/format.h>
37+
3638#include < deque>
3739#include < memory>
3840#include < set>
@@ -109,6 +111,8 @@ using IndexVersion = IndexDescriptor::IndexVersion;
109111namespace repl {
110112namespace {
111113
114+ using namespace fmt ::literals;
115+
112116MONGO_FAIL_POINT_DEFINE (sleepBetweenInsertOpTimeGenerationAndLogOp);
113117
114118// Failpoint to block after a write and its oplog entry have been written to the storage engine and
@@ -1642,6 +1646,10 @@ Status applyCommand_inlock(OperationContext* opCtx,
16421646 IndexBuildsCoordinator::get (opCtx)->awaitNoBgOpInProgForDb (nss.db ());
16431647 opCtx->recoveryUnit ()->abandonSnapshot ();
16441648 opCtx->checkForInterrupt ();
1649+
1650+ LOG (1 )
1651+ << " Acceptable error during oplog application: background operation in progress for DB '{}' from oplog entry {}" _format (
1652+ nss.db (), redact (entry.toBSON ()));
16451653 break ;
16461654 }
16471655 case ErrorCodes::BackgroundOperationInProgressForNamespace: {
@@ -1664,6 +1672,10 @@ Status applyCommand_inlock(OperationContext* opCtx,
16641672
16651673 opCtx->recoveryUnit ()->abandonSnapshot ();
16661674 opCtx->checkForInterrupt ();
1675+
1676+ LOG (1 )
1677+ << " Acceptable error during oplog application: background operation in progress for ns '{}' from oplog entry {}" _format (
1678+ ns, redact (entry.toBSON ()));
16671679 break ;
16681680 }
16691681 default : {
@@ -1672,6 +1684,10 @@ Status applyCommand_inlock(OperationContext* opCtx,
16721684 << " with status " << status << " during oplog application" ;
16731685 return status;
16741686 }
1687+
1688+ LOG (1 )
1689+ << " Acceptable error during oplog application on db '{}' with status '{}' from oplog entry {}" _format (
1690+ nss.db (), status.toString (), redact (entry.toBSON ()));
16751691 }
16761692 // fallthrough
16771693 case ErrorCodes::OK:
0 commit comments