[SERVER-72093] Initial sync may fail with IndexOptionsConflict when applying stale startIndexBuild oplog entry Created: 13/Dec/22  Updated: 29/Oct/23  Resolved: 01/Mar/23

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

Type: Bug Priority: Major - P3
Reporter: Lingzhi Deng Assignee: Dianna Hohensee (Inactive)
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-47164 Drop any existing indexes conflicting... Closed
Assigned Teams:
Storage Execution
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2023-03-06
Participants:
Linked BF Score: 2

 Description   

Initial sync may fail with IndexOptionsConflict when applying stale startIndexBuild oplog entry if the stale (i.e. dropped) index has the same spec as a more up-to-date index under a different name.

More specifically, let's say the primary creates {a: 1} with name "a1", drops it, then re-creates the same index with name "a2", and initial sync clones "a2" but later needs to re-apply createIndex of "a1". In this case, initial sync would fail with IndexOptionsConflict when applying "a1".

SERVER-47164 added code to handle name conflicts during initial sync but it doesn't handle spec conflicts (under different index name).



 Comments   
Comment by Githook User [ 01/Mar/23 ]

Author:

{'name': 'Dianna Hohensee', 'email': 'dianna.hohensee@mongodb.com', 'username': 'DiannaHohensee'}

Message: SERVER-72093 Drop indexes with conflicting specs during Initial Sync
Branch: master
https://github.com/mongodb/mongo/commit/6cbb9a9a2d024a125cf94616c7392648b4879d65

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