fix(inkless:switch): update UnderReplicatedPartition for switched partitions#697
Draft
giuseppelillo wants to merge 1 commit into
Draft
fix(inkless:switch): update UnderReplicatedPartition for switched partitions#697giuseppelillo wants to merge 1 commit into
giuseppelillo wants to merge 1 commit into
Conversation
giuseppelillo
force-pushed
the
glillo/resolve-urp-switch
branch
from
July 14, 2026 13:54
a9a968f to
8fb0f9e
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes an operational issue where ReplicaManager’s UnderReplicatedPartitions aggregate could remain non-zero (or otherwise not reflect live ISR state) after switching a topic from classic to diskless, by ensuring the leader continues to observe the follower’s fetch state until the replica is back in ISR.
Changes:
- Update follower fetch routing to treat
fetchOffset == classicToDisklessStartOffsetas still eligible for unified-log reads for follower requests, enabling the leader to observe fetch progress at the seal offset. - Ensure diskless followers schedule a fetch even when caught up to the seal but currently out of ISR, so the leader can expand ISR again.
- Add a system test that stops a follower after switch, asserts URP rises, then restarts the follower and asserts URP clears after ISR fully recovers.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/kafkatest/tests/inkless/inkless_topic_switch_test.py | Adds URP JMX scraping + a new test to verify URP rises on replica loss and clears after replica recovery post-switch. |
| core/src/main/scala/kafka/server/ReplicaManager.scala | Adjusts diskless follower fetch eligibility at the seal offset and ensures fetching is scheduled when out of ISR even if already caught up. |
| core/src/main/scala/kafka/server/ReplicaFetcherThread.scala | Prevents evicting switched partitions from the replica fetcher until the replica is back in ISR. |
giuseppelillo
force-pushed
the
glillo/resolve-urp-switch
branch
from
July 15, 2026 12:57
8fb0f9e to
012e6d5
Compare
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.
No description provided.