Primary records the number of writeConflicts in serverStatus by calling recordCurOpMetrics() in the write path, however secondaries never do that. It is helpful to show writeConflicts counter in serverStatus on secondaries since it can help identify issues during secondary oplog application. For example, we saw a problem on secondary that due to the transaction size exceeding cache threshold, the oplog application got stuck in the writeConflict retry loop. Not recording writeConflicts on secondaries made it hard to confirm the issue and we had to rely on other indirect evidences.
- is related to
-
SERVER-76774 Invariant that secondary oplog application doesn't get prepare conflicts
- Closed
-
SERVER-76818 Separate secondary oplog application storage transactions with many index writes
- Backlog
- related to
-
SERVER-78972 Increment the global writeConflict counter immediately without waiting until recordCurOpMetrics is called
- Backlog