[JAVA-1103] CommandResult.getException not detecting "caused by" duplicate key exception Created: 31/Jan/14 Updated: 30/Jan/15 Resolved: 17/Oct/14 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Error Handling |
| Affects Version/s: | 2.11.3 |
| Fix Version/s: | 2.13.0, 3.0.0 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | John Gallagher | Assignee: | Ross Lawley |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Java Driver 2.11.3, Mongos + Mongo 2.4.8 |
||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
An exception will not get converted to the expected type if a duplicate key error is the underlying error: (hosts/ips/oids changed)
I believe this happens when the mongos adds the duplicate key error as a "caused by" error. |
| Comments |
| Comment by Githook User [ 30/Jan/15 ] |
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: Support sharded DuplicateKey exceptions
|
| Comment by Githook User [ 17/Oct/14 ] |
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: Support sharded DuplicateKey exceptions
|
| Comment by Githook User [ 17/Oct/14 ] |
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: Support sharded DuplicateKey exceptions
|
| Comment by Ross Lawley [ 09/Jul/14 ] |
|
Thanks hoffrocket for the Pull request - we will review in due course |
| Comment by Jon Hoffman [ 08/Jul/14 ] |
|
This is still a problem in 2.12.2 on mongoS 2.4.9. Created a pull request to fix. https://github.com/mongodb/mongo-java-driver/pull/225 You can duplicate the problem using the test project here: https://github.com/hoffrocket/mongo-dup-key |
| Comment by John Gallagher [ 31/Jan/14 ] |
|
Related: |