Adds ClientSetName(ctx, name string) error to *PubSub, allowing
callers to label the underlying connection via CLIENT SETNAME.
The name appears in CLIENT LIST output, useful for identifying
PubSub connections when debugging.
Follows the same pattern as Ping() — acquires mutex, gets conn,
writes command, releases conn.
Note: if the connection drops and reconnects, the name will be
lost and must be set again.
Closes#3708
* Dial timeout is per-retry
Use dial timeout for each dial attempt, rather than
all attempts together.
* some tests
* additional tests
* use parent timeout so we can test our changes
---------
Co-authored-by: Nedyalko Dyakov <[email protected]>
* chore(go): update go version to 1.24
* update readmes and ci workflows
* update dockerfile for proxy-fi-server
* address changed test behaviour
* address changed test behaviour
* First draft. One metric - command duration.
Signed-off-by: Elena Kolevska <[email protected]>
* Adds connection state metrics
Signed-off-by: Elena Kolevska <[email protected]>
* wip
Signed-off-by: Elena Kolevska <[email protected]>
* Add phase 1 metrics
* Add client api configurations
* remove redundent code
* refactor: move otel-metrics example to separate module
* refactor: move otel-metrics example to separate module
* remove internal test
* Resolve merge conflicts with upstream/master
* Fix linting issues
* Fix pool idle connection counter bug
* Add OTel performance benchmarking suite
* Improve perf compatison script
* Add phase 2,3 metrics
* Remove local benchmark tests
* Add new fields to tests
* Change db.client.connection.count and db.client.connection.pending_request metric type from UpAndDownCounter to Async gauge.
* fix golangci lint
* Add piplined commands metrics support
* Redesign otel init method
* Address comments
* Fix golangci-lint errors
* Fix passing nil pointer
* Add metric prefix to callbacks and atomic batch registration
* Add unique name for pool.name attr
* Fix unique pool name for pubsub
* Refactor all hardcoded OTel attribute strings to use constants
* Refactor all hardcoded OTel attribute strings to use constants
* extract metric names and pool names as constants, improve error handling
---------
Signed-off-by: Elena Kolevska <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
* chore(tests): add tls tests
* fix: Use ShardPicker for keyless commands instead of random slot
- cmdSlot now returns -1 for keyless commands instead of RandomSlot()
- This allows cmdNodeWithShardPicker to use the configured ShardPicker
(default: RoundRobinPicker) for keyless command routing
- Updated mapCmdsByNode to handle slot == -1 by using ShardPicker
- Updated test to verify round robin distribution works correctly
* chore(image): update clients-test-lib image
* chore(tests): enable tls user auth test
* chore(docker): use proper envs for test image
* chore(image): use latest build
* chore(image): use latest build
* fix(tests): use the correct root cert
* feat(tls): add example app
* chore(docker): address pr comments
* chore(tests): address pr comments
* chore(doc): add README.md in the example app
* fix(tests): do not skip tests
* fix(tests): skip only because of redis version
* Extracts default image name in a var (including osscluster-tls)
Signed-off-by: Elena Kolevska <[email protected]>
* fix(tlstests): remove redundent test
---------
Signed-off-by: Elena Kolevska <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
* Add support for Redis HOTKEYS commands
* Skip hotkeys tests for redis version lower than 8.6
* chore(image): use proper ci image for 8.6
* feat(command): hotkeys wip
* fix(tests): cluster hotkeys
* chore(lint): fmt
* Ensure HOTKEYS commands are only available on standalone Client and NOT on ClusterClient, Ring, or pooled clients
* fix(hotkeys): address pr comments
* chore(ci): use latest build
* fix(hotkeys): fix typo in response
---------
Co-authored-by: Nedyalko Dyakov <[email protected]>
Co-authored-by: Nedyalko Dyakov <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
* fix(conn): guard against nil MaintNotificationsConfig in initConn
In initConn, line 540 accessed MaintNotificationsConfig.EndpointType
unconditionally, even though line 538 correctly nil-checked
MaintNotificationsConfig. When MaintNotificationsConfig is nil, this
caused a nil pointer dereference panic and left optLock.RLock held,
leading to a deadlock on the next call.
Move the EndpointType access inside a nil guard to match the existing
nil check for the Mode field.
Fixes#3675
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* refactor: use maintNotifEnabled for readability
---------
Co-authored-by: Claude Opus 4.6 <[email protected]>
* chore(ci): use 8.6-pre
* chore(ci): add 8.6 in ci matrix
* fix(xinfostream): added new fields in the response
* fix(doctests): fix expected output for XInfoStream
* fix(xinfostreamfull): same as xinfostream
* fix(doctests): fix expected output for XInfoStream
* Support hybrid search params vectors
* Support xinfo stream change in tests
* Revert "Support xinfo stream change in tests"
This reverts commit fde9315b50dd495f96bdaac5300c9828ecdee90b.
* Support xinfo stream change in tests
* Fix stream doctest to support the changes in 8.6
---------
Co-authored-by: ofekshenawa <[email protected]>
Co-authored-by: ofekshenawa <[email protected]>
Add DialerRetries and DialerRetryTimeout fields to ClusterOptions, RingOptions,
and FailoverOptions to allow users to configure connection retry behavior for
cluster, ring, and sentinel clients.
These options were previously only available for the standard Client and were
added to connection pools in #3518. This change ensures feature parity across
all client types.
Changes:
- Add DialerRetries and DialerRetryTimeout fields to ClusterOptions
- Add DialerRetries and DialerRetryTimeout fields to RingOptions
- Add DialerRetries and DialerRetryTimeout fields to FailoverOptions
- Update clientOptions() methods to pass through these values
- Update sentinelOptions() method to pass through these values
- Add tests to verify correct pass-through behavior
Fixes issue where ClusterClient, Ring, and FailoverClient users could not
customize connection retry behavior and were stuck with defaults (5 retries,
100ms backoff).
Co-authored-by: Nedyalko Dyakov <[email protected]>
Update module path from github.com/redis/go-redis/v9 to
github.com/hanzoai/kv-go/v9 for use as the Hanzo KV Go SDK.
- Update go.mod module declaration
- Update all Go imports across 260 files
- Update all submodule go.mod files (extra/*, example/*, internal/customvet)
* fix(rediscmd): include space in simple byte range (#3204)
* add space test
---------
Co-authored-by: fumiyanokesinn <[email protected]>
Co-authored-by: Nedyalko Dyakov <[email protected]>
As of Go 1.20, this is the idiomatic way to convert from Bytes to
String and vice-versa.
This updates `go.mod` to 1.20, builds have already been running on
1.23.x and 1.24.x since #3274.
Co-authored-by: Nedyalko Dyakov <[email protected]>
* chore(go): update go version to 1.21
* chore(aggregators): make aggregators work with 1.21
* fix doctests
* address copilot comments
* use atomic bool for logic and/or aggregators
* Update .github/workflows/build.yml
Co-authored-by: ccoVeille <[email protected]>
* use stable/oldstable, 1.23 and 1.21
* fix versions in README
* add oldstable in wordlist
---------
Co-authored-by: ccoVeille <[email protected]>
* test: reduce flakiness in e2e tests
- Increase traffic analysis duration from 30s to 60s in endpoint types test to allow sufficient time for push notification analysis
- Fix TLS config test function name by replacing Cyrillic 'Т' with ASCII 'T' to ensure proper test discovery
* test: disable TLS configurations test
Skip TLS configurations test due to missing TLS environment in test setup