[SERVER-4532] GetLastError on sharded cluster can report incorrect result Created: 20/Dec/11 Updated: 11/Jul/16 Resolved: 12/Dec/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | 1.8.3, 2.2.0, 2.2.1 |
| Fix Version/s: | 2.2.3, 2.3.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Philipp Marx | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 3 |
| Labels: | triage, update | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
3 x shards: Each shard has 3 nodes in as ReplicaSet and each first node has the configd running. Everything is running on AWS-EC2 Linux-Large instances. The application server are using the Java driver 2.7.2. |
||
| Attachments: |
|
||||||||||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||
| Description |
|
Steps: 1. Insert object into shard (successfully) WriteResult:
This is very hard to reproduce since it is very intermittent. Maybe somebody has an vague idea about the exact situation when this might occur. One thing to note is that step 1 and 2 are executed very quickly. I had created a thread in the forum: http://groups.google.com/group/mongodb-user/browse_thread/thread/d1ca7e977dc7455b/973cab27e21df385?lnk=gst&q=smigfu#973cab27e21df385 |
| Comments |
| Comment by auto [ 14/Dec/12 ] | |||||||||||||||||||
|
Author: {u'date': u'2012-12-12T05:18:43Z', u'email': u'eliot@10gen.com', u'name': u'Eliot Horowitz'}Message: Conflicts: src/mongo/s/s_only.cpp | |||||||||||||||||||
| Comment by auto [ 12/Dec/12 ] | |||||||||||||||||||
|
Author: {u'date': u'2012-12-12T05:18:43Z', u'email': u'eliot@10gen.com', u'name': u'Eliot Horowitz'}Message: | |||||||||||||||||||
| Comment by Asya Kamsky [ 09/Dec/12 ] | |||||||||||||||||||
|
Okay just ran the same test with 2.3.2-pre (nightly from today) and it also fails. Ignore previous comment saying that it's been fixed... | |||||||||||||||||||
| Comment by Asya Kamsky [ 09/Dec/12 ] | |||||||||||||||||||
|
In one mongos process moveChunk({_id: 1001}, "othershard");
n is returned as 0 and updatedExisting is not set at all. | |||||||||||||||||||
| Comment by Kay Agahd [ 06/Nov/12 ] | |||||||||||||||||||
|
Please reopen this issue since we can reproduce it with version 2.2.0. The WriteResult obtained by the mongo driver v2.9.3 is as follows:
We are sure that the update was successful because the new values were written into the DB. We observed that the error occurs when the balancer it turned on. When we turn the balancer off, the errors continue BUT when we restart the router (mongos) while keeping the balancer off then these errors wont happen again. Please advice. | |||||||||||||||||||
| Comment by Philipp Marx [ 20/Dec/11 ] | |||||||||||||||||||
|
So is it safe to assume if "updatedExisting" is "true" an update has been performed? The reason I am asking is that we want to check whether the update has successfully been applied and currently we are checking the n-value. | |||||||||||||||||||
| Comment by Eliot Horowitz (Inactive) [ 20/Dec/11 ] | |||||||||||||||||||
|
This was fixed in 2.0 |