mongodb - Mongo "E11000 duplicate key error" does not indicate which index caused the error when using WiredTiger -
i have mongo collection contains documents
{_id : "thing1", version : 123 } i have created secondary index on version column value must unique across documents in collection
{ v: 1, unique: true, key: { version: -1 } } when use mmapv1, if attempt insert duplicate document (that conflicts against version key) error says
e11000 duplicate key error index: local.sample.$version_-1 dup key: { : 1 } but if i'm using wiredtiger, don't index anymore:
e11000 duplicate key error dup key: { : 1 } i use index determine column failure can retry differently depending on failure. there in configuration that's causing value missing error?
note: using mongo 3.0
it looks bug in mongo 3.0.0. servers running app weren't having issue, local machine , couldn't figure out different between 2 when realized server running mongo 3.0.3.
upgrading local machine 3.0.3 or newer resolved issue.
Comments
Post a Comment