[SERVER-34108] Rebuilding unfinished unindexes one at a time can error Created: 23/Mar/18  Updated: 29/Oct/23  Resolved: 12/Apr/18

Status: Closed
Project: Core Server
Component/s: Index Maintenance, Storage
Affects Version/s: None
Fix Version/s: 3.7.4

Type: Bug Priority: Major - P3
Reporter: Daniel Gottlieb (Inactive) Assignee: Daniel Gottlieb (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-34075 powercycle_replication* must run repl... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2018-04-23
Participants:
Linked BF Score: 13

 Description   

At startup, all unfinished indexes are rebuilt. However, the code rebuilds them one index at a time.

If there are multiple unfinished indexes `checkUnfinished` will return an error, that in this case, crashes the server.

Alternatively, the index rebuilding code for opening the catalog rebuilds all indexes simultaneously.



 Comments   
Comment by Githook User [ 12/Apr/18 ]

Author:

{'email': 'daniel.gottlieb@mongodb.com', 'name': 'Daniel Gottlieb', 'username': 'dgottlieb'}

Message: SERVER-34108: Rebuild all indexes for a collection simultaneously at startup.

Index builds have a quirk that the only "unfinished" indexes allowed on a
collection are those that are being built. Additionally, all finished indexes
will be initialized from disk. Storage recovery at startup must rebuild all
indexes at the same time to avoid these failure code paths.
Branch: master
https://github.com/mongodb/mongo/commit/931390bc0fdb488bc30f6b37ca5113ae8cf9b66d

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