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

Do not count duplicate index exception (E11000) as user-assertion

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.6.0, 2.6.5
    • Component/s: Storage
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      We're trying to use MongoDB as a global lock across multiple VMs. We've created a lock collection with a unique index on the type of lock, and we lock by trying to insert a record with a certain lock type value. If there's a duplicate exception, we know it's already locked. Otherwise, we know we're locked.

      The problem now that we upgraded to 2.6.5 from 2.4 is that mongo sees the duplicate key exception as a user error and is logging it into our log files and counting it internally as a user error. So, our monitoring software keeps flagging this as an exception, whereas it's really the way the system was designed to run.

            Assignee:
            Unassigned Unassigned
            Reporter:
            elirov Erez Lirov
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: