bdeggleston commented on code in PR #3310:
URL: https://github.com/apache/cassandra/pull/3310#discussion_r1605569006
##########
src/java/org/apache/cassandra/service/accord/serializers/CommandsForKeySerializer.java:
##########
@@ -389,9 +389,11 @@ public static ByteBuffer toBytesWithoutKey(CommandsForKey
cfk)
{
Unmanaged unmanaged = cfk.getUnmanaged(i);
Invariants.checkState(unmanaged.pending == pending);
- CommandSerializers.txnId.serialize(unmanaged.txnId, out,
ByteBufferAccessor.instance, out.position());
+
+ CommandSerializers.txnId.serialize(unmanaged.txnId, out,
ByteBufferAccessor.instance, 0);
Review Comment:
both this and and previous implementation are inconsistent with how accessor
serializers are used. The pattern is:
```java
long position = 0;
position += CommandSerializers.txnId.serialize(unmanaged.txnId, out,
ByteBufferAccessor.instance, position);
position += CommandSerializers.timestamp.serialize(unmanaged.waitingUntil,
out, ByteBufferAccessor.instance, position);
return position;
```
--
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]