[SERVER-59399] Allow dropping an index during separate index build on the same collection Created: 16/Aug/21  Updated: 29/Oct/23  Resolved: 15/Nov/21

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

Type: Improvement Priority: Major - P3
Reporter: Daniel Ernst Assignee: Gregory Wlodarek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Documented
is documented by DOCS-14925 Investigate changes in SERVER-59399: ... Closed
Problem/Incident
Related
is related to SERVER-62173 Applying dropIndexes oplog entry can ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2021-10-18, Execution Team 2021-11-15, Execution Team 2021-11-29
Participants:
Linked BF Score: 183

 Description   

According to my understanding, it's currently not possible to drop an index on a collection at the same time that a separate index is in the process of being built on the same collection. As of SERVER-32033 you can call dropIndex on the in-progress index and the build will be cancelled, but if you try to drop a different already built index you'll get a BackgroundOperationInProgressForNamespace error. I'm guessing this comes from this check here.

I think this behavior is confusing (why should building index A interfere with dropping index B?) and makes it more difficult to manage indexes.



 Comments   
Comment by Githook User [ 15/Nov/21 ]

Author:

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

Message: SERVER-59399 Allow dropping ready indexes while having in-progress index builds
Branch: master
https://github.com/mongodb/mongo/commit/41069bd34bd0c84aad4d68781f98aaaca193d197

Comment by Githook User [ 15/Nov/21 ]

Author:

{'name': 'Uladzimir Makouski', 'email': 'uladzimir.makouski@mongodb.com', 'username': 'umakouski'}

Message: Revert "SERVER-59399 Allow dropping ready indexes while having in-progress index builds"

This reverts commit 7cdbb8d6955967afafd8fffcfa2a71b313832eee.
Branch: master
https://github.com/mongodb/mongo/commit/394538e9e98336bda26151651e9042fef7598553

Comment by Githook User [ 11/Nov/21 ]

Author:

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

Message: SERVER-59399 Allow dropping ready indexes while having in-progress index builds
Branch: master
https://github.com/mongodb/mongo/commit/7cdbb8d6955967afafd8fffcfa2a71b313832eee

Comment by Yuhong Zhang [ 19/Aug/21 ]

daniel.ernst Could you please confirm if there's a specific use case requested or if it's blocking anything right now? We can change the priority if so. Thanks!

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