[SERVER-60990] PrimaryOnlyService shouldn't check for conflicting instances when rebuilding instances on stepup Created: 26/Oct/21  Updated: 29/Oct/23  Resolved: 11/Nov/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.2.0-rc0

Type: Task Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: Didier Nadeau
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2021-11-15
Participants:

 Description   

SERVER-60752 made constructInstance take an 'existingInstances' parameter so that services can check if the new instance would conflict with any existing instances.

However, constructInstance is called in both PrimaryOnlyService::getOrCreateInstance and PrimaryOnlyService::_rebuildInstances. There's no need to check for conflicting instances in _rebuildInstances, so we pass an empty 'existingInstances' vector.

Instead, we should make a separate method 'checkIfConflictsWithOtherInstances' that is only called on getOrCreateInstance.



 Comments   
Comment by Githook User [ 11/Nov/21 ]

Author:

{'name': 'Didier Nadeau', 'email': 'didier.nadeau@mongodb.com', 'username': 'nadeaudi'}

Message: SERVER-60990 Split instance conflict check from PrimaryOnlyService::constructInstance
Branch: master
https://github.com/mongodb/mongo/commit/16133fd3ab82a5e66017128ac292c8e4f97ef6fe

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