Skip to content

[Compatibility] CLUSTER SHARDS on Valkey 9.1 broken for go-redis clientΒ #3909

Open

Description

@murphyjacob4

Summary

In Valkey 9.1 we added availability-zone to CLUSTER SHARDS #3156

Some Redis clients (namely go-redis, not sure if there are others) will not ignore this properly, they will simply reject it flat out: https://github.com/redis/go-redis/blob/master/command.go#L7128

The CLUSTER SHARDS format is designed to be able to add fields. It is documented as such:

Each individual node is a map of attributes that describe the node. Some attributes are optional and more attributes may be added in the future.

However, documented vs implemented behavior often are different. This is one such case.

Notably - adding availability-zone to the networking metadata in CLUSTER SLOTS appears to be fine for go-redis.

Next steps

Options:

  1. Gate the new field behind a CLIENT CAPA flag
  2. Remove the new field
  3. Leave the field, do nothing
  4. Gate behind a server level config

I have a preference for 1. I don't think any clients have integrated with the new CLUSTER SHARDS/SLOTS field yet. If we do go with 1, I would recommend we align the two outputs on the CAPA.

Activity

  1. ranshid commented on Jun 3, 2026

    @ranshid
    Member

    I also favor the CAPA.
    and I also think a forth option would be to offer a config mitigation option (even though less favored and mostly not the chosn solution)

  2. madolson commented on Jun 3, 2026

    @madolson
    Member

    I strongly dislike the CAPA in this instance. This is fairly clearly defined behavior. So I prefer 3. It's also a post-hoc breaking change, which I don't think is the right precedence. Doing 1 or 2 is clearly breaking semver. Doing 4 by default is also clearly breaking semver.

  3. ranshid commented on Jun 4, 2026

    @ranshid
    Member

    I strongly dislike the CAPA in this instance. This is fairly clearly defined behavior. So I prefer 3. It's also a post-hoc breaking change, which I don't think is the right precedence. Doing 1 or 2 is clearly breaking semver. Doing 4 by default is also clearly breaking semver.

    @madolson I should be have been clearer. I suggested 4 NOT default to disable but as a mitigation option. I mean if someone faces an issue with his existing client implementation after upgrading, this will just offer him a way to mitigate the issue without require to do code changes on the client or the server

  4. sarthakaggarwal97 commented on Jun 8, 2026

    @sarthakaggarwal97
    Contributor

    I have a preference for 3 as well because as Madelyn said any other option would / could break semver.

    This field is returned only when the node has a non-empty availability-zone configuration value, and is omitted otherwise.

    Also, the field is by default empty, it won't be returned in the response as well right? So if a user wants to use clients like go-redis, they won't be able to use availability-zone field as well, atleast through the client library.

  5. hpatro commented on Jun 8, 2026

    @hpatro
    Contributor

    Folks suggesting to go for option 3, how do we surface this to various admins though? Do we update the release notes somehow?
    Also for compliance with SemVer, didn't we break compatibility for the client in a minor version by adding this new field to the client response or are we saying this client was designed incorrectly in the first place.

  6. madolson commented on Jun 8, 2026

    @madolson
    Member

    Option 5. We will continue to wait and see if this is a larger end user issue. If more people bring it up, we will do something about it.

    We should also do better with client compatibility testing. @asafpamzn I know you did some work at this inside Amazon, is there anything worth open source? @madolson Can you create an issue for the client compatibility.

  7. added
    major-decision-deferred
    on Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    major-decision-deferred

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions