dcapwell commented on code in PR #4518:
URL: https://github.com/apache/cassandra/pull/4518#discussion_r2604060879
##########
src/java/org/apache/cassandra/service/accord/txn/TxnReferenceOperation.java:
##########
@@ -202,27 +227,35 @@ public boolean equals(Object o)
TxnReferenceOperation that = (TxnReferenceOperation) o;
return Objects.equals(receiver, that.receiver)
&& kind == that.kind
- && Objects.equals(key, that.key)
+ && Objects.equals(keyOrIndex, that.keyOrIndex)
&& Objects.equals(field, that.field)
&& Objects.equals(value, that.value);
}
- public void collect(TableMetadatas.Collector collector)
- {
- collector.add(table);
- value.collect(collector);
- }
-
@Override
public int hashCode()
{
- return Objects.hash(receiver, kind, key, field, value);
+ return Objects.hash(receiver, kind, keyOrIndex, field, value);
}
+
@Override
public String toString()
{
- return receiver + " = " + value;
Review Comment:
this is only true for `Setter` and nothing else, so went with basic toString
##########
src/java/org/apache/cassandra/service/accord/txn/TxnReferenceOperation.java:
##########
@@ -274,9 +308,9 @@ public void serialize(TxnReferenceOperation operation,
TableMetadatas tables, Da
columnMetadataSerializer.serialize(operation.receiver,
operation.table, out);
TxnReferenceValue.serializer.serialize(operation.value, tables,
out);
- out.writeBoolean(operation.key != null);
- if (operation.key != null)
- ByteBufferUtil.writeWithVIntLength(operation.key, out);
+ out.writeBoolean(operation.keyOrIndex != null);
Review Comment:
the bools were missing, so the serializer test detected we were off by 2
bytes
--
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]