-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add features for Epoch file management and cleanup
1. Remove rotated Epoch files at startup * All rotated Epoch files are removed at the end of the startup process. * To prevent losing last_durable_epoch in case of a crash after file removal, the value of last_durable_epoch is written to the current Epoch file before removal. 2. Implement Epoch file refresh to limit file growth * The refresh process is triggered when the number of entries exceeds a defined constant max_entries_in_epoch_file. Refresh steps: a. Create a temporary file and write necessary epochs. b. Atomically replace the original Epoch file with the temporary file using rename. c. Remove the temporary file after the swap. * At startup, leftover temporary files from incomplete refreshes are also removed to ensure consistency. These changes prevent excessive accumulation of rotated Epoch files and control the size of the Epoch file while ensuring data integrity even in crash scenarios.
- Loading branch information
Showing
8 changed files
with
362 additions
and
58 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
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
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.