summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/dbcheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/dbcheck.cpp')
-rw-r--r--src/mongo/db/repl/dbcheck.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mongo/db/repl/dbcheck.cpp b/src/mongo/db/repl/dbcheck.cpp
index 58baed702e4..7cca8b6a1d2 100644
--- a/src/mongo/db/repl/dbcheck.cpp
+++ b/src/mongo/db/repl/dbcheck.cpp
@@ -39,6 +39,7 @@
#include "mongo/db/db_raii.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/query/internal_plans.h"
+#include "mongo/db/record_id_helpers.h"
#include "mongo/db/repl/dbcheck.h"
#include "mongo/db/repl/dbcheck_gen.h"
#include "mongo/db/repl/oplog.h"
@@ -146,6 +147,17 @@ std::unique_ptr<HealthLogEntry> dbCheckErrorHealthLogEntry(const NamespaceString
BSON("success" << false << "error" << err.toString()));
}
+std::unique_ptr<HealthLogEntry> dbCheckWarningHealthLogEntry(const NamespaceString& nss,
+ const std::string& msg,
+ OplogEntriesEnum operation,
+ const Status& err) {
+ return dbCheckHealthLogEntry(nss,
+ SeverityEnum::Warning,
+ msg,
+ operation,
+ BSON("success" << false << "error" << err.toString()));
+}
+
/**
* Get a HealthLogEntry for a dbCheck batch.
*/
@@ -198,7 +210,6 @@ DbCheckHasher::DbCheckHasher(OperationContext* opCtx,
// Get the _id index.
const IndexDescriptor* desc = collection->getIndexCatalog()->findIdIndex(opCtx);
-
uassert(ErrorCodes::IndexNotFound, "dbCheck needs _id index", desc);
// Set up a simple index scan on that.