-
Couldn't load subscription status.
- Fork 31
Added backoff_factor in connection to configure retry interval
#342
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
Conversation
|
Hi @autophagy @mfussenegger , Please merge this PR if it looks good. Thank you :) |
|
Soft reminder!! |
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.
Thank you for the PR. A few comments.
- Could you add an entry to
CHANGES.txtdescribing what you are changing here, and why. - Could you document this feature in
docs/connect.txt. Something like:
Backoff Factor
--------------
When attempting to make a request, the connection can be configured so that retries
are made at lengthening time intervals. This can be configured like so::
>>> connection = client.connect(..., backoff_interval=0.1)
The formula for this backoff is::
{backoff factor} * (2 ** ({current retry} - 1))
If ``backoff_factor`` is set to 0.1, then the delay between retries will be
0.0, 0.1, 0.2, 0.4, 0.8, etc. The maximum backoff interval cannot exceed 120 seconds.
By default this setting is 0, meaning that no backoff interval is present between retries.
In the connection options section.
- Could you give your commit a meaningful name with a description of your changes. At the moment the commit message is "fix for Issue#339", which is not super informative. You can do this using
git commit -amend
backoff_factor in connection to configure retry interval for Issue#339
backoff_factor in connection to configure retry interval for Issue#339backoff_factor in connection to configure retry interval
|
@daminichopra Thanks for the commit - please bear with me while I investigate why the tests are not running. |
|
@daminichopra Could you fill out our CLA, please? https://crate.io/community/contribute/cla/ |
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.
thank you for the PR! I left some comments on the docs changes <3
|
Hi @mechanomi , I have updated the PR. Please check. :) |
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.
heya! thanks for updating. looks like there's a merge conflict in the changeset that needs fixing <3
|
Hi @mechanomi , I have updated changes in PR. If it looks good then, please close this PR. Thank you :) |
|
Gentle Reminder!! |
|
@daminichopra Thank you for the contribution! The commit has been merged to master with #344, so I will just close this PR and the resulting image. I'll make a new release of crate-python too 🙂 Thank you for your patience! |
Summary of the changes / Why this is an improvement
Fix for Issue #339 in which new parameter backoff_factor is introduced for retry interval between consecutive retries which can be used to configure value of backoff_factor for other application in which crateDb is used.
Checklist