Repository navigation
feat(inkless:metrics): add classic-to-diskless replicas outside ISR gauge - #763
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a broker gauge for switched diskless replicas that reached the seal but remain outside ISR.
Changes:
- Registers and cleans up the new gauge.
- Tests pending, catch-up, ISR admission, and born-diskless states.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
core/src/main/scala/kafka/server/ReplicaManager.scala |
Implements and registers the recovery gauge. |
core/src/test/scala/unit/kafka/server/ReplicaManagerInklessTest.scala |
Covers gauge state transitions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…auge The standard under-replicated partition gauges intentionally exclude consolidating topics because those topics do not materialize ordinary followers. That leaves no direct broker metric for a classic-to-diskless replica that has reached the committed seal but remains outside ISR. Add DisklessSwitchedReplicasOutsideIsrCount under the ReplicaManager metric group. It counts hosted replicas whose switch has a committed seal, whose local log end offset is at or beyond that seal, and whose broker is absent from metadata ISR. The gauge covers consolidating and non-consolidating switched topics and describes only the observed state, so it can measure the condition before and after ISR recovery changes land. A brief nonzero value is expected during normal ISR admission. Monitoring can alert on a sustained value without adding timers or logging state to ReplicaFetcherThread. Testing testDisklessSwitchedReplicasOutsideIsrCount covers a pending switch, a replica below the seal, a replica at the seal outside ISR, ISR admission, and a born-diskless replica.
jeqo
force-pushed
the
jeqo/replica-awaiting-isr
branch
from
August 19, 2026 09:42
0d8fcec to
afd462e
Compare
jeqo
marked this pull request as ready for review
August 19, 2026 09:43
tvainika
approved these changes
Aug 19, 2026
jeqo
added a commit
that referenced
this pull request
Aug 19, 2026
…auge (#763) The standard under-replicated partition gauges intentionally exclude consolidating topics because those topics do not materialize ordinary followers. That leaves no direct broker metric for a classic-to-diskless replica that has reached the committed seal but remains outside ISR. Add DisklessSwitchedReplicasOutsideIsrCount under the ReplicaManager metric group. It counts hosted replicas whose switch has a committed seal, whose local log end offset is at or beyond that seal, and whose broker is absent from metadata ISR. The gauge covers consolidating and non-consolidating switched topics and describes only the observed state, so it can measure the condition before and after ISR recovery changes land. A brief nonzero value is expected during normal ISR admission. Monitoring can alert on a sustained value without adding timers or logging state to ReplicaFetcherThread. Testing testDisklessSwitchedReplicasOutsideIsrCount covers a pending switch, a replica below the seal, a replica at the seal outside ISR, ISR admission, and a born-diskless replica.
jeqo
added a commit
that referenced
this pull request
Aug 19, 2026
…auge (#763) The standard under-replicated partition gauges intentionally exclude consolidating topics because those topics do not materialize ordinary followers. That leaves no direct broker metric for a classic-to-diskless replica that has reached the committed seal but remains outside ISR. Add DisklessSwitchedReplicasOutsideIsrCount under the ReplicaManager metric group. It counts hosted replicas whose switch has a committed seal, whose local log end offset is at or beyond that seal, and whose broker is absent from metadata ISR. The gauge covers consolidating and non-consolidating switched topics and describes only the observed state, so it can measure the condition before and after ISR recovery changes land. A brief nonzero value is expected during normal ISR admission. Monitoring can alert on a sustained value without adding timers or logging state to ReplicaFetcherThread. Testing testDisklessSwitchedReplicasOutsideIsrCount covers a pending switch, a replica below the seal, a replica at the seal outside ISR, ISR admission, and a born-diskless replica.
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.
The standard under-replicated partition gauges intentionally exclude consolidating topics because those topics do not materialize ordinary followers. That leaves no direct broker metric for a classic-to-diskless replica that has reached the committed seal but remains outside ISR.
Add DisklessSwitchedReplicasOutsideIsrCount under the ReplicaManager metric group. It counts hosted replicas whose switch has a committed seal, whose local log end offset is at or beyond that seal, and whose broker is absent from metadata ISR. The gauge covers consolidating and non-consolidating switched topics and describes only the observed state, so it can measure the condition before and after ISR recovery changes land.
A brief nonzero value is expected during normal ISR admission. Monitoring can alert on a sustained value without adding timers or logging state to ReplicaFetcherThread.
Testing
testDisklessSwitchedReplicasOutsideIsrCount covers a pending switch, a replica below the seal, a replica at the seal outside ISR, ISR admission, and a born-diskless replica.