dcapwell commented on code in PR #4078:
URL: https://github.com/apache/cassandra/pull/4078#discussion_r2040369946


##########
src/java/org/apache/cassandra/db/marshal/ByteBufferAccessor.java:
##########
@@ -318,13 +318,13 @@ public int putFloat(ByteBuffer dst, int offset, float 
value)
     @Override
     public int putLeastSignificantBytes(ByteBuffer dst, int offset, long 
register, int bytes)
     {
-        if (dst.remaining() < Long.BYTES)
+        int pos = dst.position() + offset;

Review Comment:
   my fuzz test avoids reading past the end.  My concern is actually less with 
this file and was more for the change in `ValueAccessor`. 
   
   But, as you said the issue was that this diff was confused... it was 
re-applying
   
   ```
   [dcapwell ~/src/github/apache/cassandra/cep-15-accord] (CASSANDRA-20548) $ 
git lpatch $(find . -name ValueAccessor.java)
   commit cf3a7a33438095921e1465b946fedc0ebdd02664
   Author: Benedict Elliott Smith <[email protected]>
   Date:   Mon Apr 7 12:46:32 2025 +0100
   
       Improve Journal table key serialization
       Also improve:
        - TxnId serialization
        - StoreParticipants serialization
        - compareUnsigned Node.Id for consistency with serialized TxnId
   
       patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20546
   ```
   
   I ran with that patch applied, so not shocked that the test was passing



-- 
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]

Reply via email to