Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not remove subscription if it already existed before subscription creation #1887

Merged
merged 2 commits into from
Aug 6, 2024

Conversation

moscicky
Copy link
Collaborator

@moscicky moscicky commented Aug 5, 2024

This PR changes rollbacks of multi dc commands to be exception aware and changes CreateSubscriptionRepositoryCommand so that subscription is not removed if it already existed before.

That could happen if two subscription creation requests are made concurrently so that both requests are marked as valid, one creates subscription in storage and the other fails and performs rollback which causes the subscription to be removed.

In multi DC setup, this would result in inconsistent state:

dc 1 -> null
dc 2 -> susbscription

pitagoras3
pitagoras3 previously approved these changes Aug 5, 2024
@moscicky moscicky requested a review from faderskd August 5, 2024 11:33
@moscicky moscicky merged commit 0bf4c0c into master Aug 6, 2024
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants