szetszwo commented on code in PR #6402:
URL: https://github.com/apache/ozone/pull/6402#discussion_r1535789935


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java:
##########
@@ -756,7 +756,7 @@ private void validateChunkChecksumData(ChunkBuffer data, 
ChunkInfo info)
       throws StorageContainerException {
     if (validateChunkChecksumData) {
       try {
-        Checksum.verifyChecksum(data, info.getChecksumData(), 0);
+        Checksum.verifyChecksum(data.toByteString(byteBufferToByteString), 
info.getChecksumData(), 0);

Review Comment:
   Please use as below.  The `toByteString` may have buffer copying.
   ```java
           data = data.duplicate(data.position(), data.limit());
   ```



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