An open source Valkey client library that supports Valkey and Redis open source 6.2, 7.0 and 7.2. Valkey GLIDE is designed for reliability, optimized performance, and high-availability, for Valkey and Redis OSS based applications. GLIDE is a multi language client library, written in Rust with programming language bindings, such as Java and Python
Apache License 2.0
265
stars
55
forks
source link
Improve retry logic and update unmaintained dependencies for Rust lint CI #2673
This PR enhances the retry strategy and addresses dependency maintenance issues in the Rust lint CI:
Replaced Unmaintained Crates: Removed the backoff, tokio-retry, futures-time and Derivative crates due to limited functionality and lack of maintenance. Previously, the project used both backoff (unmaintained) and tokio-retry (last updated 3 years ago). These have been replaced with tokio-retry2, which offers enhanced features for exponential backoff. Additionally, Derivative was removed as it is no longer maintained.
Improved Retry Functionality: The new tokio-retry2 crate includes better jitter control, ensuring consistent exponential backoff intervals without erratic timings. The previous implementation produced inconsistent retry intervals (e.g., 192ms, 110ms, 900ms). With tokio-retry2, the jitter range is controlled, maintaining a steady exponential backoff. For slot refresh retries, the strategy has been updated to ExponentialFactorBackoff, resulting in attempts with intervals such as [0ms, 400-600ms, 800-1200ms].
Issue link
This Pull Request is linked to issue (URL): closes #2669
Checklist
Before submitting the PR make sure the following are checked:
[ ] This Pull Request is related to one issue.
[ ] Commit message has a detailed description of what changed and why.
[ ] Tests are added or updated.
[ ] CHANGELOG.md and documentation files are updated.
[ ] Destination branch is correct - main or release
PR Description:
This PR enhances the retry strategy and addresses dependency maintenance issues in the Rust lint CI:
Replaced Unmaintained Crates: Removed the
backoff
,tokio-retry
,futures-time
andDerivative
crates due to limited functionality and lack of maintenance. Previously, the project used bothbackoff
(unmaintained) andtokio-retry
(last updated 3 years ago). These have been replaced withtokio-retry2
, which offers enhanced features for exponential backoff. Additionally,Derivative
was removed as it is no longer maintained.Improved Retry Functionality: The new
tokio-retry2
crate includes better jitter control, ensuring consistent exponential backoff intervals without erratic timings. The previous implementation produced inconsistent retry intervals (e.g., 192ms, 110ms, 900ms). Withtokio-retry2
, the jitter range is controlled, maintaining a steady exponential backoff. For slot refresh retries, the strategy has been updated toExponentialFactorBackoff
, resulting in attempts with intervals such as[0ms, 400-600ms, 800-1200ms]
.Issue link
This Pull Request is linked to issue (URL): closes #2669
Checklist
Before submitting the PR make sure the following are checked: