Repository navigation
redis@6.4.0
✨ Highlights
This release adds an experimental multi-database client (createMultiDbClient). It keeps connections to several equivalent Redis databases, such as Active-Active replicas, and moves traffic to a healthy database when the active one fails. Command timeouts also improved: the new experimental rejectInFlight option lets timeout and abortSignal reject commands that are already sent, timeouts now apply to MULTI and pipelines, and per-command timers cost less. New commands include set member expiration, ZMOVE/BZMOVE/ZMOVEMEMBER, BITRANGEINTARRAY, BACKUP and FT.HYBRID EXPLAINSCORE. Client-side caching gains OPTIN/OPTOUT tracking modes, OpenTelemetry metrics accept custom attributes, and cluster clients get scanIterator. More than 70 bug fixes make reconnects, failover, the client-side cache, type mappings and keyPrefix more reliable. This release also welcomes 28 new contributors.
🚀 New Features
- feat(client): add OPTIN/OPTOUT tracking modes to client-side caching (#3473) — @PavelPashov
- feat(client): add process-level and per-client custom attributes to OTel metrics (#3573) — @PavelPashov
- feat(client): add set member expiration commands (#3557) — @nkaradzhov
- feat(client): add ZMOVE, BZMOVE and ZMOVEMEMBER commands (#3611) — @nkaradzhov
- feat(client): add BITRANGEINTARRAY command (#3601) — @nkaradzhov
- feat(client): add BACKUP commands (#3605) — @Purv-Kabaria
- feat(client): accept a string or Buffer for VADD SETATTR, like VSETATTR (#3580) — @maxymlyskov
- feat(cluster): add scanIterator and HSCAN/SSCAN/ZSCAN iterators (#3529) — @smit153
- feat(search): add COMPRESSION and TRAINING_THRESHOLD to HNSW vector fields (#3488) — @PavelPashov
- feat(search): support EXPLAINSCORE in FT.HYBRID (#3588) — @nkaradzhov
⚠️ Experimental
- feat(client): multi-db client with automatic endpoint failover (
createMultiDbClient). Works with standalone clients, pools, clusters and sentinel. The API is experimental and may change in a future release. See docs/multi-db.md. (#3435) — @nkaradzhov - feat(client): add
commandOptions.rejectInFlight, which makestimeoutandabortSignalalso reject commands that were already sent and are waiting for a reply. The option is experimental, off by default, and may change in a future release. (#3636) — @nkaradzhov
🐛 Bug Fixes
Connections and reconnects
- client: prevent late connections after shutdown (#3499) — @jakobzach
- client: stop reconnecting after callback shutdown (#3531) — @jakobzach
- client: reconnect after a reply the decoder cannot parse (#3608) — @yan-almeida
- client: keep writing on drain before the socket is ready (#3591) — @nkaradzhov
- client: retry a node connect cut short by a failover (#3628) — @nkaradzhov
- client: stop leaking a credentials subscription on every reconnect (#3524) — @FPLandrian
- client: invalidate WATCH when the connection is lost (#3506) — @maxymlyskov
- client: reject MULTI and pipelines while offline when
disableOfflineQueueis set (#3561) — @maxymlyskov
Reply decoding
- client: keep decoding a chunk when a listener throws (#3486) — @maxymlyskov
- client: restore string replies after leaving RESP2 pub/sub (#3492) — @lazerg
- client: restore RESP2 reply decoding when a SUBSCRIBE is rejected (#3523) — @maxymlyskov
- client: skip RESP3 attribute replies in the decoder (#3595) — @lazerg
- client: decode integers near
Number.MAX_SAFE_INTEGERexactly (#3575) — @mmporong
Database selection
- client: keep the selected database when a pipelined command fails (#3484) — @maxymlyskov
- client: do not record a database whose SELECT failed inside MULTI (#3489) — @maxymlyskov
- client: select the default database in
reset()(#3510) — @maxymlyskov - client: use the RESET fallback only while the RESET handler is installed (#3541) — @maxymlyskov
MULTI, pipelines and type mappings
- client: apply the command timeout and
abortSignalto queued MULTI and pipelines, including on pool, cluster and sentinel (#3515, #3537) — @Arthur031221 - client: keep asap commands out of a partly written MULTI (#3496) — @jadhavgaurav
- client: reject an oversized MULTI before any command is queued (#3507) — @rome-xi
- client: apply the type mapping to
multi().exec()replies (#3547) — @maxymlyskov - client: pass the type mapping to pool, cluster and sentinel batches (#3551) — @maxymlyskov
- client: make reply parsers tolerate type mappings (#3570) — @junaidkhan80121
- client: call a legacy callback once when it throws (#3546) — @maxymlyskov
Client-side cache
- client: keep Buffer and VerbatimString replies intact in the client-side cache (#3544) — @OmBhandwaldar
- client: drop evicted entries from the client-side cache key index (#3538) — @maxymlyskov
- client: keep binary keys apart in the client-side cache (#3582) — @waw666waw666
- client: don't cache SORT_RO, XINFO and MEMORY USAGE replies (#3616) — @samjonath
- client: empty the client-side cache when the selected database changes (#3641) — @Cdineshreddy12
- client: use the client-side cache in clusters with a type mapping (#3556) — @RagedPanda
- sentinel: use the client-side cache with a type mapping (#3662) — @maxymlyskov
Cluster
- cluster: null
pubSubNodeafter destroying it on topology rediscovery (#3481) — @tamil-selvan-k - cluster: ignore superseded pub/sub connect errors during rediscovery (#3520) — @tamil-selvan-k
- cluster: serve reads from a master demoted to replica by a failover (#3511) — @maxymlyskov
- cluster: close a demoted master's sharded pub/sub client (#3514) — @maxymlyskov
- cluster: follow MOVED for keyless cluster commands (#3555) — @RagedPanda
- cluster: refresh the slot map when a pipeline gets MOVED (#3560) — @maxymlyskov
- cluster: retry a moved sharded channel that gets MOVED (#3590) — @nkaradzhov
- cluster: drop the source connection when the in-flight flush runs during slot migration (#3642) — @Cdineshreddy12
- cluster: route the empty-string key by slot instead of at random (#3660) — @Cdineshreddy12
Sentinel and pool
- sentinel: take one master lease when direct commands start concurrently (#3497) — @maxymlyskov
- sentinel: compare mapped addresses when checking for topology changes (#3508) — @maxymlyskov
- sentinel: reopen the sentinel connection after the sentinel restarts (#3526) — @maxymlyskov
- sentinel: destroy connecting sentinel pub/sub clients on
changeNode(#3625) — @rome-xi - pool: replace pool members whose reconnect strategy gave up (#3525) — @maxymlyskov
- pool: drop pool members that
destroy()closed instead of reusing them (#3572) — @maxymlyskov
Commands
- client: preserve empty XPENDING consumer filters (#3494) — @wToTw123
- client: keep pending stream entries whose message was deleted in XREADGROUP replies (#3500) — @maxymlyskov
- client: keep binary stream names in RESP3 XREAD replies (#3540) — @Tanishq-Choudhary
- client: parse XINFO STREAM entries when stream keys are Buffers (#3553) — @maxymlyskov
- client: send LIMIT 0 in ZINTERCARD (#3517) — @lazerg
- client: return null from vector set commands for a missing key or element (#3535) — @maxymlyskov
- client: send Buffer attributes to VSETATTR unchanged (#3552) — @Tanishq-Choudhary
- client: return ARINFO FULL averages as numbers on RESP2 (#3550) — @Tanishq-Choudhary
- client: retry a read-only script with EVAL_RO after NOSCRIPT (#3567) — @maxymlyskov
- client: ignore an undefined expiration value in SET, HSETEX, HGETEX and MSETEX (#3621) — @Hag-ras
- client: preserve empty SCAN type filters (#3637) — @ragib-mrb
- client: preserve empty MIGRATE ACL usernames (#3638) — @ragib-mrb
- client: preserve an empty LIBRARYNAME filter in FUNCTION LIST (#3646) — @ragib-mrb
- client: treat an empty string or empty Buffer
keyPrefixas no prefix (#3659) — @ragib-mrb
Modules
- search: return FT.INFO attribute flags on RESP2 as RESP3 does (#3513) — @maxymlyskov
- search: exclude MAX from SORTBY nargs in FT.AGGREGATE (#3587) — @wn1331
- search: apply
keyPrefixto FT.SEARCH INKEYS (#3653) — @junaidkhan80121 - search: apply
keyPrefixto the FT.SUGLEN key (#3657) — @maxymlyskov - bloom: apply
keyPrefixto CMS.MERGE source keys (#3645) — @maxymlyskov - time-series: return a null sample from TS.MGET for an empty series (#3530) — @maxymlyskov
- time-series: send AGGREGATION.ALIGN in TS.RANGE and TS.MRANGE (#3583) — @RaphaelFakhri
- time-series: flatten RESP2 map-as-Array replies to match RESP3 (#3593) — @pcbeingused333
- entraid: bump
@azure/msal-nodeto 7.1 for CVE-2026-109461 (#3543) — @lazerg - entraid: drop
@azure/identityfrom runtime dependencies (#3571) — @nkaradzhov
🧰 Maintenance
- perf(client): replace per-command AbortSignal timeouts with deadline lists (#3618) — @nkaradzhov
- perf: defer cluster and sentinel transaction type expansion (#3578) — @GiHoon1123
- chore(deps): resolve open Dependabot security alerts (#3548) — @nkaradzhov
- chore(deps-dev): bump proxy-addr from 2.0.7 to 2.0.8 (#3503) — @dependabot[bot]
- chore: add
npm run replwith a connected client (#3566) — @nkaradzhov - chore: remove maintainer skills from the repo (#3509) — @nkaradzhov
- chore(tests): bump default docker test image to 8.12, then 8.12-rc3 (#3558, #3610) — @nkaradzhov
- test(client): create the key before BLESS SET/GET/CLEAR (#3490) — @nkaradzhov
- test(client): wait for the server to accept in the socket retry test (#3559) — @nkaradzhov
- test(sentinel): fix flaky scanIterator failover test (#3603) — @lazerg
- test(sentinel): wait for an electable master before the suite starts (#3658) — @junaidkhan80121
- test(sentinel): await the reentrant teardown instead of a fixed delay (#3651) — @Cdineshreddy12
- docs: pass multiple values to commands as an array (#3519) — @MannXo
- docs: explain how to share a client between modules (#3527) — @smit153
- docs: fix two dead links (Functions intro, TS.CREATE) (#3532) — @Pharex38
- docs: connect the pool in the pool guide and examples (#3569) — @NotAFlightRisk
- docs(sentinel): clarify the default topology scan interval (#3600) — @Doomguy-BFG9000
- docs(sentinel): fix dead link to client-configuration.md (#3606) — @abd1rahmane
- docs: point the programmability links at the moved sections (#3612) — @abd1rahmane
- docs: remove legacyMode and isolationPoolOptions from client configuration (#3613) — @ragib-mrb
- docs: fix the type mapping and abort signal examples in command options (#3614) — @ragib-mrb
- docs: fix wrong command names and examples in the v4 to v5 guide (#3615) — @ragib-mrb
- docs: fix the pubsub Buffer example and channel guidance (#3630) — @ragib-mrb
- docs: skip empty scan pages before MGET (#3632) — @ragib-mrb
New Contributors
- @maxymlyskov made their first contribution in #3484
- @wToTw123 made their first contribution in #3494
- @jadhavgaurav made their first contribution in #3496
- @rome-xi made their first contribution in #3507
- @jakobzach made their first contribution in #3499
- @MannXo made their first contribution in #3519
- @Arthur031221 made their first contribution in #3515
- @FPLandrian made their first contribution in #3524
- @smit153 made their first contribution in #3527
- @Pharex38 made their first contribution in #3532
- @Tanishq-Choudhary made their first contribution in #3540
- @OmBhandwaldar made their first contribution in #3544
- @RagedPanda made their first contribution in #3555
- @NotAFlightRisk made their first contribution in #3569
- @junaidkhan80121 made their first contribution in #3570
- @mmporong made their first contribution in #3575
- @waw666waw666 made their first contribution in #3582
- @RaphaelFakhri made their first contribution in #3583
- @wn1331 made their first contribution in #3587
- @pcbeingused333 made their first contribution in #3593
- @Doomguy-BFG9000 made their first contribution in #3600
- @abd1rahmane made their first contribution in #3606
- @Purv-Kabaria made their first contribution in #3605
- @yan-almeida made their first contribution in #3608
- @ragib-mrb made their first contribution in #3613
- @samjonath made their first contribution in #3616
- @Hag-ras made their first contribution in #3621
- @Cdineshreddy12 made their first contribution in #3641
Full Changelog: https://github.com/redis/node-redis/compare/redis@6.3.1...redis@6.4.0