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

Ensure that PrimaryOnlyService states are updated correctly when PrimaryOnlyServiceSkipRebuildingInstances is enabled

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

      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@mongodb.com Cheahuychou Mao
            Reporter:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: