|
I have investigated/tested the different usages of WriteConcernOptions() in the sharding code in 4.4. The only one that has given me issues is the one in the migration destination manager when persisting the range deletion task.
What I have discovered is that the issue is not WriteConcernOptions() being overridden by getLastErrorDefaults - WriteConcernOptions() is interpreted as default but it is also interpreted as being supplied by the client which means it is being honored.
The problem with the usage in the migration destination manager is that it is using the persistent task store. The persistent task store sends its commands without any write concern at all and then waits for write concern at the end. This means that the write concern is treated as unset, allowing it to be overridden by getLastErrorDefaults.
This means that the fix from SERVER-73106 is insufficient. In order to have the write concern not be overridden by getLastErrorDefaults, we need to attach WriteConcernOptions() to the operations done in the persistent task store.
|