Skip to content

1.0.80

Latest

Choose a tag to compare

@github-actions github-actions released this 16 Nov 17:34
f90e715

Changes

Requirements

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

Features

  • valkeygcp: 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 (#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() (redis/rueidis#1035)
  • valkeycompat: added XNack (#199), and Wait and WaitAOF (#202)

Performance

  • CacheMarshal and CacheSize no longer allocate once per array element. CacheMarshal on a 100-element array is about 75% faster (redis/rueidis#1055)
  • RESP lengths are written with strconv.AppendInt instead of float math, 15–27% faster in micro-benchmarks (redis/rueidis#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 (#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 (redis/rueidis#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 (#205)
  • Close no longer hangs when another call is waiting on the same connection (redis/rueidis#1050)
  • After Close, the cluster client's Do, DoMulti, DoCache and DoMultiCache return ErrClosing instead of a raw MOVED or ASK error (redis/rueidis#1037)
  • ValkeyResultStream.WriteTo now closes the connection when the destination writer fails during a chunked response, instead of returning it to the pool with unread chunks (redis/rueidis#1040)
  • Closed connections stop their lifetime timers, so retired connections and their buffers are freed right away instead of at the original lifetime deadline (#206)
  • ParseURL reads a trailing slash with no database number, like valkey://localhost:6379/, as DB 0 (redis/rueidis#1042). An addr= value without a port now means that host on port 6379, instead of being silently replaced with the primary host (redis/rueidis#1057)
  • valkeycompat:
    • Migrate and ClientPause send their timeouts in milliseconds. Before, a 30s Migrate timeout was sent as 30ms (#214)
    • TSMRevRange sends TS.MREVRANGE and returns the newest samples first. It sent TS.MRANGE before (redis/rueidis#1053)
    • TopKInfo and ClusterShards now read RESP2 replies, for example with AlwaysRESP2: true (redis/rueidis#1056)
    • HRandFieldWithValues returns the fields and values over RESP2, instead of an empty result (redis/rueidis#1045)
    • ZPopMin and ZPopMax without a count return an empty result instead of an error when the key doesn't exist (redis/rueidis#1047)
    • XPending returns an empty summary instead of a valkey nil message error when the group has no pending entries (redis/rueidis#1043)
    • IsCacheHit() now reports cache hits for commands that return IntCmd, like SCard and StrLen, or DurationCmd, like TTL (redis/rueidis#1033)

Tests & CI

  • CI compares end-to-end benchmarks between each PR and its base, and charts main on gh-pages (#190)
  • The pub/sub test no longer closes its channel while Receive callbacks are still running (redis/rueidis#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