[SERVER-69634] Allow Missing Parsers For ErrorExtraInfo for InternalOnly ErrorCodes Created: 13/Sep/22  Updated: 16/Dec/22  Resolved: 15/Dec/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: George Wangensteen Assignee: Alex Li
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-72174 Complete TODO listed in SERVER-69634 Closed
related to SERVER-49040 Avoid transmission of internal-only e... Closed
Sprint: Service Arch 2022-12-26, Service Arch 2022-10-17, Service Arch 2022-10-31, Service Arch 2022-11-28, Service Arch 2022-12-12
Participants:

 Description   

In SERVER-50931, we added the "InternalOnly" ErrorCategory. ErrorCodes that are a member of this category are for internal use only and must never be returned in a network response. Increasingly, we've seen ErrorExtraInfo used to append extra information to such Errors, (see https://jira.mongodb.org/browse/SERVER-62720) - but the ErrorExtraInfo infrastructure insists that all EEI implement parse + serialize fns to convert the EEI to and from BSON for transmission over the wire. Additionally, to ensure they can parse all errors they receive all over the network, mongos, mongod, and mongo all invariant that parsers for every EEI are linked into their binaries- this requirement is adding noise to our SCons dependency graph, and takes unfamiliar devs time to debug and fix.

We should first ensure that InternalOnly errors aren't transmitted over the network - SERVER-49040 - and then, in this ticket, allow EEI for internal-only errors to not write parsers and therefore allow them to be excepted from the requirement that their parsers are available to all the binaries. A tentative path forward here would be:
 
(1) dassert if any InternalOnly errors are about to be returned to clients at the service-layer; in prod re-write it to some sentinal ErrorCode (InternalError maybe?)
 
(2) Talk to drivers about what to do if they get that sentinel
 
(3) Allow EEI's for InternalOnly errorcodes to not have serializers/deserilaizers


Generated at Thu Feb 08 06:13:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.