[SERVER-51150] Ensure that PrimaryOnlyService states are updated correctly when PrimaryOnlyServiceSkipRebuildingInstances is enabled Created: 24/Sep/20  Updated: 29/Oct/23  Resolved: 25/Sep/20

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 4.8.0

Type: Task Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: Cheahuychou Mao
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-10-05
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 25/Sep/20 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}

Message: SERVER-51150 Ensure that PrimaryOnlyService states are updated correctly when PrimaryOnlyServiceSkipRebuildingInstances is enabled
Branch: master
https://github.com/mongodb/mongo/commit/09979341a1e788a75408d4cf4b00807216f68259

Generated at Thu Feb 08 05:24:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.