swamirishi commented on code in PR #6613:
URL: https://github.com/apache/ozone/pull/6613#discussion_r1811169258


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java:
##########
@@ -1329,6 +1333,109 @@ public void deleteUnreferenced(Container container, 
long localID)
     }
   }
 
+  @Override
+  public ContainerCommandResponseProto streamDataReadOnly(
+      ContainerCommandRequestProto request, KeyValueContainer kvContainer,
+      DispatcherContext dispatcherContext,
+      StreamObserver<ContainerCommandResponseProto> streamObserver) {
+    ContainerCommandResponseProto responseProto = null;
+    try {
+      if (!request.hasReadBlock()) {
+        if (LOG.isDebugEnabled()) {
+          LOG.debug("Malformed Read Block request. trace ID: {}",
+              request.getTraceID());
+        }
+        return malformedRequest(request);
+      }
+      ReadBlockRequestProto readBlock = request.getReadBlock();
+
+      BlockID blockID = BlockID.getFromProtobuf(
+          readBlock.getBlockID());
+      // This is a new api the block should always be checked.
+      BlockUtils.verifyReplicaIdx(kvContainer, blockID);

Review Comment:
   It could so happen that the container replica index could change b/w 2 read 
chunks. You are right about that, we need to ensure that the checksums of the 
chunks do match on the client side. I am still looking through the client side 
code, just wanted to understand if we are doing a checksum verification for 
each and every chunk read on the client side.



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