STORM-4104 Fix Pacemaker server stability issues#3739
Merged
rzo1 merged 1 commit intoNov 11, 2024
Conversation
rzo1
approved these changes
Nov 8, 2024
reiabreu
approved these changes
Nov 10, 2024
Contributor
|
Thanks @Scomocouk |
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.
What is the purpose of the change
Fixes STORM-4104 to improve the stability of Pacemaker server (and Netty Server in Workers) bringing it closer to the stability it had in Storm1. This is done by changing the behaviour of Utils.handleUncaughtException to also swallow exceptions derived from those in the supplied ALLOWED_EXCEPTIONS list instead of only the exact exceptions defined in there (i.e. instead of only 'swallowing' IOException, this change will allow SocketException (derived from IOException) to also be 'swallowed')
How was the change tested
Before this change it is easy to see Pacemaker server shut down when simply killing a topology:
2024-11-06 15:21:13.251 [o.a.s.m.n.StormServerHandler] ERROR: server errors in handling the request from /10.44.19.106:59691
java.net.SocketException: Connection reset at sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:401) ~[?:?]
<...snip...>
2024-11-06 15:21:13.270 [o.a.s.m.n.StormServerHandler] INFO: Received error in netty thread.. terminating server...
With this fix the Pacemaker server now logs that a SocketException was received but that it is 'swallowing' it and pacemaker server continues to run:
2024-11-06 16:19:46.860 [o.a.s.u.Utils] INFO: Swallowing class java.net.SocketException java.net.SocketException: Connection reset
Also added unit tests for the new behaviour of Utils.handleUncaughtException