[SERVER-57385] support looking up multikey state by index offset in Collection interface Created: 03/Jun/21  Updated: 29/Oct/23  Resolved: 22/Jun/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: execution_intern
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-57127 Refactor multikey and other state out... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2021-06-28
Participants:
Linked BF Score: 0

 Description   

In SERVER-57127, callers of IndexCatalogEntry will start directing readers of an index's multikey state to the Collection object. Currently, this involves looking up the index information by searching for the index name in the cached metadata maintained in the Collection. We should be able to avoid this unnecessary string lookup if IndexCatalogEntry has the offset of the index within the metadata document.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 22/Jun/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-57385 IndexCatalogEntryImpl looks up multikey info by offset
Branch: master
https://github.com/mongodb/mongo/commit/ae4aa5dce07f140958375af424c0ce1f958d0a1d

Comment by Githook User [ 21/Jun/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-57385 IndexCatalogEntryImpl updates multikey info by offset
Branch: master
https://github.com/mongodb/mongo/commit/66cf66c99e74ea7bfc247ea46f6da35fd1e0417d

Comment by Githook User [ 20/Jun/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-57385 remove BSONCollectionCatalogEntry::IndexMetaData::name()
Branch: master
https://github.com/mongodb/mongo/commit/c3e6aa7448786fdb639a14e0e5edc01d29bc8d7e

Comment by Githook User [ 20/Jun/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-57385 IndexCatalogEntryImpl stores index offset at construction
Branch: master
https://github.com/mongodb/mongo/commit/33ac8579ddb5de94bdbf70ff57919fe5ca76ca58

Comment by Githook User [ 19/Jun/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-57385 keep index offsets stable in collection metadata

When an index is dropped, the corresponding entry in the in-memory collection metadata
'indexes' array will be invalidated. Previously, the entry would be removed and the vector
resized.
Branch: master
https://github.com/mongodb/mongo/commit/ed4fa8d8f7bf90b73830f8f69156705a4fe5cb03

Comment by Githook User [ 18/Jun/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-57385 BSONCollectionCatalogEntry::MetaData reclaims invalidated elements for new indexes
Branch: master
https://github.com/mongodb/mongo/commit/ff6b2f2877a0721cd631acaa2057e491ebd8c846

Comment by Githook User [ 17/Jun/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-57385 handle invalid index metadata entries when reading and writing collection metadata

This allows us to invalidate dropped indexes in the collection metadata 'indexes' array
without resizing the vector, and to ensure that these invalidated index entries will not
be written to disk.
Branch: master
https://github.com/mongodb/mongo/commit/076c39d6412c96e60e593cf28b0a57dc6555aa70

Comment by Githook User [ 17/Jun/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-57385 add BSONCollectionCatalogEntry::IndexMetaData::isPresent()

Ignore invalid index metadata when calculating total index count and returning all indexes.
Branch: master
https://github.com/mongodb/mongo/commit/bf7e84984e992b7c994ba090d89fcd528973ff60

Comment by Githook User [ 16/Jun/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-57385 Collection::checkMetaDataForIndex() returns offset on success
Branch: master
https://github.com/mongodb/mongo/commit/e5f51a656326c725a05b113bcf263b2dd6364ef5

Comment by Githook User [ 16/Jun/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-57385 Collection::isIndexMultikey() and Collection::setIndexIsMultikey() accept optional index offset
Branch: SERVER-34632
https://github.com/mongodb/mongo/commit/db7e21b3f2ff986a4e78b583dfed41dd83596f8a

Comment by Githook User [ 16/Jun/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-57385 add IndexMetaData::insertIndex()
Branch: SERVER-34632
https://github.com/mongodb/mongo/commit/3e39b225f1d033efe5efea4e2d4687b3a4e79e43

Comment by Githook User [ 16/Jun/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-57385 add BSONCollectionCatalogEntry::IndexMetaData::nameStringData()

Also removes std imports and unused BSONCollectionCatalogEntry constants that were
were no longer referenced after commit bc4cc10370b73f9d68a5c42150d902429e9fdb2d.
Branch: SERVER-34632
https://github.com/mongodb/mongo/commit/be13594dd2c1bcaf556a3f26f5fad141225aada3

Comment by Githook User [ 15/Jun/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-57385 Collection::isIndexMultikey() and Collection::setIndexIsMultikey() accept optional index offset
Branch: master
https://github.com/mongodb/mongo/commit/db7e21b3f2ff986a4e78b583dfed41dd83596f8a

Comment by Githook User [ 15/Jun/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-57385 add IndexMetaData::insertIndex()
Branch: master
https://github.com/mongodb/mongo/commit/3e39b225f1d033efe5efea4e2d4687b3a4e79e43

Comment by Githook User [ 15/Jun/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-57385 add BSONCollectionCatalogEntry::IndexMetaData::nameStringData()

Also removes std imports and unused BSONCollectionCatalogEntry constants that were
were no longer referenced after commit bc4cc10370b73f9d68a5c42150d902429e9fdb2d.
Branch: master
https://github.com/mongodb/mongo/commit/be13594dd2c1bcaf556a3f26f5fad141225aada3

Comment by Githook User [ 15/Jun/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-57385 migrate catalog operations to IndexMetaData::nameStringData()
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/9c94d208eb7860c732bc0be5112bff96327f1c06

Generated at Thu Feb 08 05:41:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.