-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent EndpointDisassociatedException from being thrown from EndpointReader #5155
Prevent EndpointDisassociatedException from being thrown from EndpointReader #5155
Conversation
@@ -1961,6 +1961,10 @@ private void Reading() | |||
{ | |||
LogTransientSerializationError(ackAndMessage.MessageOption, e); | |||
} | |||
catch (InvalidCastException e) | |||
{ | |||
LogTransientSerializationError(ackAndMessage.MessageOption, e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
just curious, isn't this already handled here? akka.net/src/contrib/serializers/Akka.Serialization.Hyperion/HyperionSerializer.cs Line 134 in a4e26fb
|
Good question - cc @Arkatufus ? |
No, that catches |
But if you click into that gist, that |
Yes, but the same problem will happen to people who doesn't use the latest Hyperion version, InvalidCastException will get bubbled up uncaught, so this is more of a backward compatibility patch |
@Arkatufus that's a good point - we used to not catch those errors inside |
In fact, we probably haven't released a new version of Akka.NET since that bug fix was introduced. Meant to do that last week but ran out of time before I had to go on leave. |
Hyperion can throw an InvalidCastException when deserializing a message that came from a system that uses a different sorting order compared to the receiving system. This exception should be treated like a SerializationException and should not cause the EndpointReader to fail.