[SERVER-37727] Enhance dropIndexes to accept multiple specific indexes to drop Created: 24/Oct/18  Updated: 29/Oct/23  Resolved: 08/Nov/18

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

Type: Task Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-12195 Docs for SERVER-37727: Enhance dropIn... Closed
Gantt Dependency
has to be done before SERVER-37726 Make dropIndexes abort in-progress in... Closed
Related
related to SERVER-50287 drop_index.js fails when run in passt... Closed
related to SERVER-39663 db.collection.dropIndex() should not ... Closed
is related to SERVER-25936 the shell index helpers should use "d... Closed
Backwards Compatibility: Fully Compatible
Sprint: Storage NYC 2018-11-19
Participants:
Linked BF Score: 20

 Description   

The dropIndexes command must take an array of indexes to drop for a single collection.

This is related to SERVER-37726, which will add the ability to drop in-progress index builds. A createIndexes command can build several indexes under one builder, and right now we can only abort at the builder granularity. So dropIndexes will only be able to drop all or none of the indexes associated with a builder. Thus dropIndexes must take multiple indexes as an argument.



 Comments   
Comment by Scott L'Hommedieu (Inactive) [ 13/May/19 ]

From all of the justification and motivation I've read this is not something we need/want to add as a helper to the drivers. It can be run as a command.

Comment by Ian Whalen (Inactive) [ 13/May/19 ]

alyson.cabral scott.lhommedieu can you please talk and let us know if exposing this as a drivers helper (as opposed to just through runcommand) is something we want added to our drivers API?

Comment by Githook User [ 08/Nov/18 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-37727 dropIndexes supports dropping multiple indexes
Branch: master
https://github.com/mongodb/mongo/commit/66ed8cbe8277e63d5c908b68ba8721af23390d1a

Comment by Githook User [ 08/Nov/18 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-37727 clean up drop_indexes.cpp

extract dropIndexByName from dropIndexes implementation
add constant for dropIndexes 'index' field name
include indexes to drop in log and error messages
rename dropIndexes command object argument in drop_indexes.cpp
Branch: master
https://github.com/mongodb/mongo/commit/867ecdb768319d322cee5c2f2b7f9288f1caa13f

Comment by Githook User [ 08/Nov/18 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-37727 clean up drop_index.js test
Branch: master
https://github.com/mongodb/mongo/commit/d03c02592c5c949613e8901526253c132218f99a

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