-
Type:
Improvement
-
Resolution: Done
-
Priority:
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.