[SERVER-54284] ExceptionFor<ErrorCodes::WriteConflict> should resolve to WriteConflictException Created: 04/Feb/21 Updated: 29/Oct/23 Resolved: 28/Apr/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 5.0.14, 6.1.0-rc0, 6.0.5 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Mathias Stearn | Assignee: | Amirsaman Memaripour |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | mathias-sa-triage, servicearch-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Backport Requested: |
v6.0, v5.0, v4.4, v4.2
|
||||||||||||||||||||
| Sprint: | Service Arch 2022-04-18, Service Arch 2022-05-02, Service Arch 2022-05-16 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
Right now they are separate types which means that we don't round-trip through Status correctly. This seems like a bug waiting to happen. This can be done by partially specializing ExceptionForDispatcher<ErrorCodes::WriteConflict, CategoryList<categories...>> at https://github.com/mongodb/mongo/blob/c61595630908224faa65856222ae7186b72e54cf/src/mongo/util/assert_util.h#L202-L207. |
| Comments |
| Comment by Githook User [ 19/Jan/23 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: (cherry picked from commit 4fee73e53ecdbfff73d644dd743b66d5e16a1836) |
| Comment by Githook User [ 19/Jan/23 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: (cherry picked from commit ade105650ddf077e095f24455204be7b035d1620) |
| Comment by Githook User [ 25/Oct/22 ] |
|
Author: {'name': 'Blake Oler', 'email': 'blake.oler@mongodb.com', 'username': 'BlakeIsBlake'}Message: |
| Comment by Githook User [ 25/Oct/22 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: (cherry picked from commit ade105650ddf077e095f24455204be7b035d1620) |
| Comment by Githook User [ 05/Jul/22 ] |
|
Author: {'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}Message: |
| Comment by Githook User [ 28/Apr/22 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: |
| Comment by Githook User [ 28/Apr/22 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: |
| Comment by Daniel Gottlieb (Inactive) [ 09/Jun/21 ] |
Voting for this and linked to |
| Comment by Mathias Stearn [ 04/Feb/21 ] |
|
PS, while you're in there, it would be a great time to do this C++17 TODO to make ExceptionFor<ErrorCategory::Foo> work https://github.com/mongodb/mongo/blob/c61595630908224faa65856222ae7186b72e54cf/src/mongo/util/assert_util.h#L218-L220 |