Avoid reporting duplicate multikey errors when there are index inconsistencies

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Execution Team 2020-08-10, Execution Team 2020-08-24
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Fausto Leyva (Inactive)
            Reporter:
            Shin Yee Tan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: