Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-1253

Make dropIndexes abort in-progress index builds

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: None
    • None

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: