* fix(pool): wip, pool reauth should not interfere with handoff
* fix credListeners map
* fix race in tests
* better conn usable timeout
* add design decision comment
* few small improvements
* update marked as queued
* add Used to clarify the state of the conn
* rename test
* fix(test): fix flaky test
* lock inside the listeners collection
* address pr comments
* Update internal/auth/cred_listeners.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update internal/pool/buffer_size_test.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* wip refactor entraid
* fix maintnotif pool hook
* fix mocks
* fix nil listener
* sync and async reauth based on conn lifecycle
* be able to reject connection OnGet
* pass hooks so the tests can observe reauth
* give some time for the background to execute commands
* fix tests
* only async reauth
* Update internal/pool/pool.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update internal/auth/streaming/pool_hook.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update internal/pool/conn.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* chore(redisotel): use metric.WithAttributeSet to avoid copy (#3552)
In order to improve performance replace `WithAttributes` with `WithAttributeSet`.
This avoids the slice allocation and copy that is done in `WithAttributes`.
For more information see https://github.com/open-telemetry/opentelemetry-go/blob/v1.38.0/metric/instrument.go#L357-L376
* chore(docs): explain why MaxRetries is disabled for ClusterClient (#3551)
Co-authored-by: Nedyalko Dyakov <1547186+ndyakov@users.noreply.github.com>
* exponential backoff
* address pr comments
* address pr comments
* remove rlock
* add some comments
* add comments
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Warnar Boekkooi <wboekkooi@impossiblecloud.com>
Co-authored-by: Justin <justindsouza80@gmail.com>
- replace two similar functions `appendUniqueNode` and `appendIfNotExists` with a generic function.
- simplify the implementation of the `get` method in `clusterNodes`
- keep the member name `_generation` of `clusterNodes` consistent with other types.
- rename a data member `_masterAddr` to `masterAddr`.
Signed-off-by: Xiaolong Chen <fukua95@gmail.com>
* wip
* update documentation
* add streamingcredentialsprovider in options
* fix: put back option in pool creation
* add package level comment
* Initial re authentication implementation
Introduces the StreamingCredentialsProvider as the CredentialsProvider
with the highest priority.
TODO: needs to be tested
* Change function type name
Change CancelProviderFunc to UnsubscribeFunc
* add tests
* fix race in tests
* fix example tests
* wip, hooks refactor
* fix build
* update README.md
* update wordlist
* update README.md
* refactor(auth): early returns in cred listener
* fix(doctest): simulate some delay
* feat(conn): add close hook on conn
* fix(tests): simulate start/stop in mock credentials provider
* fix(auth): don't double close the conn
* docs(README): mark streaming credentials provider as experimental
* fix(auth): streamline auth err proccess
* fix(auth): check err on close conn
* chore(entraid): use the repo under redis org
* chore: set the default value for the `options.protocol` in the `init()` of `options`
Signed-off-by: fukua95 <fukua95@gmail.com>
* add a test
Signed-off-by: fukua95 <fukua95@gmail.com>
---------
Signed-off-by: fukua95 <fukua95@gmail.com>
* fix: handle network error on SETINFO
This fix addresses potential out of order responses as described in `CVE-2025-29923`
* fix: deprecate DisableIndentity and introduce DisableIdentity
Both options will work before V10. In v10 DisableIndentity will be dropped. The preferred flag to use is `DisableIdentity`.
* add helpers to set library name and library info without risk of panic if we try to set both
* refactor code to use helpers
* add example
* refactor tests
* fix testable example
* simplify example
* rename exampl
* fix ring.go
* update example
---------
Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com>
* Update CLIENT-SETINFO to support suffixes
* Update CLIENT-SETINFO
* fix acl log test
* add setinfo option to cluster
* change to DisableIndentity
* change to DisableIndentity