Changes
build(deps): bump github.com/redis/go-redis/v9 from 9.20.1 to 9.21.0 in the all-go-mod-patch-and-minor group (#4094)
Bumps the all-go-mod-patch-and-minor group with 1 update:
github.com/redis/go-redis/v9.
Updates github.com/redis/go-redis/v9 from 9.20.1 to 9.21.0
Release notes
Sourced from github.com/redis/go-redis/v9's releases.
9.21.0
This is a minor release adding new features and bug fixes. There are no breaking changes; upgrading from 9.20.x is a drop-in replacement.
🚀 Highlights
Zero-copy
GetToBuffer/SetFromBufferTwo new
StringCmdablemethods let callers read and write Redis string values directly into and from pre-allocated byte buffers, eliminating the per-call payload allocation thatGet/Setincur:GetToBuffer(ctx, key, buf) *ZeroCopyStringCmd // reads into buf; ZeroCopyStringCmd { Val() int; Bytes() []byte; Result() (int, error) } SetFromBuffer(ctx, key, buf) *StatusCmd
GetToBufferdecodes the bulk reply straight into the caller-ownedbuf(no intermediate allocation); a buffer that is too small returns an error after draining the payload, so the connection stays aligned for the next reply.SetFromBufferis provided for API symmetry — it dispatches to the same[]bytewriter path asSet(ctx, key, buf, 0)and produces byte-identical output on the wire. Available on*Client,*ClusterClient,*Ring,*ConnandPipeliner.Explicit
LIMIT 0for stream trimmingRedis treats
XTRIM/XADDapproximate-trim (~)LIMIT 0as "disable the trimming effort cap entirely", which differs from omittingLIMIT(the implicit100 * stream-node-max-entriesdefault). The command builders previously only emittedLIMITwhenlimit > 0, so callers could never send an explicitLIMIT 0. Following theKeepTTL = -1precedent, the newXTrimLimitDisabled = -1sentinel now emits an explicitLIMIT 0;limit == 0keeps the historical no-LIMITbehavior, so existing callers produce byte-identical commands.(#3848) by
@TheRealMal✨ New Features
- Zero-copy buffer string commands: new
GetToBuffer/SetFromBufferonStringCmdableand theZeroCopyStringCmdresult type, reading/writing string values into caller-owned buffers without per-call payload allocation (#3834) by@ndyakovXTrimLimitDisabledsentinel:XTRIM/XADDapproximate trimming can now send an explicitLIMIT 0to disable the trim effort cap, via the newXTrimLimitDisabled = -1sentinel (#3848) by@TheRealMal- PubSub health-check timeouts:
channel.initHealthChecknow bounds thePingit issues with a fresh per-check timeout context (the exportedpingTimeout/reconnectTimeout) instead ofcontext.TODO(), so a stuck health-check Ping can no longer block indefinitely (#3819) by@abdellani- Skip redundant
UNWATCHinTx.Close: a transaction now tracks whether aWATCHis still active (watchArmed) and only issuesUNWATCHonClosewhen it is, removing an extra round trip on the commonWATCH/.../EXECand no-keyWatchpaths while never returning a connection to the pool with an active watch (#3854) by@fcostaoliveira🐛 Bug Fixes
maintnotificationsModeAutofail-open:ModeAutonow stays fail-open when the server does not support maintenance notifications — connections are retired and tracking is guarded during downgrade so the client keeps working instead of erroring (#3853) by@terrorobe👥 Contributors
We'd like to thank all the contributors who worked on this release!
@abdellani,@fcostaoliveira,@ndyakov,@terrorobe,@TheRealMal
Changelog
Sourced from github.com/redis/go-redis/v9's changelog.
9.21.0 (2026-06-18)
This is a minor release adding new features and bug fixes. There are no breaking changes; upgrading from 9.20.x is a drop-in replacement.
🚀 Highlights
Zero-copy
GetToBuffer/SetFromBufferTwo new
StringCmdablemethods let callers read and write Redis string values directly into and from pre-allocated byte buffers, eliminating the per-call payload allocation thatGet/Setincur:GetToBuffer(ctx, key, buf) *ZeroCopyStringCmd // reads into buf; ZeroCopyStringCmd { Val() int; Bytes() []byte; Result() (int, error) } SetFromBuffer(ctx, key, buf) *StatusCmd
GetToBufferdecodes the bulk reply straight into the caller-ownedbuf(no intermediate allocation); a buffer that is too small returns an error after draining the payload, so the connection stays aligned for the next reply.SetFromBufferis provided for API symmetry — it dispatches to the same[]bytewriter path asSet(ctx, key, buf, 0)and produces byte-identical output on the wire. Available on*Client,*ClusterClient,*Ring,*ConnandPipeliner.Explicit
LIMIT 0for stream trimmingRedis treats
XTRIM/XADDapproximate-trim (~)LIMIT 0as "disable the trimming effort cap entirely", which differs from omittingLIMIT(the implicit100 * stream-node-max-entriesdefault). The command builders previously only emittedLIMITwhenlimit > 0, so callers could never send an explicitLIMIT 0. Following theKeepTTL = -1precedent, the newXTrimLimitDisabled = -1sentinel now emits an explicitLIMIT 0;limit == 0keeps the historical no-LIMITbehavior, so existing callers produce byte-identical commands.(#3848) by
@TheRealMal✨ New Features
- Zero-copy buffer string commands: new
GetToBuffer/SetFromBufferonStringCmdableand theZeroCopyStringCmdresult type, reading/writing string values into caller-owned buffers without per-call payload allocation (#3834) by@ndyakovXTrimLimitDisabledsentinel:XTRIM/XADDapproximate trimming can now send an explicitLIMIT 0to disable the trim effort cap, via the newXTrimLimitDisabled = -1sentinel (#3848) by@TheRealMal- PubSub health-check timeouts:
channel.initHealthChecknow bounds thePingit issues with a fresh per-check timeout context (the exportedpingTimeout/reconnectTimeout) instead ofcontext.TODO(), so a stuck health-check Ping can no longer block indefinitely (#3819) by@abdellani- Skip redundant
UNWATCHinTx.Close: a transaction now tracks whether aWATCHis still active (watchArmed) and only issuesUNWATCHonClosewhen it is, removing an extra round trip on the commonWATCH/.../EXECand no-keyWatchpaths while never returning a connection to the pool with an active watch (#3854) by@fcostaoliveira🐛 Bug Fixes
maintnotificationsModeAutofail-open:ModeAutonow stays fail-open when the server does not support maintenance notifications — connections are retired and tracking is guarded during downgrade so the client keeps working instead of erroring (#3853) by@terrorobe👥 Contributors
We'd like to thank all the contributors who worked on this release!
@abdellani,@fcostaoliveira,@ndyakov,@terrorobe,@TheRealMal
Full Changelog: redis/go-redis@v9.20.1...v9.21.0
Commits
1551837chore(release): 9.21.0 (#3857)1cfa927fix(maintnotifications): keep ModeAuto fail-open (#3853)1f0ea0efeat(pubsub): introduce timeouts for Ping on channel.initHealthCheck (#3819)5484b0bfeat(tx): skip redundant UNWATCH in Tx.Close when no WATCH is active (#3854)bf57a51chore(deps): bump rojopolis/spellcheck-github-actions (#3852)641294cfeat(streams): support explicit LIMIT 0 in XTRIM/XADD trimming via XTrimLimit...74d9bb0feat(command): add zero-copy GetToBuffer and SetFromBuffer (#3834)- See full diff in compare view
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits
that have been made to it@dependabot show <dependency name> ignore conditionswill show all
of the ignore conditions of the specified dependency@dependabot ignore <dependency name> major versionwill close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)@dependabot ignore <dependency name> minor versionwill close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)@dependabot ignore <dependency name>will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)@dependabot unignore <dependency name>will remove all of the ignore
conditions of the specified dependency@dependabot unignore <dependency name> <ignore condition>will
remove the ignore condition of the specified dependency and ignore
conditions
Multiarch Docker image
Multiarch Docker image is available in GitHub's docker registry:
docker run -it ghcr.io/zalando/skipper:v0.27.21 skipper --help