Race condition on index_build_killop_secondary_before_commit test

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor - P4
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • ALL
    • Storage Execution 2025-07-07
    • 0
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Summary
      In the index_build_killop_secondary_before_commit test, the flow involves waiting for the replication process to complete, with either the index build's commit or abort, after the initial sync on the secondary node.

      However, immediately following this, the test proceeds to query the indexes on the secondary node without verifying its availability to accept commands. This can result in the test intermittently failing with a NotPrimaryOrSecondary error due to the secondary not yet being fully ready to process operations.

      Proposed Solution:
      Use rst.awaitSecondary() to wait for the secondary to be ready before verifying the indexes.

            Assignee:
            Ernesto Rodriguez Reina
            Reporter:
            Ernesto Rodriguez Reina
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: