Kafka Connect: Add metric for partial commit failures - #16433
Merged
laskoviymishka merged 2 commits intoJun 17, 2026
Conversation
yadavay-amzn
force-pushed
the
fix/16392-partial-commit-metric
branch
from
May 21, 2026 20:38
8094e28 to
91ec0c7
Compare
Contributor
Author
|
@laskoviymishka Could you take a look when you get a chance? This is a small addition (7 lines of production code) — adds a counter for partial commit failures so operators can monitor retry pressure. Thanks! |
yadavay-amzn
force-pushed
the
fix/16392-partial-commit-metric
branch
from
June 17, 2026 01:01
b4b7ce0 to
ad51fc2
Compare
laskoviymishka
approved these changes
Jun 17, 2026
laskoviymishka
left a comment
Contributor
There was a problem hiding this comment.
Nice and clean! No objections here :)
![]()
Contributor
Author
|
Thanks for reviewing and approving @laskoviymishka ! |
3 tasks
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.
Fixes #16392.
Summary
Adds an
AtomicLongcounter toCoordinatorthat increments each timecommit(partialCommit=true)catches aRuntimeException. This gives operators visibility into how often partial commits are failing on overloaded clusters.Changes
Coordinator.java: AddedpartialCommitFailurescounter, incremented in the existingpartialCommitcatch block. Exposed via package-privatepartialCommitFailureCount()for testability.TestCoordinator.java: AddedtestPartialCommitFailureMetric()— mocks aCommitFailedExceptionon append, verifies counter starts at 0 and increments to 1 after a failed partial commit cycle.Follow-up
The counter can be wired to a Kafka Connect
Sensor/MBean for JMX exposure in a separate PR.