SERVER-43821, PlanExecutor was refactored so that certain errors which previously were not logged became logged.
One such error was WriteConflictException, which was problematic because it lead to spammy log messages. This was reported under
SERVER-74551 and fixed by ensuring WriteConflictExceptions do not take the same logging path that other errors take.
Recently it came up that DuplicateKey error was not logged in 4.4.x but now is in 5.0. This results in extra warning log messages for users with certain workloads that tend to "expect" duplicate key errors from findAndModify. This ticket is to determine:
- Is this a bug?
- Is it something we should change? (Regardless of above)
- If yes to above, are there other error types that we should also change?