SERVER-138687Needs Scheduling

movePrimary operation has overhead during index build check

{{_checkIndexBuildsInProgress}} was introduced as a best effort check to avoid running DDL operations during an active index build. However the implementation on the movePrimary operation is not the most effective and has an overhead on untracked collections. The implementation right now send out index build checks for each shard not taking advantage of the knowledge where the given namespaces exist. This was an accepted overhead though knowing that SPM-4906 would render the whole checking

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.