|
The two updates in this ticket use the persistent task store which is a wrapper around the DBDirectClient (which automatically retries WriteConflictExceptions). The idea of these TODO statements was that after SERVER-64284 completed, the DBDirectClient would retry WriteConflictExceptions as well as ExceptionFor<ErrorCodes::WriteConflict> because they would be the same thing. This is true, but we were still seeing failures when removing the writeConflictRetry loops.
After some investigation, we found that the DBDirectClient only retries on WriteConflictExceptions if there are no strong locks held. In the updates referenced in this ticket, we are holding the ScopedRangeDeleterLock which has a resource mutex lock in mode X. Therefore the DBDirectClient update automatically uses yield policy NO_YIELD (to prevent releasing and reacquiring the X lock) which means WriteConflictRetries will not be re-executed.
Because of this, we cannot actually remove the writeConflictRetry loops around these updates.
|