-
Notifications
You must be signed in to change notification settings - Fork 508
fix: Cap WorkerLock timeout intervals to 15 minutes
#19394
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
base: develop
Are you sure you want to change the base?
Changes from 2 commits
ff23d00
548c85b
1d22f90
e864cfe
d416dc8
e555cd6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Prevent excessively long numbers for the retry interval of `WorkerLock`s. Contributed by Famedly. | ||
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -275,8 +275,8 @@ async def __aexit__( | |
|
|
||
| def _get_next_retry_interval(self) -> float: | ||
| next = self._retry_interval | ||
| self._retry_interval = max(5, next * 2) | ||
| if self._retry_interval > Duration(minutes=10).as_secs(): # >7 iterations | ||
| self._retry_interval = min(Duration(minutes=15).as_secs(), next * 2) | ||
| if self._retry_interval > Duration(minutes=10).as_secs(): # >12 iterations | ||
|
||
| logger.warning( | ||
| "Lock timeout is getting excessive: %ss. There may be a deadlock.", | ||
| self._retry_interval, | ||
|
|
@@ -362,8 +362,8 @@ async def __aexit__( | |
|
|
||
| def _get_next_retry_interval(self) -> float: | ||
| next = self._retry_interval | ||
| self._retry_interval = max(5, next * 2) | ||
| if self._retry_interval > Duration(minutes=10).as_secs(): # >7 iterations | ||
| self._retry_interval = min(Duration(minutes=15).as_secs(), next * 2) | ||
| if self._retry_interval > Duration(minutes=10).as_secs(): # >12 iterations | ||
| logger.warning( | ||
| "Lock timeout is getting excessive: %ss. There may be a deadlock.", | ||
| self._retry_interval, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.