Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-69634

Allow Missing Parsers For ErrorExtraInfo for InternalOnly ErrorCodes

    • Type: Icon: Task Task
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • 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

      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

            Assignee:
            alex.li@mongodb.com Alex Li
            Reporter:
            george.wangensteen@mongodb.com George Wangensteen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: