Part of the shutdown procedure on a secondary node in a replica set involves interrupting all active index builds. These interrupted index builds will be restarted on the next server startup. In certain situations, the abort mechanism in the IndexBuildsCoordinator may erroneously cause an active index build to be cleaned up in a non-restartable state.
----- OLD DESCRIPTION BELOW -----
MultiIndexBlock::insertAllDocuments() may erroneously return IndexBuildAborted instead of an InterruptedAtShutdown. This can happen if we check the index build's internal state in _getState() before checking the OperationContext.