github redis/rueidis v1.0.80
1.0.80

one hour ago

Changes

Requirements

  • Go 1.26: every module now declares go 1.26.0, so Go 1.26 or newer is required (#1062)

Features

  • rueidisgcp: new module for IAM authentication with Memorystore for Valkey. Its NewClient gets access tokens from Application Default Credentials or a custom token source, refreshes them before they expire, and fills in the Memorystore defaults (valkey-io/valkey-go#215)
  • Start and Stop for ZRANGE and ZRANGESTORE: the command builders now offer .Start().Stop(), the argument names in the current ZRANGE docs, alongside .Min().Max() (#1035)
  • rueidiscompat: added XNack (valkey-io/valkey-go#199), and Wait and WaitAOF (valkey-io/valkey-go#202)

Performance

  • CacheMarshal and CacheSize no longer allocate once per array element. CacheMarshal on a 100-element array is about 75% faster (#1055)
  • RESP lengths are written with strconv.AppendInt instead of float math, 15–27% faster in micro-benchmarks (#1054)

Bug Fixes

  • Client-side caching: two different commands could share one cache entry and be served each other's reply, for example HGET k ALL and HGETALL k, or GETRANGE k 1 23 and GETRANGE k 12 3. Each part of a cache key is now length-prefixed (valkey-io/valkey-go#210)
  • Connections held by Dedicate() or Dedicated() now refresh the credentials from AuthCredentialsFn, so a long-lived pub/sub connection is no longer dropped when its credentials expire, for example with ElastiCache IAM auth (#1048)
  • With SendToReplicas, the cluster client now dials every connection with READONLY. Before, a primary demoted by a failover kept a connection without it, and reads routed to it got MOVED forever (valkey-io/valkey-go#205)
  • Close no longer hangs when another call is waiting on the same connection (#1050)
  • After Close, the cluster client's Do, DoMulti, DoCache and DoMultiCache return ErrClosing instead of a raw MOVED or ASK error (#1037)
  • RedisResultStream.WriteTo now closes the connection when the destination writer fails during a chunked response, instead of returning it to the pool with unread chunks (#1040)
  • Closed connections stop their lifetime timers, so retired connections and their buffers are freed right away instead of at the original lifetime deadline (valkey-io/valkey-go#206)
  • ParseURL reads a trailing slash with no database number, like redis://localhost:6379/, as DB 0 (#1042). An addr= value without a port now means that host on port 6379, instead of being silently replaced with the primary host (#1057)
  • rueidiscompat:
    • Migrate and ClientPause send their timeouts in milliseconds. Before, a 30s Migrate timeout was sent as 30ms (valkey-io/valkey-go#214)
    • TSMRevRange sends TS.MREVRANGE and returns the newest samples first. It sent TS.MRANGE before (#1053)
    • TopKInfo and ClusterShards now read RESP2 replies, for example with AlwaysRESP2: true (#1056)
    • HRandFieldWithValues returns the fields and values over RESP2, instead of an empty result (#1045)
    • ZPopMin and ZPopMax without a count return an empty result instead of an error when the key doesn't exist (#1047)
    • XPending returns an empty summary instead of a redis nil message error when the group has no pending entries (#1043)
    • IsCacheHit() now reports cache hits for commands that return IntCmd, like SCard and StrLen, or DurationCmd, like TTL (#1033)

Tests & CI

  • CI compares end-to-end benchmarks between each PR and its base, and charts main on gh-pages (valkey-io/valkey-go#190)
  • The pub/sub test no longer closes its channel while Receive callbacks are still running (#1049)

Contributors

We'd like to thank all the contributors who worked on this release!

@AdamMagued, @FZambia, @LindseyZ1205, @NotAFlightRisk, @PerryLink, @VardhamanViroje, @faustbrian, @freeformz, @g4lb, @gunreddyg-debug, @kumariam-ai, @ninadsutrave, @omanges, @pcbeingused333, @rueian, @yamamoto7, @youdie006 and @zhechen-cs

Don't miss a new rueidis release

NewReleases is sending notifications on new releases.