Skip to content

fix(inkless:switch): update UnderReplicatedPartition for switched partitions#697

Draft
giuseppelillo wants to merge 1 commit into
mainfrom
glillo/resolve-urp-switch
Draft

fix(inkless:switch): update UnderReplicatedPartition for switched partitions#697
giuseppelillo wants to merge 1 commit into
mainfrom
glillo/resolve-urp-switch

Conversation

@giuseppelillo

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 == classicToDisklessStartOffset as 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
giuseppelillo force-pushed the glillo/resolve-urp-switch branch from 8fb0f9e to 012e6d5 Compare July 15, 2026 12:57
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.

2 participants