-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sns): Add simple global lock for the periodic task that relates …
…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.
- Loading branch information
Showing
1 changed file
with
105 additions
and
6 deletions.
There are no files selected for viewing
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