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

remove redundant secondary index checks from indexbg_killop_apply_ops.js

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.1.7
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Storage NYC 2018-12-31
    • 0

      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().

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

              Created:
              Updated:
              Resolved: