C21328 mutation tracking version#4774
C21328 mutation tracking version#4774bdeggleston wants to merge 8 commits intoapache:cep-45-mutation-trackingfrom
Conversation
|
One thing we did when implementing equivalent functionality for Accord was inspect existing serializers and convert the majority of them to the unversioned variant. I expect most of the lower level serializers to not change (ever), and if they ever do, we can convert them to versioned variants one case-by-case basis. |
| @Override | ||
| public void serialize(Version v, DataOutputPlus out, int version) throws IOException | ||
| { | ||
| Preconditions.checkArgument(v.messagingVersion <= version); |
There was a problem hiding this comment.
I think this is dead logic? And also Version itself should have an unversioned serializer.
|
|
||
| public void skip(DataInputPlus in, int version) throws IOException | ||
| { | ||
| in.readByte(); |
There was a problem hiding this comment.
I can see that this skips the version, but it could be made more clear.
Also, realizing that we are writing out a mutation id (now 1 byte fatter) for all mutations, even if if a keyspace has no mutation tracking enabled, for none(), and I don't think that is fine - that's 17 bytes of waste for folks not opted into MT.
There was a problem hiding this comment.
I reckon we could use 0 byte for none() here.
|
At the high level, I think this is done on a slightly wrong level. It's probably the wrong thing to introduce a different style of sub-messaging-service versioning here. Should mimic how Accord does it, and, where makes sense, reuse some of its code as well - but not have two parallel approaches. |
|
I can make the changes that I have in mind if you like. |
|
Pushed pt. 1 of the changes, but there is more to do. As part of the audit, reviewed existing implementations of MT serializers and fixed some low hanging fruit issues: hand-rolled collection serializers, use of fixed size ints for known small int values (instead of vints), etc. Doing the rest correctly is actually relatively involved. We have MT structures interleaved in non-MT structures in a few places (such as mutation id inside Some of these can simply be made unversioned ( |
Thanks for sending a pull request! Here are some tips if you're new here:
Commit messages should follow the following format:
The Cassandra Jira