-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Open
Description
In chronological order:
WAL archival feature initially came with a DeleteWalFiles() API: 8a3547d
DeleteWalFiles() later got merged into DeleteFile(): 5630522
Then DeleteFile() was removed in #13322. The past discussions focused on it being undesirable for SST file deletion; I'm not sure whether archived WAL deletion was considered.
Today, there are two options for archived WAL deletion, neither of which offer control over what data gets dropped.
WAL_size_limit_MB: It has some confusing logic for deciding what files to delete, including an obvious overflow bug and not counting the deleted WAL file's size. It is also immutable. Even if all of these were fixed, it would be a highly unusable for trimming up to a particular point.WAL_ttl_seconds: It is immutable, only offers control at second granularity, and relies on system timestamp for ordering, making it highly unusable for trimming up to a particular point.
A possible solution I like would be a TrimUpdatesUntil() API, as a counterpart to GetUpdatesSince().
Other possibilities include restoring a WAL deletion function, or having a callback option.
Metadata
Metadata
Assignees
Labels
No labels