[SERVER-32710] Mobile SE : Index creation failed with duplicate key error Created: 16/Jan/18  Updated: 30/Oct/23  Resolved: 29/Jan/18

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 3.7.2

Type: Bug Priority: Major - P3
Reporter: Neha Khatri Assignee: Neha Khatri
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Storage 2018-01-29
Participants:

 Description   

The jstest indexbg_updates.js fails with duplicate key error when executed on a mongodb instance started with Mobile storage engine.

[MongoDFixture:job2] 2018-01-09T01:09:30.890+0000 I COMMAND  [conn62] command
indexbg_updates.$cmd appName: "MongoDB Shell" command: createIndexes {
createIndexes: "coll", indexes: [ { key: { field0: 1.0 }, name: "field0_1", background: true } ],
$db: "indexbg_updates" } exception: E11000 duplicate key error index: index-36-3171480302421944339
dup key: { : null } code:DuplicateKey numYields:223 reslen:154 locks:{ Global: { acquireCount:
{ r: 224, w: 224 } }, Database: { acquireCount: { w: 224, W: 2 }, acquireWaitCount: { W: 2 },
timeAcquiringMicros: { W: 7691 } }, Collection: { acquireCount: { W: 224 }, acquireWaitCount: { W: 224 }



 Comments   
Comment by Sulabh Mahajan [ 01/Feb/18 ]

I confirm that the tests that were skipped for this ticket have been untagged and should run now.

Comment by Githook User [ 29/Jan/18 ]

Author:

{'email': 'neha.khatr@mongodb.com', 'name': 'nehakhatri5'}

Message: SERVER-32710 Enable jstest indexbg_updates in evergreen mobile variant.
Branch: master
https://github.com/mongodb/mongo/commit/9be34975a0d73438b29c3e53918142efa450f7e8

Comment by Githook User [ 29/Jan/18 ]

Author:

{'email': 'neha.khatr@mongodb.com', 'name': 'nehakhatri5'}

Message: SERVER-32710 Fix duplicate key error in case of non-unique index.

When an index build operation happens in parallel with a document update on the
same field, it is possible to get a key that already exists. Ignore it for
non-unique index.
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/f870f254d941304d6d4a556f6f7543eb6af41068

Comment by Sulabh Mahajan [ 16/Jan/18 ]

Possibly related or duplicate of SERVER-32702. Needs further investigation.

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