[DRAFT] Tiered-Storage pause/resume #24871
Open
+75
−38
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.
This PR changes behaviour in situation when the TS is put on pause. Previously, Redpanda could potentially produce a gap in the partition if TS was paused for a long time. The local retention was allowed to delete segments which are not uploaded yet if the TS was paused. This may may be problematic for applications which expect to "see" all offsets without gaps.
The new behaviour is safe by default in this regard. The TS will block local retention even if it's paused. This creates another problem. The partition with stopped TS may consume all available disk space. To avoid this there is a way to enable old behaviour. The new topic property called
redpanda.remote.allow_gaps
is introduced by this PR. It is set to false by default. It only affects the way local retention behaves when TS is paused. If it's set to false local retention is blocked to avoid offset gaps. If it's set to true the local retention is unblocked but gaps could be created.Backports Required
Release Notes
Features
redpanda.remote.write
can be set toFalse
safely without the risk of creating gaps in the offset range.redpanda.remote.allow_gaps
is added. If it's set toTrue
Redpanda is allowed to create gaps in the offset range when TS is paused.