[SERVER-24715] Secondary crash with duplicate key error on update with different collation Created: 22/Jun/16  Updated: 19/Jul/16  Resolved: 08/Jul/16

Status: Closed
Project: Core Server
Component/s: Replication, Write Ops
Affects Version/s: 3.3.8
Fix Version/s: 3.3.10

Type: Bug Priority: Major - P3
Reporter: Isabella Siu (Inactive) Assignee: Tess Avitabile (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-23924 Make _id index inherit the collection... Closed
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: TIG 16 (06/24/16)
Participants:
Linked BF Score: 0

 Description   

Secondary crashes with a duplicate key error in both mmapv1 and wiredTiger.

[ReplicaSetFixture:job0:secondary] 2016-06-21T15:22:29.328+0000 I -        [repl writer worker 7] Fatal assertion 16359 DuplicateKey: E11000 duplicate key error collection: test.twodspheredesc index: _id_ dup key: { : "M")3)9?1/" }
[ReplicaSetFixture:job0:secondary] 2016-06-21T15:22:29.328+0000 I -        [repl writer worker 7]
[ReplicaSetFixture:job0:secondary] 
[ReplicaSetFixture:job0:secondary] ***aborting after fassert() failure
[ReplicaSetFixture:job0:secondary] 
[ReplicaSetFixture:job0:secondary] 



 Comments   
Comment by Tess Avitabile (Inactive) [ 08/Jul/16 ]

Resolved by SERVER-23924.

Comment by Tess Avitabile (Inactive) [ 22/Jun/16 ]

This occurs because the _id index inherits the collection default collation, but none of the queries on _id inherit the collection default collation yet. We look up {_id: 's3832.a6 failed'} without converting the string to its ICU comparison key, but the _id index consists of ICU comparison keys, so we don't find it. Then we try to insert it and get a duplicate key error.

We intended to make the _id index inherit the collection default collation as part of SERVER-23924 and ensure all the queries on _id inherit the collection default collation at the same time, but we inadvertently made the _id index inherit the collection default collation as part of SERVER-23945. I'll add this as a dependency of SERVER-23924.

Comment by Tess Avitabile (Inactive) [ 22/Jun/16 ]

No, your repro was very helpful! I think we're pretty sure of the cause now.

Comment by Isabella Siu (Inactive) [ 22/Jun/16 ]

tess.avitabile No, go ahead, I've only been looking at it between other things so I haven't had time to investigate that thoroughly unfortunately.

Comment by Tess Avitabile (Inactive) [ 22/Jun/16 ]

isabella.siu, thanks for the repro. I'm interested in investigating this further to look for a collation bug. Do you mind if I assign this to myself? And did you find anything else while investigating?

Generated at Thu Feb 08 04:07:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.