horaedb
horaedb copied to clipboard
Make RocksDB a conditional dependency
Describe This Problem
RocksDB is one of the WAL implementations, also the earliest one. We have to depend on it for everything. It's a great project and does help a lot but it also brings lots of problems like flaky tests #85, long compile time #151 or strange compile problem #16.
And things have changed for now. After #62 we have other WAL implementations like one implemented on mem. It's time to make RocksDB an optional dependency and only compile it when needed.
Proposal
- Make RocksDB and related code (e.g, tests) optional via feature gate
- Migrate existing tests to the memory impl, so they are still available without RocksDB. The memory impl is inside https://github.com/CeresDB/ceresdb/blob/5bfb5772668fa5f09a4467f476e2146725e7ebe5/wal/src/table_kv_impl/wal.rs#L100 with https://github.com/CeresDB/ceresdb/blob/5bfb5772668fa5f09a4467f476e2146725e7ebe5/components/table_kv/src/memory.rs#L193 This benchmark already make use of it.
- Make it a default option on standalone mode.
Additional Context
No response