github redis/node-redis redis@6.4.0-beta.0

pre-release3 hours ago

redis@6.4.0-beta.0

✨ Highlights

This beta introduces the multi-database client: createMultiDbClient, createMultiDbClientPool, createMultiDbCluster and createMultiDbSentinel connect to several Redis endpoints and move traffic to a healthy one when the active endpoint fails, using health checks, a circuit breaker and configurable failover. The API is experimental and may change before the stable release. Client-side caching gains OPTIN and OPTOUT tracking modes with per-call control, and the command set grows with the BLESS family, Cuckoo CF.MEXISTS, a Count-Min Sketch cell size, HNSW vector compression and many new FT.SEARCH options.

🚀 New Features

  • client: add OPTIN/OPTOUT tracking modes, a cacheable predicate and a per-call cache option to client-side caching (#3473) — @PavelPashov
  • client: add the BLESS command family (BLESS SET, BLESS GET, BLESS CLEAR, BLESS SCAN), with BLESS SCAN routed across all cluster masters (#3483) — @vlady-kotsev
  • search: add COMPRESSION (SQ8) and TRAINING_THRESHOLD to HNSW vector fields (#3488) — @PavelPashov
  • search: support WITHSCORES, EXPLAINSCORE, WITHPAYLOADS, WITHSORTKEYS, FILTER, GEOFILTER and PAYLOAD in FT.SEARCH (#3432) — @watersRand
  • bloom: add the Cuckoo filter CF.MEXISTS command (#3447) — @vlady-kotsev
  • bloom: add a cellSize parameter to CMS.INITBYDIM / CMS.INITBYPROB (#3451) — @vlady-kotsev
  • sentinel: emit connect, ready, reconnecting and end lifecycle events (#3430) — @nkaradzhov
  • client: add MaxCommandRedirectionsError when a cluster command exceeds its redirection limit (#3386) — @Piyush0049
  • client: give clearer error messages when client options are invalid (#3441) — @AniaMakes

⚠️ Experimental

  • Multi-database client with automatic endpoint failover: createMultiDbClient, createMultiDbClientPool, createMultiDbCluster and createMultiDbSentinel. The API, events and configuration are marked @experimental and may change in a future release (#3435) — @nkaradzhov
  • Client-side caching strict option: a cache: true mark on a command that cannot be cached rejects instead of logging a warning. Meant for development and tests; may change (#3473) — @PavelPashov

🐛 Bug Fixes

Connection and reconnection

Selected database

  • Keep the selected database when a pipelined command fails (#3484) — @maxymlyskov
  • Do not
  • Keep batch commands routed by slot during slot migration (#3377) — @GiHoon1123
  • Recreate a cluster node client after a terminal connect failure (#3403) — @nkaradzhov
  • Emit node-connect / node-ready on every reconnection (#3438) — @consegrado
  • Unpause destination nodes when the SMIGRATED handler throws (#3445) — @tamil-selvan-k
  • Clear pubSubNode after destroying it on topology rediscovery (#3481) — @tamil-selvan-k
  • Vendor cluster-key-slot to fix the slot of keys with an empty hash tag (#3431) — @mishan

Sentinel

Pub/Sub

  • Settle an argument-less UNSUBSCRIBE while pattern subscriptions remain (#3407) — @kyungseopk1m
  • Keep the listener for channels already subscribed when a mixed subscribe is rejected (#3467) — @tamil-selvan-k
  • Update the active state after clearing maps in removeAllListeners (#3472) — @tamil-selvan-k
  • Stop the subscribing counter from going below zero in resubscribe callbacks (#3476) — @tamil-selvan-k
  • Restore string replies after leaving RESP2 pub/sub mode (#3492) — @lazerg

RESP and type mapping

  • Decode RESP3 doubles to the exact value the server sent (#3393) — @Jaybhade
  • Keep String.prototype in fast mode after defining VerbatimString (#3479) — @Ceereals
  • Honour typeMapping in XINFO STREAM and vector set replies (#3470) — @xia-chao
  • time-series: honour typeMapping for labels in RESP2 replies (#3412) — @abhijeet117

Command arguments

  • Send an empty message in PING('') instead of a bare PING (#3464) — @xia-chao
  • Preserve empty MATCH patterns in scan commands (#3460) — @jakezwang
  • Stop scan iterators when the cursor is a Buffer (#3428) — @UgaTheDev
  • Forward XRANGE ... COUNT 0 and handle its null reply (#3449) — @xia-chao
  • Keep the empty consumer filter argument in XPENDING (#3494) — @wToTw123
  • Keep pending stream entries whose message was deleted in XREADGROUP replies (#3500) — @maxymlyskov
  • Require an XADD TRIM strategy, as the command grammar does, and always send it (#3418) — @abhijeet117
  • Require the approximate (~) modifier for XTRIM LIMIT (#3425) — @abhijeet117
  • Accept sampled events in the LATENCY command argument types (#3421) — @abhijeet117

Reply types

🧰 Maintenance

New Contributors

Full Changelog: https://github.com/redis/node-redis/compare/redis@6.2.0...redis@6.4.0-beta.0

Don't miss a new node-redis release

NewReleases is sending notifications on new releases.