Skip to content

feat(inkless:metrics): add classic-to-diskless replicas outside ISR gauge - #763

Merged
jeqo merged 1 commit into
mainfrom
jeqo/replica-awaiting-isr
Aug 19, 2026
Merged

jeqo merged 1 commit into
mainfrom
jeqo/replica-awaiting-isr

Conversation

@jeqo

@jeqo jeqo commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

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
jeqo requested a balanced review from Copilot August 19, 2026 09:34

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

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
jeqo force-pushed the jeqo/replica-awaiting-isr branch from 0d8fcec to afd462e Compare August 19, 2026 09:42
@jeqo
jeqo marked this pull request as ready for review August 19, 2026 09:43
@jeqo
jeqo requested a review from tvainika August 19, 2026 09:50
@jeqo
jeqo merged commit 1ea1573 into main Aug 19, 2026
9 checks passed
@jeqo
jeqo deleted the jeqo/replica-awaiting-isr branch August 19, 2026 10:22
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.
@jeqo jeqo changed the title feat(inkless:metrics): expose diskless-switched replicas awaiting ISR recovery feat(inkless:metrics): add classic-to-diskless replicas outside ISR gauge Aug 19, 2026
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.

3 participants