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

Set retry_count of redlock to 0 by default #24

Merged
merged 1 commit into from
May 9, 2021

Conversation

sharshenov
Copy link
Member

The default value of retry_count of redlock-rb is 3. This setting stands for a number of attempts to set the lock, not the number of retries on Redis connection error.

It adds extra delay on jobs enqueuing if jobs have uniqueness strategies until_executing, until_executed, until_expired, or until_and_while_executing. While some retries might be helpful for locking on execution, the activejob-uniqueness is more about jobs uniqueness and it should process lock conflicts as fast as possible in order not to slow jobs enqueuing down.

fixes #23

The default value of retry_count of redlock-rb is 3. This setting stands for a number of attempts to set the lock, not the number of retries on Redis connection error.

It adds extra delay on jobs enqueuing if jobs have uniqueness strategies until_executing, until_executed, until_expired, or until_and_while_executing. While some retries might be helpful for locking on execution, the activejob-uniqueness is more about jobs uniqueness and it should process lock conflicts as fast as possible in order not to slow jobs enqueuing down.

fixes #23
@sharshenov sharshenov added this to the 0.2.0 milestone May 9, 2021
@sharshenov sharshenov merged commit 4cb31b1 into main May 9, 2021
@sharshenov sharshenov deleted the change-default-retry-count branch May 9, 2021 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The default value of retry_count for redlock-rb causes extra delays
1 participant