diff options
author | Dianna Hohensee <dianna.hohensee@mongodb.com> | 2019-10-21 18:23:49 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-10-21 18:23:49 +0000 |
commit | a5887f3a5bd5bcc7398bf2bddc8c537b679e6a58 (patch) | |
tree | 02e4cdb7aa3b103841bfc7687b3d2962b286227f /src | |
parent | babc552483a0f8a2fff4c20354089b78da14baeb (diff) | |
download | mongo-a5887f3a5bd5bcc7398bf2bddc8c537b679e6a58.tar.gz |
SERVER-42358 Add new background collection validation test hook. Runs concurrently with tests.
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/catalog/index_consistency.cpp | 5 | ||||
-rw-r--r-- | src/mongo/db/catalog/validate_adaptor.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/storage/storage_init.cpp | 1 |
3 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/db/catalog/index_consistency.cpp b/src/mongo/db/catalog/index_consistency.cpp index a4659818609..174c477f5a0 100644 --- a/src/mongo/db/catalog/index_consistency.cpp +++ b/src/mongo/db/catalog/index_consistency.cpp @@ -27,6 +27,8 @@ * it in the license file. */ +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kStorage + #include <algorithm> #include <third_party/murmurhash3/MurmurHash3.h> @@ -37,6 +39,7 @@ #include "mongo/db/catalog/index_catalog.h" #include "mongo/db/db_raii.h" #include "mongo/db/index/index_descriptor.h" +#include "mongo/util/log.h" #include "mongo/util/string_map.h" namespace mongo { @@ -120,7 +123,7 @@ void IndexConsistency::addIndexEntryErrors(ValidateResultsMap* indexNsResultsMap numExtraIndexEntryErrors += item.second.size(); } - // Inform which indexes have inconsistences and add the BSON objects of the inconsistent index + // Inform which indexes have inconsistencies and add the BSON objects of the inconsistent index // entries to the results vector. bool missingIndexEntrySizeLimitWarning = false; for (const auto& missingIndexEntry : _missingIndexEntries) { diff --git a/src/mongo/db/catalog/validate_adaptor.cpp b/src/mongo/db/catalog/validate_adaptor.cpp index 629c9d5e887..1bee0a64c0a 100644 --- a/src/mongo/db/catalog/validate_adaptor.cpp +++ b/src/mongo/db/catalog/validate_adaptor.cpp @@ -324,7 +324,7 @@ void ValidateAdaptor::validateIndexKeyCount(const IndexDescriptor* idx, Validate bool noErrorOnTooFewKeys = !_validateState->isFullValidate(); if (idx->isIdIndex() && numTotalKeys != _numRecords) { - hasTooFewKeys = numTotalKeys < _numRecords ? true : hasTooFewKeys; + hasTooFewKeys = (numTotalKeys < _numRecords); std::string msg = str::stream() << "number of _id index entries (" << numTotalKeys << ") does not match the number of documents in the index (" << _numRecords << ")"; diff --git a/src/mongo/db/storage/storage_init.cpp b/src/mongo/db/storage/storage_init.cpp index 1da860e1e0d..52aee365384 100644 --- a/src/mongo/db/storage/storage_init.cpp +++ b/src/mongo/db/storage/storage_init.cpp @@ -67,6 +67,7 @@ public: << "dropPendingIdents" << static_cast<long long>(engine->getDropPendingIdents().size()) << "supportsSnapshotReadConcern" << engine->supportsReadConcernSnapshot() + << "supportsCheckpointCursors" << engine->supportsCheckpoints() << "readOnly" << storageGlobalParams.readOnly << "persistent" << !engine->isEphemeral() << "backupCursorOpen" << backupCursorHooks->isBackupCursorOpen()); |