[SERVER-17532] Duplicate key error message does not contain index name anymore Created: 11/Mar/15 Updated: 18/Sep/15 Resolved: 11/Mar/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | WiredTiger |
| Affects Version/s: | 3.0.0 |
| Fix Version/s: | 3.0.2, 3.1.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Rainer Frey | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | Fit&Finish | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Completed: | |||||||||||||||||
| Steps To Reproduce: | In mongo shell:
Result with WiredTiger:
Result with MMAPv1:
|
||||||||||||||||
| Participants: |
| Description |
|
With WiredTiger, the error returned by a duplicate key does not contain the name of the violated unique index. It is therefore not possible to identify which field in the inserted document causes the violation. |
| Comments |
| Comment by Githook User [ 25/Mar/15 ] |
|
Author: {u'username': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: (cherry picked from commit 5fd3dfce18655932165ebadef0bbe5ed58f678de) |
| Comment by Ilya Kantor [ 24/Mar/15 ] |
|
Guess mongo guys are too busy to reply. Asked my colleagues, the feedback says – 3.0 is not even a "for development" release, and very far from production. |
| Comment by Ilya Kantor [ 17/Mar/15 ] |
|
Thanks! 3.0.2 is going to be... really soon, right? |
| Comment by Ilya Kantor [ 17/Mar/15 ] |
|
This bug breaks my project, cause it shows the error message depending on the index. And the index is just not provided now. As of now, could you please tell the approximate estimate of the release with this bug fixed? Or maybe I should reinstall Mongo and use 3.0.0 with the old storage engine? |
| Comment by Eliot Horowitz (Inactive) [ 17/Mar/15 ] |
|
It is still being decided if we'll backport to 3.0.x. |
| Comment by Rainer Frey [ 17/Mar/15 ] |
|
Thanks for fixing. I see that a back port to 3.0 is requested. What is the procedure for this? Is it still to be decided whether that will be done? And if done, will the fixed version be added to this issue, or is there a separate back port issue (or any other way for me to notice that there's a version put with this fix)? |
| Comment by Githook User [ 11/Mar/15 ] |
|
Author: {u'username': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: |
| Comment by Rainer Frey [ 11/Mar/15 ] |
|
This issue is relevant for collections with more than one unique index, of course. I used the _id index as an example, but the behavior is the same for a custom unique index. We use the Java driver, and there's the same difference in the message of the DuplicateKeyException. A solution that makes the violated index name available in the DuplicateKeyException's associated CommandResult object would be sufficient (even preferred) for us. A fix for other interfaces like mongo shell is nice to have but not relevant to us. |