-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
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.
- is depended on by
-
SERVER-92361 Remove ValidateResults::valid
- Closed
- split from
-
SERVER-93766 Refactor Validation code
- Investigating