Skip to content

Commit

Permalink
Remove primary reconfig restrictions that we no longer need #4430
Browse files Browse the repository at this point in the history
  • Loading branch information
SidSethi committed Dec 12, 2022
1 parent 3599c2d commit 471ee94
Showing 1 changed file with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -617,20 +617,6 @@ const _issueUpdateReplicaSetOp = async (
response.result = UpdateReplicaSetJobResult.SuccessIssueReconfigDisabled
return response
}
/**
* TODO: Remove this after rollout. This is an extra gating condition that only applies to primary reconfigs:
* ONLY issue reconfigs of primaries when the cause of the reconfig is that the primary endpoint was deregistered or changed.
*/
const primaryExistsOnChain = await getMapOfCNodeEndpointToSpId(
logger
).hasOwnProperty(primary)
const isPrimaryReconfig =
reconfigType === RECONFIG_MODES.PRIMARY_AND_OR_SECONDARIES
const shouldSkipPrimaryReconfig = isPrimaryReconfig && primaryExistsOnChain
if (shouldSkipPrimaryReconfig) {
response.result = UpdateReplicaSetJobResult.SuccessIssueReconfigDisabled
return response
}

const cNodeEndpointToSpIdMap = await getMapOfCNodeEndpointToSpId(logger)

Expand Down

0 comments on commit 471ee94

Please sign in to comment.