[SERVER-40175] Rebuild any missing _id indexes at startup Created: 15/Mar/19  Updated: 29/Oct/23  Resolved: 05/Apr/19

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

Type: Bug Priority: Major - P3
Reporter: Xiangyu Yao (Inactive) 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-39562 Repair should handle duplicate unique... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Storage NYC 2019-04-08
Participants:
Linked BF Score: 28

 Description   

SERVER-38624 recently added the check that _id index always exist on startup. But if _id index got rebuilt due to "reindex" command and the server crashes before it finishes building the new _id index, the server may not have _id index on startup.



 Comments   
Comment by Githook User [ 05/Apr/19 ]

Author:

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

Message: SERVER-40175 Rebuild any missing _id indexes on startup
Branch: master
https://github.com/mongodb/mongo/commit/ed6a287bf83fbbb6a8342ab9f3cd3638a12b39ca

Comment by April Schoffer [ 21/Mar/19 ]

In order to resolve the BF, we'll also need another ticket to run repair if _id is missing. louis.williams and xiangyu.yao to discuss.

Comment by Eric Milkie [ 18/Mar/19 ]

Actually, we should probably just advocate running repair when this situation happens, and make sure that repair rebuilds any missing _id indexes. No changes to the reindex command necessary.

Comment by Xiangyu Yao (Inactive) [ 15/Mar/19 ]

I agree. Feel free to change the title and the description.

Comment by Eric Milkie [ 15/Mar/19 ]

I'm not sure this is what we should do to fix the problem. Instead I would advocate removing the reindex command, or change its behavior to not reindex _id.

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