Donor shards engage the critical section on the collection being resharded during the shard version refresh with CoordinatorStateEnum::kBlockingWrites. Not engaging the critical section during the shard version refresh would be data loss because on recovery, from a primary failover, the donor shard would be allowing new incoming writes possibly after it had written the final resharding oplog entries already.
The DonorStateEnum::kPreparingToBlockWrites state therefore provides no benefit and can safely be removed.
- related to
-
SERVER-57952 Resharding donor shards cannot complete a shard version refresh after acquiring the critical section, stalling the resharding operation
- Closed