Skip to content
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

treat some deserialization errors as transient in remoting #3782

Merged
merged 8 commits into from
Jun 26, 2019

Conversation

zbynek001
Copy link
Contributor

treat some deserialization errors as transient in remoting

Migrated from
akka/akka#20641
akka/akka#24910

@zbynek001 zbynek001 changed the title [WIP] treat some deserialization errors as transient in remoting treat some deserialization errors as transient in remoting May 9, 2019
@Aaronontheweb
Copy link
Member

this is a very welcome change I've been wanting to add myself. Thanks for handling it! I'll review it as soon as I can.

@Aaronontheweb Aaronontheweb added this to the 1.4.0 milestone May 14, 2019
…0641

* to be able to introduce new messages and still support rolling upgrades,
  i.e. a cluster of mixed versions
* note that it's only catching NotSerializableException, which we already
  use for unknown serializer ids and class manifests
* note that it is not catching for system messages, since that could result
  in infinite resending

Do not tear down connections on IllegalArgumentException from serializer, Migrated from #24910
Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - great change that should make life a lot better for Akka.Remote users.

@@ -157,7 +158,7 @@ public override object FromBinary(byte[] bytes, string manifest)
if (_fromBinaryMap.TryGetValue(manifest, out var factory))
return factory(bytes);

throw new ArgumentException($"Unimplemented deserialization of message with manifest [{manifest}] in [{this.GetType()}]");
throw new SerializationException($"Unimplemented deserialization of message with manifest [{manifest}] in [{this.GetType()}]");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM



[Fact]
public void The_transport_must_stay_alive_after_a_transient_exception_from_the_serializer()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

ackAndMessage.MessageOption.RecipientAddress,
ackAndMessage.MessageOption.SerializedMessage,
ackAndMessage.MessageOption.SenderOptional);
try
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

/// if the manifest is unknown.This makes it possible to introduce new message
/// types and send them to nodes that don't know about them. This is typically
/// needed when performing rolling upgrades, i.e.running a cluster with mixed
/// versions for while. <see cref="SerializationException"/> is treated as a transient
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment is helpful and descriptive

@Aaronontheweb Aaronontheweb merged commit 2fb49c5 into akkadotnet:dev Jun 26, 2019
madmonkey pushed a commit to madmonkey/akka.net that referenced this pull request Jul 12, 2019
…0641 (akkadotnet#3782)

* to be able to introduce new messages and still support rolling upgrades,
  i.e. a cluster of mixed versions
* note that it's only catching NotSerializableException, which we already
  use for unknown serializer ids and class manifests
* note that it is not catching for system messages, since that could result
  in infinite resending

Do not tear down connections on IllegalArgumentException from serializer, Migrated from #24910
Aaronontheweb pushed a commit to Aaronontheweb/akka.net that referenced this pull request Jul 21, 2019
…0641 (akkadotnet#3782)

* to be able to introduce new messages and still support rolling upgrades,
  i.e. a cluster of mixed versions
* note that it's only catching NotSerializableException, which we already
  use for unknown serializer ids and class manifests
* note that it is not catching for system messages, since that could result
  in infinite resending

Do not tear down connections on IllegalArgumentException from serializer, Migrated from #24910
Aaronontheweb pushed a commit to Aaronontheweb/akka.net that referenced this pull request Jul 26, 2019
…0641 (akkadotnet#3782)

* to be able to introduce new messages and still support rolling upgrades,
  i.e. a cluster of mixed versions
* note that it's only catching NotSerializableException, which we already
  use for unknown serializer ids and class manifests
* note that it is not catching for system messages, since that could result
  in infinite resending

Do not tear down connections on IllegalArgumentException from serializer, Migrated from #24910
@zbynek001 zbynek001 deleted the drop-association branch July 16, 2021 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants