-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Better Semaphore Lease Contention Handling #10666
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
const baseBackoff = time.Millisecond * 300 | ||
const leaseRetryAttempts int64 = 6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it is worth doing now, but it would be nice if these were variables in PresenceService so we could add test coverage for the LimitExceeded error without having to wait 4.5 seconds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I agree. I was trying to limit the noise in this PR though.
Add the same retry logic from `AcquireSemaphore` to `CancelSemaphoreLease` to handle contetion. Without the retry it is possible for a cancellation to fail and the lease in question to remain held for its entire expiry. If the number of cancellations that fail is >= `max_connections` then this causes a user to effectively be locked out until the leases are expired. Fixes #10363
395ad5b
to
e6fce4b
Compare
Add the same retry logic from `AcquireSemaphore` to `CancelSemaphoreLease` to handle contetion. Without the retry it is possible for a cancellation to fail and the lease in question to remain held for its entire expiry. If the number of cancellations that fail is >= `max_connections` then this causes a user to effectively be locked out until the leases are expired. Fixes #10363
Add the same retry logic from `AcquireSemaphore` to `CancelSemaphoreLease` to handle contetion. Without the retry it is possible for a cancellation to fail and the lease in question to remain held for its entire expiry. If the number of cancellations that fail is >= `max_connections` then this causes a user to effectively be locked out until the leases are expired. Fixes #10363
Add the same retry logic from `AcquireSemaphore` to `CancelSemaphoreLease` to handle contetion. Without the retry it is possible for a cancellation to fail and the lease in question to remain held for its entire expiry. If the number of cancellations that fail is >= `max_connections` then this causes a user to effectively be locked out until the leases are expired. Fixes #10363
Add the same retry logic from `AcquireSemaphore` to `CancelSemaphoreLease` to handle contetion. Without the retry it is possible for a cancellation to fail and the lease in question to remain held for its entire expiry. If the number of cancellations that fail is >= `max_connections` then this causes a user to effectively be locked out until the leases are expired. Fixes #10363
Add the same retry logic from `AcquireSemaphore` to `CancelSemaphoreLease` to handle contetion. Without the retry it is possible for a cancellation to fail and the lease in question to remain held for its entire expiry. If the number of cancellations that fail is >= `max_connections` then this causes a user to effectively be locked out until the leases are expired. Fixes #10363
* Better Semaphore Lease Contention Handling (#10666) Add the same retry logic from `AcquireSemaphore` to `CancelSemaphoreLease` to handle contetion. Without the retry it is possible for a cancellation to fail and the lease in question to remain held for its entire expiry. If the number of cancellations that fail is >= `max_connections` then this causes a user to effectively be locked out until the leases are expired. Fixes #10363
Add the same retry logic from
AcquireSemaphore
toCancelSemaphoreLease
to handle contetion. Without the retry it is possible for a cancellation
to fail and the lease in question to remain held for its entire expiry.
If the number of cancellations that fail is >=
max_connections
thenthis causes a user to effectively be locked out until the leases are
expired.
Fixes #10363