-
Type: Task
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
-
Sharding EMEA
-
Sharding 2021-03-08, Sharding 2021-03-22, Sharding 2021-04-05, Sharding 2021-04-19, Sharding 2021-05-03
-
(copied to CRM)
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 SERVER-42352).
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.