Repository navigation
[improve][broker] log incompatible schema failures at warn level, rather than logging at error level - #26804
Open
poorbarcode wants to merge 1 commit into
Open
[improve][broker] log incompatible schema failures at warn level, rather than logging at error level#26804poorbarcode wants to merge 1 commit into
poorbarcode wants to merge 1 commit into
Conversation
… than loging at error level
gaoran10
approved these changes
Oct 1, 2026
merlimat
reviewed
Oct 1, 2026
| var latencyMs = this.clock.millis() - start.longValue(); | ||
| if (ex != null) { | ||
| if (ex instanceof IncompatibleSchemaException) { | ||
| if (actEx instanceof IncompatibleSchemaException) { |
Contributor
There was a problem hiding this comment.
@poorbarcode We could also use exceptionMessage() instead of exception() cause we don't need the full stacktrace. And log actEx instead of ex
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.
Motivation
Schema compatibility validation failures can be wrapped in CompletionException. The schema registry previously checked only the outer exception type, causing expected incompatible-schema failures to be logged as errors. Unwrapping the completion exception allows these expected validation failures to be logged at WARN level while preserving ERROR logging for unexpected failures.
You can reproduce it by the test
SchemaServiceTest.checkIsCompatible->case 3->assertThatThrownBy(() -> putSchema(...)Modifications
Correct log level. Since it is a log level change, it is hard to add a verification for it, I did not modify the test
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes