[SERVER-47319] dropIndexes will invariant if it sees complete indexes after successfully aborting a different index build Created: 03/Apr/20  Updated: 29/Oct/23  Resolved: 05/May/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.4.0-rc4, 4.7.0

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

Issue Links:
Backports
Depends
Duplicate
is duplicated by SERVER-47653 dropIndexes() method can find complet... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Execution Team 2020-05-18
Participants:
Linked BF Score: 22

 Description   

An invariant can fail in dropIndexes given the following sequence between command threads A, B, and C:

Part of the problem here is that index names are not unique to index builds, so while the dropIndexes command can successfully abort an index build, another index by the same name could be created again in a brief window of time before it reacquires its locks.

In this scenario, we should consider dropping the finished index if we discover that it exists.  This was the previous behavior.



 Comments   
Comment by Githook User [ 05/May/20 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-47319 dropIndexes should not invariant if a similar index was created while yielding locks to abort different indexes

(cherry picked from commit 60b2655e069a30dfa1656809b1ae25d77617292c)
Branch: v4.4
https://github.com/mongodb/mongo/commit/1e525750c99b70e21af0b20d4c29159f8329c008

Comment by Githook User [ 05/May/20 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-47319 dropIndexes should not invariant if a similar index was created while yielding locks to abort different indexes
Branch: master
https://github.com/mongodb/mongo/commit/60b2655e069a30dfa1656809b1ae25d77617292c

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