summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/index_consistency.h
diff options
context:
space:
mode:
authorDaniel Solnik <dansolnik@gmail.com>2019-07-12 14:02:39 -0400
committerDaniel Solnik <dansolnik@gmail.com>2019-07-16 11:23:09 -0400
commitafe9011d102fd1528eb282b8d5e2dad1d54e7b65 (patch)
tree8266c6baf4109d9a450db478221a4575a9571bde /src/mongo/db/catalog/index_consistency.h
parentc652c07f6c460a6bd2d1ed0c75d934017aa99fb9 (diff)
downloadmongo-afe9011d102fd1528eb282b8d5e2dad1d54e7b65.tar.gz
SERVER-41717 Create KeyStringBuilder, KeyStringValue, and KeyStringTypeBits classes for generating KeyStrings.
Diffstat (limited to 'src/mongo/db/catalog/index_consistency.h')
-rw-r--r--src/mongo/db/catalog/index_consistency.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/catalog/index_consistency.h b/src/mongo/db/catalog/index_consistency.h
index e70c9a1a9ea..659de43aa72 100644
--- a/src/mongo/db/catalog/index_consistency.h
+++ b/src/mongo/db/catalog/index_consistency.h
@@ -57,7 +57,7 @@ struct IndexInfo {
// More efficient representation of the ordering of the descriptor's key pattern.
const Ordering ord;
// For conveniently building KeyStrings in a preallocated buffer.
- std::unique_ptr<KeyString> ks;
+ std::unique_ptr<KeyString::Builder> ks;
// The number of index entries belonging to the index.
int64_t numKeys = 0;
// The number of records that have a key in their document that referenced back to the this
@@ -85,7 +85,7 @@ public:
* For the second phase of validation, keep track of the document keys that hashed to
* inconsistent hash buckets during the first phase of validation.
*/
- void addDocKey(const KeyString& ks,
+ void addDocKey(const KeyString::Builder& ks,
IndexInfo* indexInfo,
RecordId recordId,
const BSONObj& indexKey);
@@ -96,7 +96,7 @@ public:
* For the second phase of validation, try to match the index entry keys that hashed to
* inconsistent hash buckets during the first phase of validation to document keys.
*/
- void addIndexKey(const KeyString& ks,
+ void addIndexKey(const KeyString::Builder& ks,
IndexInfo* indexInfo,
RecordId recordId,
const BSONObj& indexKey);
@@ -107,8 +107,8 @@ public:
* entries and remove any path encountered. As we expect the index to contain a super-set of
* the collection paths, a non-empty set represents an invalid index.
*/
- void addMultikeyMetadataPath(const KeyString& ks, IndexInfo* indexInfo);
- void removeMultikeyMetadataPath(const KeyString& ks, IndexInfo* indexInfo);
+ void addMultikeyMetadataPath(const KeyString::Builder& ks, IndexInfo* indexInfo);
+ void removeMultikeyMetadataPath(const KeyString::Builder& ks, IndexInfo* indexInfo);
size_t getMultikeyMetadataPathCount(IndexInfo* indexInfo);
/**
@@ -199,7 +199,7 @@ private:
/**
* Returns a hashed value from the given KeyString and index namespace.
*/
- uint32_t _hashKeyString(const KeyString& ks, uint32_t indexNameHash) const;
+ uint32_t _hashKeyString(const KeyString::Builder& ks, uint32_t indexNameHash) const;
}; // IndexConsistency
} // namespace mongo