Ignore translog retention policy if soft-deletes enabled#45868
Merged
dnhatn merged 4 commits intoelastic:7.xfrom Aug 22, 2019
Merged
Ignore translog retention policy if soft-deletes enabled#45868dnhatn merged 4 commits intoelastic:7.xfrom
dnhatn merged 4 commits intoelastic:7.xfrom
Conversation
Since elastic#45136, we use soft-deletes instead of translog in peer recovery. There's no need to retain extra translog to increase a chance of operation-based recoveries. This commit ignores the translog retention policy if soft-deletes is enabled so we can discard translog more quickly. Co-authored-by: David Turner <david.turner@elastic.co> Relates elastic#45136
If soft-deletes is enabled, we will trim translog above the local checkpoint of the safe commit immediately. However, if the translog durability is async, the last commit might not be the safe commit as the local checkpoint won't advance until translog is synced. Therefore, we need to verify translog stats busily. Closes elastic#45801 Relates elastic#45473
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.
Since #45136, we use soft-deletes instead of translog in peer recovery.
There's no need to retain extra translog to increase a chance of
operation-based recoveries. This commit ignores the translog retention
policy if soft-deletes is enabled so we can discard translog more
quickly.
Backport of #45473