Skip to content

Commit

Permalink
1. Disable command retries for CME connections due to:
Browse files Browse the repository at this point in the history
	a. Absence of command retry configuration in client creation params making retry mechanics unexpected, confusing and inconsistent with command timeout constrains.
	b. Retry semantics are inconsistent between the CME and CMD client since CMD lacks the retry logic

Signed-off-by: ikolomi <[email protected]>
  • Loading branch information
ikolomi committed Sep 23, 2024
1 parent 62da4c5 commit 70a9065
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#### Changes
* Core: Improve command retry semantics ([#2330](https://github.com/valkey-io/valkey-glide/pull/2330))
* Node: Fix binary variant for xinfogroups and lrem ([#2324](https://github.com/valkey-io/valkey-glide/pull/2324))
* Node: Fixed missing exports ([#2301](https://github.com/valkey-io/valkey-glide/pull/2301))
* Node: Use `options` struct for all optional arguments ([#2287](https://github.com/valkey-io/valkey-glide/pull/2287))
Expand Down
6 changes: 5 additions & 1 deletion glide-core/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ mod value_conversion;
use tokio::sync::mpsc;

pub const HEARTBEAT_SLEEP_DURATION: Duration = Duration::from_secs(1);
pub const DEFAULT_RETRIES: u32 = 3;

// Dont use retries because we do not expose this configuration to the user,
// making it is unexpected to have command retries
pub const DEFAULT_RETRIES: u32 = 0;

pub const DEFAULT_RESPONSE_TIMEOUT: Duration = Duration::from_millis(250);
pub const DEFAULT_CONNECTION_ATTEMPT_TIMEOUT: Duration = Duration::from_millis(250);
pub const DEFAULT_PERIODIC_TOPOLOGY_CHECKS_INTERVAL: Duration = Duration::from_secs(60);
Expand Down

0 comments on commit 70a9065

Please sign in to comment.