Details
-
Task
-
Resolution: Fixed
-
Minor - P4
-
None
Description
In the Indexes FAQ, under the section How does an index build affect database performance?, we say the following about dropping indexes:
To return information on currently running index creation operations, see Active Indexing Operations. To kill a running index creation operation on a primary or standalone mongod, use db.killOp(). The partially built index will be deleted.
|
|
|
You cannot terminate a replicated index build on secondary members of a replica set. You must first drop the index on the primary. The secondaries will replicate the drop operation and drop the indexes after the index build completes. All further replication blocks behind the index build and drop.
|
However on the Index Builds on Populated Collections page, under the section, Terminate In Progress Index Builds, we explicitly say not to use killOp:
Use the dropIndexes command or its shell helpers dropIndex() or dropIndexes() to terminate an in-progress index build. See Abort In-Progress Index Builds for more information.
|
|
|
Do not use killOp to terminate an in-progress index builds in replica sets or sharded clusters.
|
In 4.2 Terminate In Progress Index Builds this used to contain the same text as the FAQ (i.e use killOp()):
To terminate an ongoing index build on a primary or standalone mongod, use the db.killOp() method in the mongo shell. When terminating an index build, the effects of db.killOp() may not be immediate and may occur well after much of the index build operation has completed.
|
|
|
You cannot terminate a replicated index build on secondary members of a replica set. You must first drop the index on the primary. The secondaries will replicate the drop operation and drop the indexes after the index build completes. All further replication blocks behind the index build and drop.
|
It looks like this section of the FAQ should also be updated for 4.4+.