dcapwell commented on code in PR #1948:
URL: https://github.com/apache/cassandra/pull/1948#discussion_r1009861254
##########
src/java/org/apache/cassandra/service/accord/AccordKeyspace.java:
##########
@@ -115,12 +115,12 @@
private static final Logger logger =
LoggerFactory.getLogger(AccordKeyspace.class);
public static final String COMMANDS = "commands";
- public static final String COMMAND_SERIES = "command_series";
public static final String COMMANDS_FOR_KEY = "commands_for_key";
private static final String TIMESTAMP_TUPLE = "tuple<bigint, bigint, int,
bigint>";
private static final TupleType TIMESTAMP_TYPE = new
TupleType(Lists.newArrayList(LongType.instance, LongType.instance,
Int32Type.instance, LongType.instance));
private static final String KEY_TUPLE = "tuple<uuid, blob>";
+ private static final int CURRENT_VERSION = 1;
Review Comment:
yeah good point... the serialized used in the end also work on network, so
versions *has* to be network in order to avoid duplication...
> I'm already doing this in
AccordPartialCommand.PartialCommandSerializer.Version. Why not promote that
enum to AccordSerializerVersion and use it instead?
so the current value is `VERSION_0(0, MessagingService.current_version);`
which has the bug that we redefine if anyone bumps; so should become
`VERSION_0(0, MessagingService.VERSION_40);`...
Now, lets say we do promote, then we would need to have something like an
AccordSerializer which is a `IVersionedSerializer` but that maps `int version`
to `enum AccordSerializerVersion` and delegates to copies of the methods that
take the `AccordSerializerVersion`...
One thing also being pointed out here is that `PartialCommandSerializer` and
`LocalVersionedSerializer` duplicate logic, so we should unify this.
Ill take a stab at unifying this logic...
--
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]