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

remove redundant secondary index checks from indexbg_killop_apply_ops.js

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor - P4 Minor - P4
    • 4.1.7
    • None
    • Storage
    • None
    • Fully Compatible
    • ALL
    • Storage NYC 2018-12-31
    • 0

    Description

      indexbg_killop_apply_ops.js queries the index catalog on the secondary after RepSetTest.awaitReplication(). Due to the asynchronous nature of background index builds on secondary builds, this is not sufficient to ensure that the index has completed.

      ReplSetTest.stopSet() has logic to wait for background indexes to complete and to detect if the collection on the secondary has different number of indexes from the primary:

      https://github.com/mongodb/mongo/blob/7b1e64f12e855d979232ef7b185002d5c8103353/src/mongo/shell/replsettest.js#L1651

      The test assertions at the end of indexbg_killop_apply_ops.js are not necessary given the checks in ReplSetTest.stopSet().

      Attachments

        Activity

          People

            gregory.wlodarek@mongodb.com Gregory Wlodarek
            benety.goh@mongodb.com Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: