Since range deletion tasks are not using transactions, it may happen that part of a batch gets deleted but the orphans count is not updated yet. This means that we can't expect that the number of records (at storage level) must always be greater than the number of orphans (tracked in range deletion task documents and updated asynchronously).
Purpose of this ticket is to relax this invariant and instead simply return 0 in case the number of records exceeds the number of orphaned documents.
- is duplicated by
-
SERVER-65537 _shardsvrGetStatsForBalancing can invariant during migrations
- Closed