- Add a new Prometheus metric
raft_engine_write_compression_ratio
to 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
panic
directly. (#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::put
returns 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_count
no 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-dir
to allow automatic placement of logs into an auxiliary directory whendir
is full. - Add a new method
Engine::fork
to duplicate anEngine
to a new place, with a few disk file copies. - Support configuring lz4 acceleration factor with
compression-level
.
- Unconditionally tolerate
fallocate
failures as a fix to its portability issue. Errors other thanEOPNOTSUPP
will 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
PerfContext
which 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_empty
toEngine
API. - Add metadata deletion capability to
FileSystem
trait. Users can implementexists_metadata
anddelete_metadata
to clean up obsolete metadata from older versions of Raft Engine. - Add
Engine::scan_messages
andEngine::scan_raw_messages
for iterating over written key-values. - Add
Engine::get
for getting raw value. - Move
sync
fromenv::WriteExt
toenv::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_usage
to track memory usage #207
- Reduce memory usage by 25% #206
- Introduce a new error type
Full
#206 LogBatch::merge
returns aResult<()>
instead of()
#206