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

Avoid reporting duplicate multikey errors when there are index inconsistencies

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.7.0
    • None
    • None
    • None
    • Fully Compatible
    • Execution Team 2020-08-10, Execution Team 2020-08-24

    Description

      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.

      Attachments

        Activity

          People

            fausto.leyva@mongodb.com Fausto Leyva (Inactive)
            shinyee.tan@mongodb.com Shin Yee Tan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: