Skip to content

fix(inkless:controller): skip switched partitions in unfence ISR expansion - #754

Open
jeqo wants to merge 1 commit into
mainfrom
jeqo/skip-switched-isr-expand
Open

fix(inkless:controller): skip switched partitions in unfence ISR expansion#754
jeqo wants to merge 1 commit into
mainfrom
jeqo/skip-switched-isr-expand

Conversation

@jeqo

@jeqo jeqo commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

expandIsrForDisklessManagedPartitions re-admitted a returning broker to the ISR of every diskless.enable=true partition, selecting on the topic config alone. That is correct for born-diskless partitions, the case #643 targeted: all their data is in object storage, so any live replica is current.

A partition switched from classic breaks that premise. Its records below classicToDisklessStartOffset exist only in the replicas' local logs, so a returning replica could hold an incomplete prefix and was still placed in ISR and made electable.

Skip any partition whose seal is not NO_CLASSIC_TO_DISKLESS_START_OFFSET, which covers both a committed seal and a switch still PENDING. Those partitions earn ISR through AlterPartition once the leader observes follower fetch state at the seal -- the path #697 added. Removing this shortcut before that path existed would have left switched partitions with no ISR-recovery route at all.

The test drives one unfence across three topics -- born-diskless, switched with a committed seal, and switch-pending. Asserting only that switched partitions stay out would also pass against a guard that skipped everything, so the born-diskless leg is what makes it discriminating. Verified red-then-green: with the guard reverted, the switched assertion fails with expected but was .

…nsion

expandIsrForDisklessManagedPartitions re-admitted a returning broker to the ISR
of every diskless.enable=true partition, selecting on the topic config alone.
That is correct for born-diskless partitions, the case #643 targeted: all their
data is in object storage, so any live replica is current.

A partition switched from classic breaks that premise. Its records below
classicToDisklessStartOffset exist only in the replicas' local logs, so a
returning replica could hold an incomplete prefix and was still placed in ISR
and made electable.

Skip any partition whose seal is not NO_CLASSIC_TO_DISKLESS_START_OFFSET, which
covers both a committed seal and a switch still PENDING. Those partitions earn
ISR through AlterPartition once the leader observes follower fetch state at the
seal -- the path #697 added. Removing this shortcut before that path existed
would have left switched partitions with no ISR-recovery route at all.

The test drives one unfence across three topics -- born-diskless, switched with
a committed seal, and switch-pending. Asserting only that switched partitions
stay out would also pass against a guard that skipped everything, so the
born-diskless leg is what makes it discriminating. Verified red-then-green: with
the guard reverted, the switched assertion fails with expected <false> but was
<true>.
@jeqo
jeqo marked this pull request as ready for review August 18, 2026 05:23
@jeqo
jeqo requested a review from viktorsomogyi August 18, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant