-
Notifications
You must be signed in to change notification settings - Fork 332
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
feat(sns): Add simple global lock for the periodic task that relates to upgrades #2193
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8aea53b
to
6026877
Compare
6026877
to
f5f9405
Compare
aterga
reviewed
Oct 23, 2024
aterga
reviewed
Oct 23, 2024
aterga
reviewed
Oct 23, 2024
aterga
reviewed
Oct 23, 2024
aterga
reviewed
Oct 23, 2024
aterga
reviewed
Oct 23, 2024
aterga
reviewed
Oct 23, 2024
aterga
approved these changes
Oct 23, 2024
335cd84
to
2b8b01f
Compare
2b8b01f
to
419bcd0
Compare
nmattia
pushed a commit
that referenced
this pull request
Oct 25, 2024
…to upgrades (#2193) ## What This PR adds a lock around checking the upgrade status and refreshing the cached upgrade steps. This ensures that they do not interleave with one another (or themselves). ## Why This is useful because it simplifies our reasoning about any logic that may be impacted by such an interleaving. ## Additional Notes This implementation is not ideal, because we attempt to acquire the lock unconditionally, which means that in cases where the lock was acquired it's impossible to say why. And in the unlikely even that the lock is not released, it would be useful to know what actual work necessitated it be acquired. #2124 builds upon this PR to create a more robust locking mechanism.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
This PR adds a lock around checking the upgrade status and refreshing the cached upgrade steps. This ensures that they do not interleave with one another (or themselves).
Why
This is useful because it simplifies our reasoning about any logic that may be impacted by such an interleaving.
Additional Notes
This implementation is not ideal, because we attempt to acquire the lock unconditionally, which means that in cases where the lock was acquired it's impossible to say why. And in the unlikely even that the lock is not released, it would be useful to know what actual work necessitated it be acquired. #2124 builds upon this PR to create a more robust locking mechanism.