diff options
author | Daniel Solnik <dansolnik@gmail.com> | 2019-06-28 17:28:16 -0400 |
---|---|---|
committer | Daniel Solnik <dansolnik@gmail.com> | 2019-06-28 17:28:16 -0400 |
commit | 8e4f6fd66dc3c2204685f7aeb7a35cce3d963bb5 (patch) | |
tree | 9ae637580013630c710b4a7693c7acc45b97ec8b /src/mongo/db/catalog/index_consistency.h | |
parent | 7ef5348a2282a5442ec7dc50bb0b99c94b83396c (diff) | |
download | mongo-8e4f6fd66dc3c2204685f7aeb7a35cce3d963bb5.tar.gz |
Revert "SERVER-36385 Remove code and tests about index key limit size"
This reverts commit 7ef5348a2282a5442ec7dc50bb0b99c94b83396c.
Diffstat (limited to 'src/mongo/db/catalog/index_consistency.h')
-rw-r--r-- | src/mongo/db/catalog/index_consistency.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/catalog/index_consistency.h b/src/mongo/db/catalog/index_consistency.h index e70c9a1a9ea..ea707d51679 100644 --- a/src/mongo/db/catalog/index_consistency.h +++ b/src/mongo/db/catalog/index_consistency.h @@ -60,6 +60,8 @@ struct IndexInfo { std::unique_ptr<KeyString> ks; // The number of index entries belonging to the index. int64_t numKeys = 0; + // The number of long keys that are not indexed for the index. + int64_t numLongKeys = 0; // The number of records that have a key in their document that referenced back to the this // index. int64_t numRecords = 0; @@ -112,6 +114,13 @@ public: size_t getMultikeyMetadataPathCount(IndexInfo* indexInfo); /** + * Add one to the `_longKeys` count for the given `indexNs`. + * This is required because index keys > `KeyString::kMaxKeyBytes` are not indexed. + * TODO SERVER-36385: Completely remove the key size check in 4.4 + */ + void addLongIndexKey(IndexInfo* indexInfo); + + /** * Returns true if any value in the `_indexKeyCount` map is not equal to 0, otherwise * return false. */ |