- Add a new Prometheus metric
raft_engine_write_compression_ratioto track compression ratio of write #358
- Periodically flush unsynced bytes when rewriting to avoid I/O jitters if flushing too many bytes impede the foreground writes. (#347)
- Errors will be returned if rewriting fails, instread of
panicdirectly. (#343)
- When log recycling is enabled, Raft Engine will now retain 50% more log files to reduce the chance of running out.
- Reduce the scope of keys reserved for internal use.
LogBatch::putreturns aResult<()>instead of(). It errs when the key is reserved for internal use.- Possible to specify a permission in
FileSystem::open. - Prometheus counter
raft_engine_log_file_countno longer includes retired log files that are stashed for recycling. Those files are now tracked by a new counterraft_engine_recycled_file_count.
- Fix data loss caused by aborted rewrite operation. Downgrading to an earlier version without the fix may produce phantom Raft Groups or keys, i.e. never written but appear in queries.
- Fix a potential bug that an un-persisted log batch is mistakenly recovered and causes checksum mismatch error when being read later.
- Support preparing prefilled logs to enable log recycling when start-up. The amount of logs to prepare is controlled by
Config::prefill_limit. - Add a new configuration
spill-dirto allow automatic placement of logs into an auxiliary directory whendiris full. - Add a new method
Engine::forkto duplicate anEngineto a new place, with a few disk file copies. - Support configuring lz4 acceleration factor with
compression-level.
- Unconditionally tolerate
fallocatefailures as a fix to its portability issue. Errors other thanEOPNOTSUPPwill still emit a warning. - Avoid leaving fractured write after failure by reseeking the file writer. Panic if the reseek fails as well.
- Fix a parallel recovery panic bug.
- Fix panic when an empty batch is written to engine and then reused.
- Add
PerfContextwhich records detailed time breakdown of the write process to thread-local storage. - Support recycling obsolete log files to reduce the cost of
fallocate-ing new ones.
- Add
is_emptytoEngineAPI. - Add metadata deletion capability to
FileSystemtrait. Users can implementexists_metadataanddelete_metadatato clean up obsolete metadata from older versions of Raft Engine. - Add
Engine::scan_messagesandEngine::scan_raw_messagesfor iterating over written key-values. - Add
Engine::getfor getting raw value. - Move
syncfromenv::WriteExttoenv::Handle. - Deprecate
bytes_per_sync.
- Change format version to 2 from 1 by default.
- Enable log recycling by default.
- Fix a false negative case of
LogBatch::is_empty()#212 - Fix fsync ordering when rotating log file #219
- Support limiting the memory usage of Raft Engine under new feature
swap#211 - Add a new Prometheus counter
raft_engine_memory_usageto track memory usage #207
- Reduce memory usage by 25% #206
- Introduce a new error type
Full#206 LogBatch::mergereturns aResult<()>instead of()#206