-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(Rocks) DB WAL adds overheads while using the DB for saving checkpoints for block storage. Avoiding writing to WAL translates the write workload (appending blocks to the blockfile) into a sequential disk writes. This commit changes the way checkpoints are saved - checkpoints are written to DB as before, however since WAL is disabled, the checkpoint stays in-memory only. The in-memory checkpoint is flushed explicitly to disk (via DB flush) at the time of new block file creation. The in-memory checkpoint would implicitly also be flushed to memory at the time of DB shutdown. However, if a crash takes place, the checkpoint available in the DB would be behind the actual block file status. In order to handle this crash scenario, this commit also adds code to perform a scan of the block file beyond the last saved checkpoint and update the checkpoint. Change-Id: Ie88646b225abaa50b595833f5e7ed8d4facae920 Signed-off-by: manish <manish.sethi@gmail.com>
- Loading branch information
1 parent
9ec4873
commit 0df6a8d
Showing
7 changed files
with
219 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.