- As part of releasing the critical section on abort.
- As part of acquiring the critical section before transition to kStrictConsistency.
After the changes from
SERVER-55511, it'll be possible to rely on the recovery process in the RecipientStateMachine to correctly reacquire the critical section if the local write hadn't become majority-committed following the failover. The ShardingCatalogClient::kMajorityWriteConcern can then safely be changed to ShardingCatalogClient::kLocalWriteConcern.
Note that we can consolidate releasing the critical section in RecipientStateMachine::_finishReshardingOperation() similar to what is being done in DonorStateMachine::_finishReshardingOperation().