Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-80317

DuplicateKey error message is logged from findAndModify after 5.0 upgrade

    • Query Execution
    • ALL

      In 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. (Kevin Cherkauer: This behavior was introduced in 4.7 by SERVER-47212.) 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?

        1. image-2024-05-29-14-08-33-769.png
          246 kB
          Aditya Srivastava

            Unassigned Unassigned
            ian.boros@mongodb.com Ian Boros
            0 Vote for this issue
            14 Start watching this issue