apache / kvrocks

Apache Kvrocks is a distributed key value NoSQL database that uses RocksDB as storage engine and is compatible with Redis protocol.
https://kvrocks.apache.org/
Apache License 2.0
3.53k stars 464 forks source link

[QUESTION] Migrating from 2.0 to 2.0.2 #329

Closed adulau closed 3 years ago

adulau commented 3 years ago

A small question, is migrating from 2.0 to 2.0.2 safe concerning the RocksDB storage? Can we safely assume that the binary format is compatible between the two version.

ShooterIT commented 3 years ago

Thanks for your attention, we are going to release 2.0.2. Exactly, it is compatible, you can upgrade old version whatever by restarting using new binary or master-replicas replication.

But if you use cluster mode, that will make data incompatible. Because in cluster mode, to be efficient to migrate keys based on slot when scale, we encode key with slot id, but to be compatible with the old version, we don't do that in standalone mode. So data is not compatible between standalone mode with cluster mode, you must migrate data if you want to change mode, otherwise, kvrocks will make data corrupt.

ShooterIT commented 3 years ago

I update my comments, please have a look, please tell me if you still have questions.

adulau commented 3 years ago

Thank you very much for the feedback. We don't use cluster-mode so it seems we are fine.