[SERVER-1470] Update w/upsert ignores dbref field from query on insert Created: 22/Jul/10 Updated: 12/Jul/16 Resolved: 02/Jun/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | 1.4.4, 1.5.5 |
| Fix Version/s: | 2.1.2 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 6 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
> db.test.remove() The pic field is not saved; The actual update is more complicated but this is reduced to the minimum. This was originally a problem from the 2.0 java driver but I doubt that has any bearing on the server. |
| Comments |
| Comment by auto [ 02/Jun/12 ] |
|
Author: {u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: |
| Comment by Joseph Monti [ 23/Jan/12 ] |
|
This bug appears to be able to cause corruption of the shard chunk map when a DBRef is part of the shard key and an upsert is used. I think the mongos is routing the command to a particular shard based on the query doc in the update command, but this bug prevents all the query fields from being stored in the resulting document, so the resulting shard key may reside in a chunk that is supposed to be on another shard. Then when a chunk split happens, it may result in a bad chunk split and corrupt the chunk map. I think this is a similar problem for sharding as if you were to insert a document directly to a shard node rather than going through a mongos. This mongodb-user group posting discusses this issue in a little more detail: https://groups.google.com/forum/#!topic/mongodb-user/yTVVIpFr1dY |