summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/insert_group.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/insert_group.cpp')
-rw-r--r--src/mongo/db/repl/insert_group.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/repl/insert_group.cpp b/src/mongo/db/repl/insert_group.cpp
index 24acf95b0d2..931ca0d3367 100644
--- a/src/mongo/db/repl/insert_group.cpp
+++ b/src/mongo/db/repl/insert_group.cpp
@@ -40,6 +40,7 @@
#include "mongo/db/ops/write_ops.h"
#include "mongo/db/repl/oplog_applier_impl.h"
#include "mongo/db/repl/oplog_entry.h"
+#include "mongo/logv2/log.h"
#include "mongo/util/assert_util.h"
#include "mongo/util/log.h"
@@ -139,9 +140,9 @@ StatusWith<InsertGroup::ConstIterator> InsertGroup::groupAndApplyInserts(ConstIt
// It's not an error during initial sync to encounter DuplicateKey errors.
if (Mode::kInitialSync == _mode && ErrorCodes::DuplicateKey == status) {
- LOG(2) << status;
+ LOGV2_DEBUG(21203, 2, "{status}", "status"_attr = status);
} else {
- error() << status;
+ LOGV2_ERROR(21204, "{status}", "status"_attr = status);
}
// Avoid quadratic run time from failed insert by not retrying until we