-
Notifications
You must be signed in to change notification settings - Fork 467
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
Persist the cluster-enabled status in RocksDB #1410
Comments
Let's try this. |
@infdahai Assigned, let's go ahead. |
@git-hulk I find many go tests use the func TestClusterDumpAndLoadClusterNodesInfo(t *testing.T) {
srv1 := util.StartServer(t, map[string]string{
"bind": "0.0.0.0",
"cluster-enabled": "yes",
}) in StartServerWithCLIOptions func(), I haven't seen a commad that changes
so I don't know how this happens, could you explain it? |
Hi @infdahai Sorry for missing this comment.
Yeah, that's right that we have no command to set the cluster mode, it must be specified in the configuration file. But the current restart function cannot change the kvrocks.conf, so you need to support overriding the configuration in the restart function first if wanna test this scenario. |
@inf Are you still working on this? |
@git-hulk I think I know what to do. A new pull request is on the way. |
Cool, thanks. No hurry, just for asking if you're working on this. |
@chrisxu333 Done, thank you! |
Search before asking
Motivation
Currently, we encode the slot id as the prefix of the key if the cluster mode was enabled according to Kvrocks's configuration. But it would go wrong if we start the Kvrocks with
cluster-enabled yes
, but change it tocluster-enabled no
after restarting.For the key encoding can see: https://kvrocks.apache.org/community/data-structure-on-rocksdb
Solution
Persist the
cluster-enabled
configuration in the RocksDB(can usepropagate column family
) when starting the server, then check if the Kvrocks's cluster-enabled configuration matched the database status.Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: