[SERVER-67038] Handle missing index idents during startup recovery even if we're not a standalone. Created: 06/Jun/22  Updated: 09/Oct/23  Resolved: 27/Sep/22

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

Type: Bug Priority: Major - P3
Reporter: Pavithra Vetriselvan Assignee: Gregory Wlodarek
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-69877 Remove untimestamped writes to the ca... Closed
Duplicate
duplicates SERVER-69877 Remove untimestamped writes to the ca... Closed
Related
related to SERVER-63865 Handle missing index idents during st... Closed
Operating System: ALL
Sprint: Execution Team 2022-09-05, Execution Team 2022-09-19, Execution Team 2022-10-03
Participants:
Linked BF Score: 5

 Description   

Similar to SERVER-63865, replica set nodes can fail to startup after an unclean shutdown if we didn't finish an index build (two phase).

After a node crashes during an index build, we can startup and have the correct catalog entry but not have the corresponding index table. During index build recovery, we check that the collection is initialized. This code path leads us to initialize the index catalog and eventually we try to access the index table.

We likely need to generalize the solution in SERVER-63865 to apply to nodes in startup recovery in general, regardless of whether they are standalone nodes, to prevent opening index tables that may not exist.



 Comments   
Comment by Gregory Wlodarek [ 27/Sep/22 ]

Using matthew.saltz@mongodb.com's reproducer I verified that SERVER-69877 fixes the fatal assertion so I'm closing this as a duplicate. SERVER-69877 refactors startup index build recovery to avoid untimestamped writes by dropping and recreating the table with the same name. If it doesn't exist, it will still be recreated.

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