-
Notifications
You must be signed in to change notification settings - Fork 27
Storage
yacovm edited this page Jul 6, 2019
·
3 revisions
We assume the WriteAheadLog
dependency is simple and is able to Truncate
only the whole log.
Therefore, we actually use two WAL files to ensure the ability of erasing a certain prefix of the WAL in a safe manner.
We copy the data that we want to keep to a second WAL, and after it has all been successfully written we truncate the first WAL.
By doing so we get rid of the unwanted prefix while maintaining the rest of the data.