xichen01 commented on code in PR #11223:
URL: https://github.com/apache/ozone/pull/11223#discussion_r4116063927


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java:
##########
@@ -1114,6 +1116,7 @@ ContainerCommandResponseProto handleWriteChunk(
 
       WriteChunkRequestProto writeChunk = request.getWriteChunk();
       BlockID blockID = BlockID.getFromProtobuf(writeChunk.getBlockID());
+      BlockUtils.verifyStorageType(kvContainer.getContainerData(), blockID);

Review Comment:
   I added validation in `handleWriteChunk`. We’ve added validation in many 
places, which tends to bloat the code; since many of these errors would only 
occur in theory, we should strike a balance.



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