[SERVER-16143] WriteConflict returned to client with concurrent multikey index inserts Created: 13/Nov/14  Updated: 11/Jul/16  Resolved: 26/Nov/14

Status: Closed
Project: Core Server
Component/s: Concurrency
Affects Version/s: 2.8.0-rc0
Fix Version/s: 2.8.0-rc2

Type: Bug Priority: Major - P3
Reporter: David Percy Assignee: Kaloian Manassiev
Resolution: Done Votes: 0
Labels: 28qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: HTML File writeconflict-invariant-log     HTML File writeconflict-log    
Issue Links:
Depends
depends on SERVER-16159 Batched insert command does not yield Closed
Operating System: ALL
Participants:

 Description   

We have a handful of threads doing inserts and finds against a collection with a multikey index. The inserts should succeed, but the WriteResult returned by the server looks like this:

{
    "nInserted" : 0,
    "writeError" : {
        "code" : 112,
        "errmsg" : "WriteConflict"
    }
}

The bug can happen with as few as 2 threads, but it is more reliable to reproduce with ~8 threads. Running with dozens or hundreds of threads seems to make it less reliable to reproduce.



 Comments   
Comment by Githook User [ 26/Nov/14 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-16143 Update multiKey metadata in a separate transaction
Branch: master
https://github.com/mongodb/mongo/commit/45790039049d7375beafe122622363d35ce990c2

Comment by Githook User [ 24/Nov/14 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-16143 Remove RESOURCE_DOCUMENT and add a RESOURCE_METADATA
Branch: master
https://github.com/mongodb/mongo/commit/5f54b41eb7ab23f1594610aa6950d07b666f0deb

Comment by Eliot Horowitz (Inactive) [ 13/Nov/14 ]

Repro?

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