Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Avoid calling EnableReplication and markVolumeAsSecondary repeatedly #126

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Madhu-1
Copy link
Member

@Madhu-1 Madhu-1 commented Nov 16, 2021

This PR makes the following 2 changes

  • Make EnableReplication call only if the request is to make the volume primary
  • Make markVolumeAsSecondary/DemoteVolume call only if the request is to make the volume secondary and the status.state is not set to secondary.

Signed-off-by: Madhu Rajanna [email protected]

@Madhu-1 Madhu-1 requested review from sp98 and ShyamsundarR November 16, 2021 06:37
@Madhu-1 Madhu-1 force-pushed the refractor-calls branch 2 times, most recently from 5c1f953 to e04f0e0 Compare November 16, 2021 08:18
call EnableVolumeReplication only if the request
is to mark the image as primary

Signed-off-by: Madhu Rajanna <[email protected]>
Demote the volume only once if the instance
state is primary.

Signed-off-by: Madhu Rajanna <[email protected]>
@mergify
Copy link

mergify bot commented Dec 10, 2021

This pull request now has conflicts with the target branch. Could you please resolve conflicts and force push the corrected changes? 🙏

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant