You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "sodonnel (via GitHub)" <gi...@apache.org> on 2023/02/27 13:42:02 UTC

[GitHub] [ozone] sodonnel commented on a diff in pull request #4320: HDDS-8037. Improve logging in EC Reconstruction putBlock precondition check

sodonnel commented on code in PR #4320:
URL: https://github.com/apache/ozone/pull/4320#discussion_r1118749693


##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/ECBlockOutputStream.java:
##########
@@ -128,8 +128,13 @@ ContainerCommandResponseProto> executePutBlock(boolean close,
       List<ChunkInfo> currentChunks = getContainerBlockData().getChunksList();
       List<ChunkInfo> checksumBlockDataChunks = checksumBlockData.getChunks();
 
-      Preconditions.checkArgument(
-          currentChunks.size() == checksumBlockDataChunks.size());
+      if (currentChunks.size() != checksumBlockDataChunks.size()) {
+        throw new IllegalArgumentException("The chunk list has " +
+            currentChunks.size() +
+            " entries, but the checksum chunks has " +
+            checksumBlockDataChunks.size() +
+            " entries. They should be equal in size.");
+      }

Review Comment:
   I didn't realize it took an extra argument. I will change it.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org