This came out of a product sync discussion.
There may be some cases where orphans are created on a shard outside of migrations, e.g. if someone writes directly to the shard.
For cases like this, the old cleanupOrphaned logic that actively deletes orphans from unowned ranges (rather than waiting for all range deletion tasks created by migrations to complete) would still be useful.
We should add a "force: true" option (or perhaps with a different name) to cleanupOrphaned that runs the old logic. It should be used sparingly, since the old cleanupOrphaned logic had several races (particularly
The v4.4 branch already chose the old or new logic based on FCV, so master could be made to do something similar based on the "force: true" option. We should also bring back the tests of the old cleanupOrphaned logic deleted here.