Skip to content

Support slotmap updates using CLUSTER NODES in RESP3#262

Merged
bjosv merged 1 commit intovalkey-io:mainfrom
bjosv:handle-resp3-cluster-nodes
Nov 25, 2025
Merged

Support slotmap updates using CLUSTER NODES in RESP3#262
bjosv merged 1 commit intovalkey-io:mainfrom
bjosv:handle-resp3-cluster-nodes

Conversation

@bjosv
Copy link
Copy Markdown
Collaborator

@bjosv bjosv commented Nov 24, 2025

When the option VALKEY_OPT_USE_CLUSTER_NODES is enabled the slot map is updated using the CLUSTER NODES command. If a user has enabled RESP3 by sending the HELLO 3 command the CLUSTER NODES response is a verbatim string instead of a bulk string.
Update so we handle this reply type as well.

When the option VALKEY_OPT_USE_CLUSTER_NODES is enabled the slot map
is updated using the 'CLUSTER NODES' command. If a user has enabled
RESP3 by sending the 'HELLO 3' command the 'CLUSTER NODES' response
is a verbatim string instead of a bulk string.
Update so we handle this reply type as well.

Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
@bjosv bjosv requested a review from zuiderkwast November 25, 2025 10:07
Copy link
Copy Markdown
Collaborator

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great.

The parser already strips the txt: prefix so user commands are not affected?

@bjosv
Copy link
Copy Markdown
Collaborator Author

bjosv commented Nov 25, 2025

Yes, the 4 bytes are skipped in createStringObject before given to the user.
This seems to differ a bit in clients, in valkey-go the user need to know this and strip manually when needed.

@bjosv bjosv merged commit ae341de into valkey-io:main Nov 25, 2025
47 checks passed
@bjosv bjosv deleted the handle-resp3-cluster-nodes branch November 25, 2025 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants