Repository navigation
fix(retention): keep tier1 WALs until they reach tier2 - #579
Open
gabriele-wolfox wants to merge 2 commits into
Open
gabriele-wolfox wants to merge 2 commits into
gabriele-wolfox wants to merge 2 commits into
Conversation
gabriele-wolfox
force-pushed
the
dev/578
branch
from
November 6, 2026 09:17
1b594a9 to
6f17e2a
Compare
Tier1 WAL retention deleted WALs older than the oldest backup without checking the tier2 relay, so a lagging relay lost WALs that tier2 never got. Each missing WAL was then retried for over half an hour, blocking the queue behind it. Retention now keeps every WAL the relay queue still holds for the cluster, and skips the pass if the queue can't be read. The relay drops a task whose tier1 file is gone, and releases its dead-lettered original when it was a retry. Assisted-by: Claude Signed-off-by: Gabriele Quaresima <gabriele.quaresima@enterprisedb.com>
Tier1 retention now uses the WALs pending in the relay queue, so nothing reads GetLatestUploadedWAL. Assisted-by: Claude Signed-off-by: Gabriele Quaresima <gabriele.quaresima@enterprisedb.com>
gabriele-wolfox
force-pushed
the
dev/578
branch
from
November 9, 2026 10:38
6f17e2a to
2854af3
Compare
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tier1 WAL retention could delete WALs before the relay copied them to tier2, for example during a tier2 outage.
The relay then retried each missing WAL for about 38 minutes, and the WALs queued behind it had to wait.
Tested on Kind: with tier2 down and WALs queued, an expired backup no longer removes them from tier1.
Fixes #578