From 46eb7ba9a78d09c4bccabf1068b8d6c777d9c795 Mon Sep 17 00:00:00 2001 From: "renovate-sh-app[bot]" <219655108+renovate-sh-app[bot]@users.noreply.github.com> Date: Wed, 3 Dec 2025 13:50:45 +0000 Subject: [PATCH] fix(deps): update module github.com/redis/go-redis/v9 to v9.17.1 | datasource | package | from | to | | ---------- | ---------------------------- | ------- | ------- | | go | github.com/redis/go-redis/v9 | v9.17.0 | v9.17.1 | Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 +- .../redis/go-redis/v9/RELEASE-NOTES.md | 22 ++++++ .../github.com/redis/go-redis/v9/command.go | 1 + .../redis/go-redis/v9/internal/pool/conn.go | 15 ++-- .../v9/internal/pool/global_time_cache.go | 74 ------------------- .../redis/go-redis/v9/internal/pool/pool.go | 6 -- .../github.com/redis/go-redis/v9/version.go | 2 +- vendor/modules.txt | 2 +- 9 files changed, 36 insertions(+), 92 deletions(-) delete mode 100644 vendor/github.com/redis/go-redis/v9/internal/pool/global_time_cache.go diff --git a/go.mod b/go.mod index 798833d985dc7..4380ce674504b 100644 --- a/go.mod +++ b/go.mod @@ -87,7 +87,7 @@ require ( github.com/prometheus/client_model v0.6.2 github.com/prometheus/common v0.67.4 github.com/prometheus/prometheus v0.307.3 - github.com/redis/go-redis/v9 v9.17.0 + github.com/redis/go-redis/v9 v9.17.1 github.com/segmentio/fasthash v1.0.3 github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c github.com/shurcooL/vfsgen v0.0.0-20230704071429-0000e147ea92 diff --git a/go.sum b/go.sum index 6f929b7310ebe..64d618de3bf64 100644 --- a/go.sum +++ b/go.sum @@ -1044,8 +1044,8 @@ github.com/puzpuzpuz/xsync/v3 v3.5.1 h1:GJYJZwO6IdxN/IKbneznS6yPkVC+c3zyY/j19c++ github.com/puzpuzpuz/xsync/v3 v3.5.1/go.mod h1:VjzYrABPabuM4KyBh1Ftq6u8nhwY5tBPKP9jpmh0nnA= github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 h1:bsUq1dX0N8AOIL7EB/X911+m4EHsnWEHeJ0c+3TTBrg= github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/redis/go-redis/v9 v9.17.0 h1:K6E+ZlYN95KSMmZeEQPbU/c++wfmEvfFB17yEAq/VhM= -github.com/redis/go-redis/v9 v9.17.0/go.mod h1:u410H11HMLoB+TP67dz8rL9s6QW2j76l0//kSOd3370= +github.com/redis/go-redis/v9 v9.17.1 h1:7tl732FjYPRT9H9aNfyTwKg9iTETjWjGKEJ2t/5iWTs= +github.com/redis/go-redis/v9 v9.17.1/go.mod h1:u410H11HMLoB+TP67dz8rL9s6QW2j76l0//kSOd3370= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/richardartoul/molecule v1.0.0 h1:+LFA9cT7fn8KF39zy4dhOnwcOwRoqKiBkPqKqya+8+U= diff --git a/vendor/github.com/redis/go-redis/v9/RELEASE-NOTES.md b/vendor/github.com/redis/go-redis/v9/RELEASE-NOTES.md index d4b245b2a87da..60bc7c19976fe 100644 --- a/vendor/github.com/redis/go-redis/v9/RELEASE-NOTES.md +++ b/vendor/github.com/redis/go-redis/v9/RELEASE-NOTES.md @@ -1,5 +1,27 @@ # Release Notes +# 9.17.1 (2025-11-25) + +## 🐛 Bug Fixes + +- add wait to keyless commands list ([#3615](https://github.com/redis/go-redis/pull/3615)) by [@marcoferrer](https://github.com/marcoferrer) +- fix(time): remove cached time optimization ([#3611](https://github.com/redis/go-redis/pull/3611)) by [@ndyakov](https://github.com/ndyakov) + +## 🧰 Maintenance + +- chore(deps): bump golangci/golangci-lint-action from 9.0.0 to 9.1.0 ([#3609](https://github.com/redis/go-redis/pull/3609)) +- chore(deps): bump actions/checkout from 5 to 6 ([#3610](https://github.com/redis/go-redis/pull/3610)) +- chore(script): fix help call in tag.sh ([#3606](https://github.com/redis/go-redis/pull/3606)) by [@ndyakov](https://github.com/ndyakov) + +## Contributors +We'd like to thank all the contributors who worked on this release! + +[@marcoferrer](https://github.com/marcoferrer) and [@ndyakov](https://github.com/ndyakov) + +--- + +**Full Changelog**: https://github.com/redis/go-redis/compare/v9.17.0...v9.17.1 + # 9.17.0 (2025-11-19) ## 🚀 Highlights diff --git a/vendor/github.com/redis/go-redis/v9/command.go b/vendor/github.com/redis/go-redis/v9/command.go index b99f1312af6e1..2dbc2ad872d1d 100644 --- a/vendor/github.com/redis/go-redis/v9/command.go +++ b/vendor/github.com/redis/go-redis/v9/command.go @@ -64,6 +64,7 @@ var keylessCommands = map[string]struct{}{ "sync": {}, "unsubscribe": {}, "unwatch": {}, + "wait": {}, } type Cmder interface { diff --git a/vendor/github.com/redis/go-redis/v9/internal/pool/conn.go b/vendor/github.com/redis/go-redis/v9/internal/pool/conn.go index 7682aa8724037..95d83bfde48b1 100644 --- a/vendor/github.com/redis/go-redis/v9/internal/pool/conn.go +++ b/vendor/github.com/redis/go-redis/v9/internal/pool/conn.go @@ -27,16 +27,17 @@ var ( errConnNotAvailableForWrite = errors.New("redis: connection not available for write operation") ) -// getCachedTimeNs returns the current time in nanoseconds from the global cache. -// This is updated every 50ms by a background goroutine, avoiding expensive syscalls. -// Max staleness: 50ms. +// getCachedTimeNs returns the current time in nanoseconds. +// This function previously used a global cache updated by a background goroutine, +// but that caused unnecessary CPU usage when the client was idle (ticker waking up +// the scheduler every 50ms). We now use time.Now() directly, which is fast enough +// on modern systems (vDSO on Linux) and only adds ~1-2% overhead in extreme +// high-concurrency benchmarks while eliminating idle CPU usage. func getCachedTimeNs() int64 { - return globalTimeCache.nowNs.Load() + return time.Now().UnixNano() } -// GetCachedTimeNs returns the current time in nanoseconds from the global cache. -// This is updated every 50ms by a background goroutine, avoiding expensive syscalls. -// Max staleness: 50ms. +// GetCachedTimeNs returns the current time in nanoseconds. // Exported for use by other packages that need fast time access. func GetCachedTimeNs() int64 { return getCachedTimeNs() diff --git a/vendor/github.com/redis/go-redis/v9/internal/pool/global_time_cache.go b/vendor/github.com/redis/go-redis/v9/internal/pool/global_time_cache.go deleted file mode 100644 index d7d21ea724714..0000000000000 --- a/vendor/github.com/redis/go-redis/v9/internal/pool/global_time_cache.go +++ /dev/null @@ -1,74 +0,0 @@ -package pool - -import ( - "sync" - "sync/atomic" - "time" -) - -// Global time cache updated every 50ms by background goroutine. -// This avoids expensive time.Now() syscalls in hot paths like getEffectiveReadTimeout. -// Max staleness: 50ms, which is acceptable for timeout deadline checks (timeouts are typically 3-30 seconds). -var globalTimeCache struct { - nowNs atomic.Int64 - lock sync.Mutex - started bool - stop chan struct{} - subscribers int32 -} - -func subscribeToGlobalTimeCache() { - globalTimeCache.lock.Lock() - globalTimeCache.subscribers += 1 - globalTimeCache.lock.Unlock() -} - -func unsubscribeFromGlobalTimeCache() { - globalTimeCache.lock.Lock() - globalTimeCache.subscribers -= 1 - globalTimeCache.lock.Unlock() -} - -func startGlobalTimeCache() { - globalTimeCache.lock.Lock() - if globalTimeCache.started { - globalTimeCache.lock.Unlock() - return - } - - globalTimeCache.started = true - globalTimeCache.nowNs.Store(time.Now().UnixNano()) - globalTimeCache.stop = make(chan struct{}) - globalTimeCache.lock.Unlock() - // Start background updater - go func(stopChan chan struct{}) { - ticker := time.NewTicker(50 * time.Millisecond) - defer ticker.Stop() - - for range ticker.C { - select { - case <-stopChan: - return - default: - } - globalTimeCache.nowNs.Store(time.Now().UnixNano()) - } - }(globalTimeCache.stop) -} - -// stopGlobalTimeCache stops the global time cache if there are no subscribers. -// This should only be called when the last subscriber is removed. -func stopGlobalTimeCache() { - globalTimeCache.lock.Lock() - if !globalTimeCache.started || globalTimeCache.subscribers > 0 { - globalTimeCache.lock.Unlock() - return - } - globalTimeCache.started = false - close(globalTimeCache.stop) - globalTimeCache.lock.Unlock() -} - -func init() { - startGlobalTimeCache() -} diff --git a/vendor/github.com/redis/go-redis/v9/internal/pool/pool.go b/vendor/github.com/redis/go-redis/v9/internal/pool/pool.go index 50663d7cb5715..184321c18fb8d 100644 --- a/vendor/github.com/redis/go-redis/v9/internal/pool/pool.go +++ b/vendor/github.com/redis/go-redis/v9/internal/pool/pool.go @@ -178,9 +178,6 @@ func NewConnPool(opt *Options) *ConnPool { p.connsMu.Unlock() } - startGlobalTimeCache() - subscribeToGlobalTimeCache() - return p } @@ -981,9 +978,6 @@ func (p *ConnPool) Close() error { return ErrClosed } - unsubscribeFromGlobalTimeCache() - stopGlobalTimeCache() - var firstErr error p.connsMu.Lock() for _, cn := range p.conns { diff --git a/vendor/github.com/redis/go-redis/v9/version.go b/vendor/github.com/redis/go-redis/v9/version.go index a8b92ff5320f9..6718e8659c930 100644 --- a/vendor/github.com/redis/go-redis/v9/version.go +++ b/vendor/github.com/redis/go-redis/v9/version.go @@ -2,5 +2,5 @@ package redis // Version is the current release version. func Version() string { - return "9.17.0" + return "9.17.1" } diff --git a/vendor/modules.txt b/vendor/modules.txt index 685e4c92a7f55..08e3305de8fa5 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1840,7 +1840,7 @@ github.com/puzpuzpuz/xsync/v3 # github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 ## explicit github.com/rcrowley/go-metrics -# github.com/redis/go-redis/v9 v9.17.0 +# github.com/redis/go-redis/v9 v9.17.1 ## explicit; go 1.18 github.com/redis/go-redis/v9 github.com/redis/go-redis/v9/auth