github dahomey-technologies/rustis 0.21.0

7 hours ago

BREAKING CHANGES

  • FtHybridVectorQuery::Knn has a third field, shard_k_ratio. The variant's
    fields are public and #[non_exhaustive] on the enum does not cover them, so an
    existing Knn { k, ef_runtime } literal needs shard_k_ratio: None added. That
    is the whole break; behaviour is unchanged when it is None.

Added

  • BackpressureConfig on Config bounds the client's memory. max_queued_bytes
    (16 MiB) caps the send queue, max_pubsub_bytes (8 MiB) each subscription,
    max_push_bytes (8 MiB) each push sink. Over budget, a stream drops its oldest
    messages; 0 restores the previous unbounded behaviour.

  • dropped_messages() on PubSubStream, MonitorStream and
    ClientTrackingInvalidationStream
    , reporting what a budget shed.

  • ClientError::SendQueueFull, returned when a command is offered to a send queue
    that is over budget. Commands already accepted are never shed.

Changed

  • max_command_attempts defaults to 5 instead of unlimited, so a command that
    keeps failing ends with ClientError::MaxCommandAttemptsReached. 0 still means
    unlimited.

  • ReconnectionConfig::max_attempts documents that a non-zero value is a one-way
    door
    : reaching the limit ends the network task for good, so it is not recommended
    for long-running services. Behaviour and the 0 default are unchanged.

Fixed

  • A cache entry whose invalidation was lost is no longer served stale. The cache
    (feature client-cache) now flushes when invalidations are dropped, and a fetch in
    flight across a flush no longer re-inserts its stale value — which also fixes the
    pre-existing flush on reconnection.

  • FT.HYBRID's KNN SHARD_K_RATIO is now reachable, through
    FtHybridVectorQuery::Knn::shard_k_ratio. It is a cluster-only knob — it scales
    the candidate count each shard returns — and Redis 8.8 accepts it, where 8.6
    rejected it as an unknown argument. It counts towards the KNN clause count:
    KNN 6 K 2 EF_RUNTIME 30 SHARD_K_RATIO 0.5. See the breaking-changes section.

  • A struct no longer fails to decode when the server changes its field list.
    Commands that still answer a flat array under RESP3 (XINFO, BF.INFO,
    FT.INFO, XAUTOCLAIM…) are decoded by guessing whether the array holds
    field/value pairs or positional values, and that guess used to key on the struct's
    field count — so one field added by a newer redis-server broke it. An array is
    now read as pairs when its length is even and its first element names a field,
    positionally otherwise, with both deserializers sharing the one rule. Added fields
    and appended elements are ignored; a field the server stops sending gives a serde
    error naming it. One consequence: an even-length positional array whose first
    element happens to equal a field name is now read as pairs.

  • Structs decode from cluster-aggregated and cache-rebuilt replies, which are
    synthesized rather than parsed off the wire and previously failed with
    CannotParseStruct.

Don't miss a new rustis release

NewReleases is sending notifications on new releases.