-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Fully Compatible
-
Execution Team 2020-08-10, Execution Team 2020-08-24
When there are multikey errors and index inconsistencies, traverseRecordStore is called in the second phase of validation which ends up calling validateRecord a second time. In validateRecord, multikey checks will perform again which duplicates work in the first phase of validation.
Side effect of this is that when validate is called without repair mode and there is an index with missing multikey documents, the same error appears twice.
ie. "errors":["Index non_mk_index is not multikey but has more than one key in document RecordId(1)","Index non_mk_index is not multikey but has more than one key in document RecordId(1)"]
This behavior is strange because in the second phase of validation when traverseRecordStore is called, it is passed a tempValidateResults and thus the error should not be appended to the final validateResults.