[SERVER-45374] Unique index that gets rebuilt as part of startup recovery/repair is using data format version as 6 or 8 and NOT 11 or 12. Created: 06/Jan/20  Updated: 29/Oct/23  Resolved: 24/Jan/20

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.2.4, 4.3.4

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

Issue Links:
Depends
Related
related to SERVER-39471 Remove unique index FCV upgrade codepath Closed
is related to SERVER-45754 Update error message that results fro... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2020-01-27
Participants:
Linked BF Score: 44

 Description   

Unique index rebuilt as part of mongodb 4.2 startup repair/recovery will  have either kDataFormatV2KeyStringV1IndexVersionV2 (8) or kDataFormatV1KeyStringV0IndexVersionV1 (6) since FCV is uninitialized at that point of time.  To be noted, we initialize FCV only after rebuilding the index which is over here. As a result, we break the assumption mentioned here. Also, if we upgrade/restart the node with mongodb binary version 4.3+, we would crash the server as part of startup index sanity check (Sanity check got introduced only from mongodb 4.3+).



 Comments   
Comment by Githook User [ 27/Feb/20 ]

Author:

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

Message: SERVER-45754 Update error message that results from SERVER-45374 to suggest restarting with a 4.2 binary
Branch: master
https://github.com/mongodb/mongo/commit/36ca20acb0e8ee9cd26cdc0ff4d33e563466b692

Comment by Githook User [ 27/Jan/20 ]

Author:

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

Message: SERVER-45374 Add requires_persistence tag to upgrade_unfinished_unique_indexes.js
Branch: v4.2
https://github.com/mongodb/mongo/commit/9e010731a880aedd9425bbfa4db2f09b744544a7

Comment by Githook User [ 24/Jan/20 ]

Author:

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

Message: SERVER-45374 Upgrade all downgraded unique indexes on startup in FCV 4.2

When we rebuild unfinished unique indexes during startup recovery, the
indexes are built with a downgraded unique index format version,
regardless of FCV. If we detect any incorrectly downgraded unique
indexes while in FCV 4.2 during startup, upgrade all unique indexes to
ensure all indexes have the correct format version.
Branch: v4.2
https://github.com/mongodb/mongo/commit/af05d5ccc91f499530177e734df4d4eb9fc10827

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