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

Regularize collection/reporting of ValidationResults

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • RSS Sydney
    • Fully Compatible
    • GregsList - 2024-09-03, PopcornChicken - 2024-09-17

      The ValidateResults (and IndexValidateResults) structs are the primary way results of a validation pass are gathered and communicated to the user.

      Unfortunately, due to the way these classes are designed, there is no standard way to communicate that a given finding detected by the pass should be communicated to the user in a certain way, leading to some inconsistencies:

      • The "validity" of various objects is not treated in a standardized way, e.g. the validity of index results and results of the total validation are not aligned (SERVER-82278), certain errors are not treated as invalidating the results (SERVER-92361)
      • errors reported for index validation are sometimes duplicated in multiple fields of the validation result (SERVER-89857)

      We propose to solve this problem by refactoring the ValidationResult class to be opinionated w.r.t. the way that generated errors are reported. Specifically:

      • The validity of the result should derive solely from the presence (or absence) of errors
      • No duplication should occur in the reporting.
        • If there are any errors in an index, then the main collection validation's list of errors should only note "index XYZ has errors".
      • bounds on the size of error lists should be respected for all sources of inconsistencies
      • Where possible, the format of errors should be regularized for easy ingestion by automated tooling.

            Assignee:
            aaron.balsara@mongodb.com Aaron Balsara
            Reporter:
            nic.hollingum@mongodb.com Nic Hollingum
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: