|
Make the balancer rely on the command path introduced by SERVER-72278 in order to issue mergeAllChunksOnShard on shards.
The execution of the auto-merging path must be conditional on the value of the auto merger feature flag.
Auto-merging must happen:
- When the balancer gets enabled
- Every X hours after the last execution, configurable via a new server parameter defaulted to 24 hours. There is no need to track on disk the last time auto-merging happened, we could simply track an in-memory state cleared up when the balancer gets disabled.
The balancer should simply catch and ignore CommandNotFound errors that may be thrown in case of this super-improbable flow:
- Balancer checks FCV and feature flag, check passes
- FCV changes
- Shard binaries are replaced
- Balancer issues mergeAllChunksOnShard
|