SERVER-133732Needs Scheduling

onStepDown starts an async job that interrupts and joins leftovers PrimaryOnlyService instances

SERVER-133518 implemented a workaround to make sharding coordinators release locks during stepdown. Ideally, cleanup work should not be inline in the stepdown path, and should instead be executed asynchronously, or during a potential next stepup. This ticket tracks the work to improve the cleanup of sharding coordinators, making stepdown start an asynchronous job that will interrupt and join leftovers (including releasing the locks) initiated via stepdown. That way, the SERVER-133518 worka

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.