-
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
Add Cluster.Sharding DData backward compatibility wire format mode #6775
Add Cluster.Sharding DData backward compatibility wire format mode #6775
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.
Do we need to add a simple regression test to the sharding message serializer to ensure that this fix works?
The fix was not in the sharding serializer, its in the DData |
@Arkatufus is it feasible to unit test this fix? |
Well, the target class does not exist in v1.5 binary anymore, testing would require a v1.4 binary protobuf loaded from disk and see if the serializer can deserialize it? |
Actually, we can probably test the |
Done |
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
@@ -735,6 +739,11 @@ private Proto.Msg.LWWRegister LWWToProto<T>(ILWWRegister r) | |||
pLww.State = _ser.OtherMessageToProto(register.Value); | |||
pLww.Timestamp = register.Timestamp; | |||
pLww.TypeInfo = GetTypeDescriptor(r.RegisterType); | |||
|
|||
// HACK: Really really ugly hack to make sure that v1.5 DData cluster sharding works with v1.4 | |||
if(_backwardCompatWireFormat && pLww.TypeInfo.TypeName == "Akka.Cluster.Sharding.ShardCoordinator+CoordinatorState, Akka.Cluster.Sharding") |
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
Fixes #6704
Changes
akka.cluster.sharding.distributed-data.backward-compatible-wire-format
to allow v1.5 to talk with v1.4NOTES
backward-compatible-wire-format
is set to true,Cluster.Sharding
will not be able to talk to any Cluster.Sharding v1.5.0-v1.5.7, so ifCluster.Sharding
were to talk to v1.4.x, all v1.5 nodes have to be updated to the version with this fix.