diff options
Diffstat (limited to 'src/mongo/db/catalog/index_consistency.h')
-rw-r--r-- | src/mongo/db/catalog/index_consistency.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/mongo/db/catalog/index_consistency.h b/src/mongo/db/catalog/index_consistency.h index df03c3c129b..8eab32e3b3b 100644 --- a/src/mongo/db/catalog/index_consistency.h +++ b/src/mongo/db/catalog/index_consistency.h @@ -29,21 +29,23 @@ #pragma once -#include "mongo/db/concurrency/d_concurrency.h" -#include "mongo/db/index/index_descriptor.h" +#include "mongo/bson/simple_bsonobj_comparator.h" #include "mongo/db/storage/key_string.h" #include "mongo/db/storage/record_store.h" -#include "mongo/db/storage/sorted_data_interface.h" -#include "mongo/util/elapsed_tracker.h" namespace mongo { +class IndexDescriptor; + /** * Contains all the index information and stats throughout the validation. */ struct IndexInfo { IndexInfo(const IndexDescriptor* descriptor); - const IndexDescriptor* const descriptor; + // Index name. + const std::string indexName; + // Contains the indexes key pattern. + const BSONObj keyPattern; // Contains the pre-computed hash of the index name. const uint32_t indexNameHash; // More efficient representation of the ordering of the descriptor's key pattern. @@ -71,10 +73,7 @@ class IndexConsistency final { using ValidateResultsMap = std::map<std::string, ValidateResults>; public: - IndexConsistency(OperationContext* opCtx, - Collection* collection, - NamespaceString nss, - bool background); + IndexConsistency(OperationContext* opCtx, Collection* coll); /** * During the first phase of validation, given the document's key KeyString, increment the @@ -140,11 +139,6 @@ public: private: IndexConsistency() = delete; - OperationContext* _opCtx; - Collection* _collection; - const NamespaceString _nss; - ElapsedTracker _tracker; - // We map the hashed KeyString values to a bucket that contains the count of how many // index keys and document keys we've seen in each bucket. This counter is unsigned to avoid // undefined behavior in the (unlikely) case of overflow. |