sofa-jraft icon indicating copy to clipboard operation
sofa-jraft copied to clipboard

Proposal: remove HybridLogStorage and LogitLogStorage

Open killme2008 opened this issue 2 years ago • 2 comments
trafficstars

Looks like RocksDB 7.7.3 has a better performance when compaction happens, and we don't have any plan or resource to improve LogitLogStorage and HybridLogStorage.

I don't know if there are any users using these two implementations, we can remove them if not.

And maybe consider removing RocksDBSegmentLogStorage too.

killme2008 avatar Dec 06 '22 09:12 killme2008

Hi @killme2008, I was just about to file a bug (including a possible solution) for the HybridLogStorage and stumbled across this ticket.

  • I switched from default rocksDB to HybridLogJRaftServiceFactory, because rocksDB has binary dependencies that were not fulfilled by my base container image (switched to alpine). Using the java-log-storage-impl extension looked like a good idea to reduce dependencies.
  • Actually I use jraft only for a fast and reliable leader election implementation. So I guess for that use case, no storage would be needed at all (in fact I delete and re-create the dataPath directory at startup). I gave a small try to implement an empty dummy DefaultJRaftServiceFactory, but jraft-core does some consistency checks on the log contents.

So if I understand correctly, LogitLogStorage will not be the "new" storage format, instead rocksdb will be kept? Any suggestion on the best approach, if only leader election is needed?

Thanks for your help.

Excpt0r avatar Mar 31 '23 14:03 Excpt0r

@killme2008 @fengjiachun any news on that topic?

Excpt0r avatar May 11 '23 10:05 Excpt0r