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

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -