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

Adding new error codes should not force a global recompile

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Build, Internal Code
    • None
    • Dev Platform 2020-08-10

    Description

      Currently, if a new error code is added to the error_codes.err file, this causes the error_codes.h and error_codes.cpp files to be regenerated. Since these files are new, all TUs that depend on any error code are now out of date and must be recompiled.

      This means that pulling master is always a risk for causing a global rebuild. It also means that the SCons cache becomes invalid, and all new objects must be populated.

      It would be better if the error codes mechanism partitioned the space of errors somehow (maybe using an error space concept, or similar), such that adding new errors codes was less disruptive.

      In particular, replication and sharding specific errors could be placed in designated error spaces defined in their own headers. New error codes added to those spaces would only cause recompilation of code that was interested in sharding or replication error codes. Other code would not need to be recompiled.

      Attachments

        Activity

          People

            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: