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

Kvrocks2Redis: decode slot ID in cluster mode #1222

Merged
merged 2 commits into from
Jan 11, 2023

Conversation

torwig
Copy link
Contributor

@torwig torwig commented Jan 10, 2023

Currently, Kvrocks2Redis doesn't decode the slot ID if a cluster mode is enabled.
For example, if we write to Kvrocks in a cluster mode the following value:
set book1 "Anything here"
And run Kvrocks2Redis with cluster-enable set to yes, we will get in Redis the following key:
\x16\x9bbook1
where 169b is a hex representation of slot 5787.

The reason: the Kvrocks config key slot_id_encoded is not set. Setting only the cluster_enable config value is not enough for Kvrocks2Redis. In Kvrocks we have this.

@torwig
Copy link
Contributor Author

torwig commented Jan 11, 2023

Merging...

@torwig torwig merged commit 35bce1a into apache:unstable Jan 11, 2023
@torwig torwig deleted the kv2r_slot_awareness branch January 11, 2023 15:38
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.

3 participants