aweisberg commented on code in PR #4322:
URL: https://github.com/apache/cassandra/pull/4322#discussion_r2286076746
##########
src/java/org/apache/cassandra/service/accord/txn/AccordUpdateParameters.java:
##########
@@ -82,7 +82,7 @@ public UpdateParameters updateParameters(TableMetadata
metadata, DecoratedKey dk
return new RowUpdateParameters(metadata,
disabledGuardrails,
options,
- timestamp,
+ overrideTimestamp ==
TxnWrite.NO_TIMESTAMP ? timestamp : overrideTimestamp,
Review Comment:
`AccordTimestampPreservationTest` could use some new test cases for this if
it isn't explicitly covered elsewhere.
##########
src/java/org/apache/cassandra/service/accord/txn/TxnWrite.java:
##########
@@ -362,6 +368,9 @@ public void serialize(Fragment fragment, TableMetadatas
tables, DataOutputPlus o
out.writeUnsignedVInt32(fragment.index);
PartitionUpdate.serializer.serializeWithoutKey(fragment.baseUpdate, tables,
out, version.messageVersion());
TxnReferenceOperations.serializer.serialize(fragment.referenceOps, tables, out,
version);
+ out.writeBoolean(fragment.timestamp != NO_TIMESTAMP);
Review Comment:
I wonder if a vint would handle this more concisely?
##########
src/java/org/apache/cassandra/cql3/statements/TransactionStatement.java:
##########
@@ -515,7 +515,7 @@ public ResultMessage execute(QueryState state, QueryOptions
options, Dispatcher.
Txn txn = createTxn(state.getClientState(), options);
- TxnResult txnResult = AccordService.instance().coordinate(minEpoch,
txn, options.getConsistency(), requestTime);
Review Comment:
We talked about this, but this is only dead because of changes to
`AccordService` that now cause the error message to no longer include the
correct CL. It should be fixed not removed.
##########
src/java/org/apache/cassandra/utils/ByteBufferUtil.java:
##########
@@ -570,6 +570,7 @@ public static double toDouble(ByteBuffer bytes)
public static ByteBuffer objectToBytes(Object obj)
{
+ if (obj == null) return null;
Review Comment:
Seems like a big change to the contract of this non-test method. It's not
used a ton of places, but opting them all into passing `null` on instead of
returning an error.
Are we actually supposed to support null bind values?
--
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]