You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "git-hulk (via GitHub)" <gi...@apache.org> on 2023/04/29 12:22:11 UTC

[GitHub] [incubator-kvrocks] git-hulk opened a new issue, #1410: Persist the cluster-enabled status in RocksDB

git-hulk opened a new issue, #1410:
URL: https://github.com/apache/incubator-kvrocks/issues/1410

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-kvrocks/issues) and found no similar issues.
   
   
   ### 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 to `cluster-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 use `propagate 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?
   
   - [ ] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] git-hulk commented on issue #1410: Persist the cluster-enabled status in RocksDB

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on issue #1410:
URL: https://github.com/apache/incubator-kvrocks/issues/1410#issuecomment-1550670140

   @inf Are you still working on this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] git-hulk commented on issue #1410: Persist the cluster-enabled status in RocksDB

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on issue #1410:
URL: https://github.com/apache/incubator-kvrocks/issues/1410#issuecomment-1528900631

   @infdahai Assigned, let's go ahead.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] infdahai commented on issue #1410: Persist the cluster-enabled status in RocksDB

Posted by "infdahai (via GitHub)" <gi...@apache.org>.
infdahai commented on issue #1410:
URL: https://github.com/apache/incubator-kvrocks/issues/1410#issuecomment-1529794145

   I find many go tests use the `config` map including `"cluster-enabled": "yes"` and the `StartServerWithCLIOptions` function writes the option to the `kvrocks.conf` file. 
   
   ```go
   func TestClusterDumpAndLoadClusterNodesInfo(t *testing.T) {
   	srv1 := util.StartServer(t, map[string]string{
   		"bind":            "0.0.0.0",
   		"cluster-enabled": "yes",
   	})
   ```
   
   in StartServerWithCLIOptions func(),
   https://github.com/apache/incubator-kvrocks/blob/30e9fd788a4acb585566a008f4d5fff65ee06ce3/tests/gocase/util/server.go#L197-L207
   
   I haven't seen a commad that changes `cluster` mode, so it means we should define the option in the initial config file if we want to use `cluster` mode. 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] git-hulk commented on issue #1410: Persist the cluster-enabled status in RocksDB

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on issue #1410:
URL: https://github.com/apache/incubator-kvrocks/issues/1410#issuecomment-1545010647

   Hi @infdahai 
   
   Sorry for missing this comment.
   
   > I haven't seen a commad that changes cluster mode, so it means we should define the option in the initial config file if we want to use cluster mode. Restart() will read the kvrocks.conf and set the origin value.
   
   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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] infdahai commented on issue #1410: Persist the cluster-enabled status in RocksDB

Posted by "infdahai (via GitHub)" <gi...@apache.org>.
infdahai commented on issue #1410:
URL: https://github.com/apache/incubator-kvrocks/issues/1410#issuecomment-1528845365

   Let's try this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Persist the cluster-enabled status in RocksDB [kvrocks]

Posted by "chrisxu333 (via GitHub)" <gi...@apache.org>.
chrisxu333 commented on issue #1410:
URL: https://github.com/apache/kvrocks/issues/1410#issuecomment-1890456346

   @infdahai are you still working on this? If not I'd like to take over. @git-hulk 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] infdahai commented on issue #1410: Persist the cluster-enabled status in RocksDB

Posted by "infdahai (via GitHub)" <gi...@apache.org>.
infdahai commented on issue #1410:
URL: https://github.com/apache/incubator-kvrocks/issues/1410#issuecomment-1550909339

   @git-hulk  I think I know what to do. A new pull request is on the way.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] git-hulk commented on issue #1410: Persist the cluster-enabled status in RocksDB

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on issue #1410:
URL: https://github.com/apache/incubator-kvrocks/issues/1410#issuecomment-1550918807

   Cool, thanks. No hurry, just for asking if you're working on this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Persist the cluster-enabled status in RocksDB [kvrocks]

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on issue #1410:
URL: https://github.com/apache/kvrocks/issues/1410#issuecomment-1890819917

   @chrisxu333 Done, thank you!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org