Log compaction is a disk IO intensive task, so we want to avoid executing it inside Raft's lock_.
For that purpose, added an API to compact log asynchronously. compact_async can return immediately, and a callback will be invoked on the completion of the log compaction.
Log compaction is a disk IO intensive task, so we want to avoid executing it inside Raft's
lock_
.For that purpose, added an API to compact log asynchronously.
compact_async
can return immediately, and a callback will be invoked on the completion of the log compaction.