Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure command details are populated for Cluster clients #1026

Merged
merged 1 commit into from Sep 14, 2021

Commits on Sep 14, 2021

  1. Ensure command details are populated for Cluster clients

    Previously, if a clustered client is unable to query any of the nodes
    for command details during setup, it'd initialize successfully, but
    without any command details. (This is a bit of a corner case - in order
    to hit this case, at least one node needs to be reachable when querying
    nodes + slots, but all nodes would need to be unreachable immediately
    afterwards when querying command details.)
    In this case, the client would be unable to determine which node a
    given command should be routed to. Because the client falls back to
    routing commands to a random node, and following redirects as
    necessary, this wouldn't cause any overt problems, but leaves the client
    following unnecessary redirects for the rest of the lifespan of the
    client.
    
    This patch changes the client to require that the initial fetch of
    command details succeeds (as is already done with slot and node detail
    fetching), and raises a CannotConnectError if that's not possible.
    Users should already handle this error, and retry creating the client
    later, or use some other suitable failure handling mechanism.
    praboud-stripe committed Sep 14, 2021
    Copy the full SHA
    ea24b5b View commit details
    Browse the repository at this point in the history