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


##########
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:
   Done for adding replica index validation.



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