apache / apache/kvrocks

Persist the cluster-enabled status in RocksDB

Open
#1,410 9 comments 0 reactions 1 assignee Claimed by @chrisxu333 View on GitHub
enhancement
Dominant language
C++
Stars
4.4k
Forks
658
Avg merge
1d 20h
Merged PRs (30d)
10

Description

### 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!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.