[SERVER-4639] update yielding with upsert can duplicate a document Created: 06/Jan/12 Updated: 11/Jul/16 Resolved: 18/Jan/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Concurrency, Write Ops |
| Affects Version/s: | None |
| Fix Version/s: | 2.1.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Eliot Horowitz (Inactive) | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
if 2 threads are accessing the same document, and 1 thread moves the document "back" the 2nd thread can miss it |
| Comments |
| Comment by Ian Whalen (Inactive) [ 21/Sep/12 ] |
|
litaopier as this ticket is closed, can you please open up a separate SERVER ticket so that we can debug with you and see if the problem is still outstanding? |
| Comment by taopier [ 21/Sep/12 ] |
|
db version v2.0.5 using strom, the threads(also in different process) run code : myDB("mytable").update(DBObject("key1" -> new ObjectId(myKey), "key2" -> coKey), myUpdates, true, false, WriteConcern.SAFE) although the possibility is quite low, say, I use storm to upsert around 60k records, and 4 duplicated appeared, most of their behavior is as what we expected. I checked this issue, it seems that what we described is probably the same thing. the following is the related DB log: .... update: { field1: "f1", field2: "f2" } nscanned:3341 nupdated:1 upsert:1 keyUpdates:0 numYields: 26 locks(micros) w:7033 333ms update: { field1: "f1", field2: "f2" } nscanned:3343 nupdated:1 upsert:1 keyUpdates:0 numYields: 26 locks(micros) w:6906 335ms we can see that the commands which cause duplicated records is shown above. other conditions are: ), it works ok, no duplicated record generated. any idea? I'm wondering whether this bug is fixed thoroughly. |
| Comment by auto [ 06/Jan/12 ] |
|
Author: {u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: using PageFaultException in various places in update |