Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raft: Garbage collect WAL files #1327

Merged
merged 1 commit into from
Aug 10, 2016
Merged

raft: Garbage collect WAL files #1327

merged 1 commit into from
Aug 10, 2016

Commits on Aug 6, 2016

  1. raft: Garbage collect WAL files

    We currently garbage collect snapshot files (keeping only
    KeepOldSnapshot outdated snapshots, which defaults to 0). However, we
    don't garbage collect the WAL files that the snapshots replace.
    
    Delete any WALs which are so old that they only contain information that
    predates the oldest of the snapshots we have retained. This means that
    by default, we will remove old WALs once they are supplanted by a
    snapshot. However, if KeepOldSnapshots is set above 0, we will keep
    whichever WALs are necessary to catch up from the oldest of the retained
    snapshots. This makes sure that the old snapshots we retain are actually
    useful, and avoids adding an independent knob for WAL retention that
    might end up with an inconsistent setting.
    
    Also, fix serious brokenness in the the deletion of old snapshots (it
    was deleting the most recent outdated snapshots, instead of the oldest).
    
    Signed-off-by: Aaron Lehmann <[email protected]>
    aaronlehmann committed Aug 6, 2016
    Configuration menu
    Copy the full SHA
    c72cdf1 View commit details
    Browse the repository at this point in the history