[SERVER-54742] [4.2] indexes may initialize multikey state from uninitialized value Created: 24/Feb/21  Updated: 27/Oct/23  Resolved: 05/Mar/21

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

Type: Bug Priority: Major - P3
Reporter: Louis Williams Assignee: Louis Williams
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
Operating System: ALL
Sprint: Execution Team 2021-03-22
Participants:
Linked BF Score: 76

 Description   

This does not affect a released version of 4.2

During both startup and index creation, we initialize an index's multikey state by calling _catalogIsMultikey. This should initialize directly from the durable catalog, but there is an early-return that checks the _isMultikeyForRead flag first. At this point, _isMultikeyForRead hasn't been initialized; it gets initialized immediately afterward.

This can cause a bug where an index will not get updated to multikey when it should.

We should be able to eliminate this early check entirely, which is the case on other branches.



 Comments   
Comment by Connie Chen [ 05/Mar/21 ]

Original change was reverted.

Comment by Githook User [ 26/Feb/21 ]

Author:

{'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}

Message: Revert "SERVER-54742 Initialize IndexCatalogEntry multikey state directly from durable catalog"

This reverts commit 46fc6fb233e85538a94dda6eea91cc2ac34cee15.

Revert "SERVER-47694: fix multikey. again"

This reverts commit ecd41f8b3bfe2154921cbcede9040d535a46e0c5.
Branch: v4.2
https://github.com/mongodb/mongo/commit/a56afdff77a84c37d6af0ba77e7068a0b5d593c0

Comment by Githook User [ 24/Feb/21 ]

Author:

{'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}

Message: SERVER-54742 Initialize IndexCatalogEntry multikey state directly from durable catalog
Branch: v4.2
https://github.com/mongodb/mongo/commit/46fc6fb233e85538a94dda6eea91cc2ac34cee15

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