[SERVER-3069] Add extra fields to getLastError output on duplicate key error Created: 09/May/11 Updated: 06/Dec/22 Resolved: 11/Oct/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Mathias Stearn | Assignee: | Backlog - Storage Execution Team |
| Resolution: | Duplicate | Votes: | 21 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Storage Execution
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Should at least have field name and duplicated value. See http://stackoverflow.com/questions/5939720/better-ways-to-handle-mongodb-exceptions |
| Comments |
| Comment by Eli Skeggs [ 17/Oct/13 ] |
|
We have a number of collections with multiple unique indexes that could be violated. It looks like our only option to differentiate which index was violated in the event of an E11000 is to parse the error message, which works but is a hacky solution to what I would imagine is not an uncommon problem. This feature would be very much appreciated. Thanks! |
| Comment by Aristarkh Zagorodnikov [ 11/Aug/11 ] |
|
Voted on this, but thought I should write something too. |