Ensure that PrimaryOnlyService states are updated correctly when PrimaryOnlyServiceSkipRebuildingInstances is enabled

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.8.0
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Fully Compatible
    • Sharding 2020-10-05
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Currently,  the failpoint PrimaryOnlyServiceSkipRebuildingInstances added in SERVER-51052 can’t be used in tests that use primary only services. It forces 
      PrimaryOnlyService::_rebuildInstances to return early without setting _state to kRunning and do _rebuildCV.notify_all(). This causes PrimaryOnlyService::getOrCreateInstance to hang since it waits for _rebuildCV when _state is kRebuilding.

      Instead of making _rebuildInstances return early, the failpoint should just skip this code block.

            Assignee:
            Cheahuychou Mao
            Reporter:
            Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: