Repository navigation
docs(inkless:switch): document how to move local logs past the old seal after lower-seal [KC-837] - #889
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The recovery procedure can indefinitely block stalled-replica recovery, fails to capture the old seal before it changes, and risks deleting pre-existing retention settings.
3 open issues
What changed in this PR
This documentation-only PR adds a manual recovery procedure for local logs after lower-seal, replacing the broker-code approach in #884.
Changes:
- Link last-known-leader recovery to the new local-log procedure.
- Document temporary retention settings, replica checks, and restart guidance to move local logs past the old seal.
| File | Description |
|---|---|
docs/inkless/CLASSIC_TO_DISKLESS_SWITCH.md |
Add and link the post-lower-seal local-log recovery procedure. |
Review effort: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
The documented procedure can stall indefinitely if no diskless records have arrived, without explaining this prerequisite, how to defer until application traffic supplies one, or which restrictions remain in effect while waiting.
1 open issue
3 resolved since last review
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
The recovery runbook relies on cluster-test extensions absent from the PR, so a maintainer should validate the retention and stalled-follower restart procedures before operators rely on it.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
…al after lower-seal [KC-837] `lower-seal` moves the committed seal below the offset where the diskless log starts. Consolidation appends the diskless records at the old seal, so each replica's leader epoch cache maps the lost offsets to a classic epoch. While a replica holds local segments below the old seal, a broker restart or a leader change makes replicas truncate or recreate their consolidated records, and a follower can stop consolidating. `lower-seal` only follows a last-known-leader election in phase 1 that lost records, so this change documents a manual procedure and doesn't change the broker. The procedure forces local retention past the old seal, after which restarts and leader changes leave the replicas alone. Assisted-by: Claude Fable 5.2
…ered-seal procedure [KC-837] The procedure asked for the old seal after `lower-seal` replaced it, so the recovery steps now take it from the broker message that marks the partition offline. A replica that stopped consolidating can't pass the segment check, so the leader restart no longer waits for it. The last step restores the topic configs to their previous values. Assisted-by: Claude Fable 5.2
…iskless record [KC-837] Without a diskless record, every local log ends at the new seal, so no segment can start past the old seal and the wait in step 2 never ends. The broker also has nothing to truncate in that state. The procedure now starts after the first diskless record, and the restart restriction applies from that record on. Assisted-by: Claude Fable 5.2
afe7fdc to
e57294b
Compare

lower-sealmoves the committed seal below the offset where the diskless log starts. Consolidation appends the diskless records at the old seal, so each replica's leader epoch cache maps the lost offsets to a classic epoch. While a replica holds local segments below the old seal, a broker restart or a leader change makes replicas truncate or recreate their consolidated records, and a follower can stop consolidating.lower-sealonly follows a last-known-leader election in phase 1 that lost records, so this PR documents a manual procedure and doesn't change the broker. It adds the subsection "Move the local logs past the old seal" toCLASSIC_TO_DISKLESS_SWITCH.mdand links it from the recovery steps of the last-known-leader election. This PR replaces #884, which fixed the truncation check in code.Test plan
The procedure comes from a cluster test that isn't part of this PR. It extends
ClassicToDisklessSwitchLastKnownLeaderClusterTestate3c990ecdb: three brokers, a lowered seal15with the old seal20, and phase 2.has LEO 15 below the classic-to-diskless seal 20, which gives the old seal beforelower-sealreplaces it.15with a failed consolidation fetcher.segment.msandlocal.retention.msat1000, every replica's local log start passes the old seal: in 16 seconds with a 1-secondlog.retention.check.interval.ms, in 43 seconds with a 40-second one, and with no traffic.0. This holds in six cases: retention first, retention on an idle topic, the 40-second check, a leader change during retention, a leader change before retention, and a follower restart before retention. A seventh case, a leader change after consolidated segments reach remote storage, ends with two clean leader changes and complete consumes, without the follower restart..logbase offset in each replica's partition directory equals that replica's local log start offset. That is the check in step 2.divergenceFromCommittedHistoryandshouldTruncateSwitchedPartitionToSealinReplicaManageract only when the log ends past the seal.make valereports no alerts.🤖 Generated with Claude Code