belliottsmith commented on code in PR #3967:
URL: https://github.com/apache/cassandra/pull/3967#discussion_r1992058497
##########
src/java/org/apache/cassandra/service/accord/serializers/AwaitSerializers.java:
##########
@@ -114,8 +114,8 @@ public long serializedSize(A await, int version)
}
};
- public static final IVersionedSerializer<AwaitOk> syncReply = new
EnumSerializer<>(AwaitOk.class);
- public static final IVersionedSerializer<RecoverAwaitOk> recoverReply =
new EnumSerializer<>(RecoverAwaitOk.class);
+ public static final IVersionedSerializer<AwaitOk> syncReply =
EncodeAsVInt32.of(AwaitOk.class);
+ public static final IVersionedSerializer<RecoverAwaitOk> recoverReply =
EncodeAsVInt32.of(RecoverAwaitOk.class);
Review Comment:
Merging multiple different serialisers into a single one. We had
SmallEnumSerializer, EnumSerializer, wrapped both of them in nullable
unnecessarily, and would have needed another new one for Known (which isn't an
enum, but is easily stored as an integer, and was the motivation). So, this
replaced about five logically distinct serializers.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]