-
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
Fix Hyperion serializer config bug #7364
Fix Hyperion serializer config bug #7364
Conversation
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.
Self-review
# If true, hyperion serializer will preserve references between objects. | ||
# This is necessary to support things such as cyclic dependencies between objects. | ||
preserve-object-references = true | ||
serializers { |
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.
Nothing is changed on the default config file, all changes were white space changes from tab to spaces to make sure that text formatting is consistent
@@ -170,7 +170,8 @@ public sealed class HyperionSerializerSettings | |||
/// <summary> | |||
/// Default settings used by <see cref="HyperionSerializer"/> when no config has been specified. | |||
/// </summary> | |||
public static readonly HyperionSerializerSettings Default = Create(HyperionSerializer.DefaultConfiguration()); | |||
public static readonly HyperionSerializerSettings Default = Create(HyperionSerializer.DefaultConfiguration() | |||
.GetConfig("akka.actor.serialization-settings.hyperion")); |
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.
This is the actual config HyperionSerializerSettings
was expecting, not the root config.
doesn't this mean that the defaults behaviors, if different than what the HOCON specifies, are now enforced? |
Luckily, all of the default values are exactly the same to what we've assigned if the config were empty. akka.net/src/contrib/serializers/Akka.Serialization.Hyperion/HyperionSerializer.cs Lines 251 to 258 in 07c2b51
akka.net/src/contrib/serializers/Akka.Serialization.Hyperion/HyperionSerializer.cs Line 394 in 07c2b51
So this PR have no behavior impact, unless we change the default values. |
Yes and no, yes if the default were different, luckily it is not. |
That's good to know - thanks @Arkatufus |
The
HyperionSerializer(ExtendedActorSystem)
ctor method uses the wrong HOCON config.HyperionSerializerConfig.Create()
expects the config from the "akka.actor.serialization-settings.hyperion" path, but theHyperionSerializer
ctor passes the HOCON root config to it.Behavior change after this PR:
No known behavioral change.
Changes