|
This could be addressed by moving the reacquisition of the migration recipient critical section to happen outside of drain mode, on the migrateThread instead. Additionally, we should then ensure that _recvChunkCommit waits for the critical section to be majority committed (we only wait for local wc now).
Justification: On the happy path, when _recvChunkCommit returns it will be guaranteed that the recipient is holding the critical section. Also, since we use the RecoverableCriticalSection, if the recipient steps down after this point, the critical section will already persist. It is not necessary to retake it under drain mode.
Possible fix patch: 0001-BF-25230-fix.patch
The current PR for SERVER-65947 already implements this solution. Leaving this ticket open until decision is made about possibly backporting SERVER-65947 to 6.0.
|