Repository navigation
Keep sending event processor info after a failure - #534
Merged
Merged
Conversation
The scheduled task that sends event processor info rescheduled itself as its last statement. When building or sending the info of any processor threw an exception, the reschedule was skipped and the exception was swallowed by the ScheduledFuture. Because infoSupplierActive stayed true, registering a processor did not restart the task either. As a result the client silently stopped reporting processor status for that context until the application was restarted, while staying connected. Always reschedule in a finally block, and contain failures per processor so a failing supplier or send does not block the info of other processors. Failures are logged at WARN. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZwTrgqKzmmVjJ8cntDa1R
MGathier
requested review from
a team,
MateuszNaKodach,
hjohn,
m1l4n54v1c,
schananas,
smcvb and
trimoq
and removed request for
a team and
m1l4n54v1c
November 20, 2026 06:08
smcvb
approved these changes
Nov 20, 2026
smcvb
left a comment
Contributor
There was a problem hiding this comment.
One test curiosity. Other than that, this looks good to me.
| .count(); | ||
| } | ||
|
|
||
| private static void awaitUntil(BooleanSupplier condition) { |
Contributor
There was a problem hiding this comment.
Curious: why not use awaitility instead for this?
Contributor
|
We shouldn't forget to backport this to the |
Replace the hand-written awaitUntil polling helper with Awaitility and add it as a test dependency. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZwTrkRHzpYUvni9BgWFew
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.
Problem
ControlChannelImpl.sendScheduledProcessorInfo()reschedules itself as its last statement. If building or sending the info of any processor throws, for example:Supplier<EventProcessorInfo>throws while collecting segment/token status, oronNextthrowsIllegalStateException("call was half-closed" / "call was cancelled") because a reconnect completed the outbound stream between theisReady()check and the send,then the reschedule is skipped and the exception disappears into the unobserved
ScheduledFuture. Nothing is logged.infoSupplierActivestaystrue, so registering another processor doesn't restart the task either.The client keeps its connection, heartbeats, commands and queries working, but stops reporting event processor status for that context until the application restarts. In Axon Server the processors of those clients disappear from the processor overview.
We saw this in the field: a heap dump of Axon Server showed several applications connected and known to the server, with no event processor info at all.
Fix
finallyblock, so the loop always continues.Tests
New
ControlChannelImplProcessorInfoTest(a unit test with a mockedClientCall, no Docker needed):processorInfoIsStillSentAfterSupplierThrowsExceptionprocessorInfoIsStillSentAfterSendingFailsfailingSupplierDoesNotBlockInfoOfOtherProcessorsAll unit tests (
!*IntegrationTest) pass locally: 218 run, 0 failures. Integration tests were not run locally.Note for review
A supplier that keeps failing now logs a WARN with a stack trace on every update interval (default 2 s). I chose visibility over silence; happy to change this to log only the first failure in a row if you'd rather keep it quiet.
🤖 Generated with Claude Code
https://claude.ai/code/session_01BZwTrgqKzmmVjJ8cntDa1R