[SERVER-16006] write conflict on single-update isn't being retried Created: 06/Nov/14  Updated: 10/Dec/14  Resolved: 07/Nov/14

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 2.8.0-rc0
Fix Version/s: None

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

Issue Links:
Duplicate
duplicates SERVER-15998 Don't fall-through on WriteConflictEx... Closed
Related
Operating System: ALL
Steps To Reproduce:

repro script / jstest that runs two threads that update the same document:

load('jstests/libs/parallelTester.js');
 
db.foo.drop();
db.foo.insert({});
assert.eq(1, db.foo.count());
 
var t0 = new ScopedThread(function() {
    for (var i=0; i<100; ++i) {
        var res = db.foo.update({}, { $inc: { x: 1 } });
        assert.eq(1, res.nModified, res);
    }
    return 'ok';
});
 
 
t0.start();
 
for (var i=0; i<100; ++i) {
    var res = db.foo.update({}, { $inc: { y: 1 } });
    assert.eq(1, res.nModified, res);
}
 
t0.join();

Participants:

 Description   

When using WiredTiger, if a WriteConflictException happens with a single update, the operation returns nModified: 0 to the client, and the document is not updated.


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