sofastack / sofa-jraft

A production-grade java implementation of RAFT consensus algorithm.
https://www.sofastack.tech/projects/sofa-jraft/
Apache License 2.0
3.59k stars 1.15k forks source link

Backwards compatibility with rocksdb #877

Closed asad-awadia closed 2 years ago

asad-awadia commented 2 years ago

What is sofa jraft doing inside rocksdb? Is it doing something more unique and unexpected?

I ask because once rocksdb has been upgraded it cannot be downgraded back without sofa jraft throwing exceptions - even though rocksdb by itself is compatible

Some exceptions I am seeing are

java.util.IllegalFormatConversionException: d != java.lang.String
at com.alipay.sofa.jraft.storage.impl.LogManagerImpl.checkConsistency(LogManagerImpl.java:1180)

and

Fail to save first log index 63. - [] []
org.rocksdb.RocksDBException: Unknown Footer version. Maybe this file was created with newer version of RocksDB?
at org.rocksdb.RocksDB.put(Native Method)
asad-awadia commented 2 years ago

@killme2008 @shihuili1218 @qiujiayu

killme2008 commented 2 years ago

JRaft doesn't do any modifications in rocksdb , i think it's the problem of compatibility between rocksdb versions.