bshashikant commented on a change in pull request #2152:
URL: https://github.com/apache/ozone/pull/2152#discussion_r615637761



##########
File path: 
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java
##########
@@ -823,19 +797,13 @@ ContainerCommandResponseProto handleGetSmallFile(
       return malformedRequest(request);
     }
 
-    // The container can become unhealthy after the lock is released.
-    // The operation will likely fail/timeout in that happens.
-    try {
-      checkContainerIsHealthy(kvContainer);
-    } catch (StorageContainerException sce) {
-      return ContainerUtils.logAndReturnError(LOG, sce, request);
-    }
-
     GetSmallFileRequestProto getSmallFileReq = request.getGetSmallFile();
 
     try {
       BlockID blockID = BlockID.getFromProtobuf(getSmallFileReq.getBlock()
           .getBlockID());
+      checkContainerIsHealthy(kvContainer, blockID, Type.GetSmallFile);
+      BlockUtils.verifyBCSId(kvContainer, blockID);
       BlockData responseData = blockManager.getBlock(kvContainer, blockID);
 

Review comment:
       BCSID verification will implicitly happen in BlockManager.getBlock() 
call for containerBCSID. Second time will be redundant check.




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

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