[DRIVERS-1253] Make dropIndexes abort in-progress index builds Created: 18/Feb/20  Updated: 27/May/22  Resolved: 26/May/20

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-37726 Make dropIndexes abort in-progress in... Closed
depends on SERVER-41365 Improve unhelpful error "ns not found" Closed
Related
is related to DRIVERS-745 Specify how drivers handle "ns not fo... Closed
Server Compat: 4.3

 Description   
Downstream Change Summary

The "dropIndexes" command can now be used to abort in-progress index builds being built in the background. As we can only abort at the builder level granularity, the user must specify all the indexes being built by a single index builder to abort it successfully.

This command still retains the previous behaviour of returning "BackgroundOperationInProgressForNamespace" when trying to drop a ready index while there are index builds still in-progress.

Description of Linked Ticket

dropIndexes should abort in-progress index builds. This should be done after SERVER-37763 makes it possible to abort an index build.

SERVER-37727 will enhance dropIndexes to receive an array of indexes as arguments. This task will only abort in-progress index builds if the user specifies all of the indexes that a single builder is building together. A createIndexes command can start multiple indexes building together on one builder and we currently only have the granularity to abort all or none of the indexes on a builder.

Lastly, dropIndexes will not write a dropIndexes oplog entry if aborting in-progress builds. Aborting the index will produce an abortIndexBuilds oplog entry, which suffices. This allows rollback via refetch to know that an index was fully built prior to a dropIndexes oplog entry.



 Comments   
Comment by Jeremy Mikola [ 18/May/20 ]

During triage, let's determine if this should be closed and consolidated in favor of DRIVERS-745, given that both of these issues depend on SERVER-41365 and takeaway from recent discussions between leads and server was that drivers should (a) start relying on the error code if they're not already and (b) augment the server's error message since the server cannot do so without breaking BC with older driver versions.

Comment by Jeremy Mikola [ 08/May/20 ]

I think this should be re-opened for triaging based on later comments in DRIVERS-745. It looks like we missed a breaking change due to a change in the error message when a collection does not exist.

Comment by Esha Bhargava [ 24/Feb/20 ]

No Drivers changes needed.

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