errose28 commented on code in PR #7490:
URL: https://github.com/apache/ozone/pull/7490#discussion_r1913839708
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainerCheck.java:
##########
@@ -379,12 +378,13 @@ private List<ContainerScanError> scanBlock(DBHandle db,
File dbFile, BlockData b
// So, we need to make sure, chunk length > 0, before declaring
// the missing chunk file.
if (!block.getChunks().isEmpty() &&
block.getChunks().get(0).getLen() > 0) {
- ContainerScanError error = new
ContainerScanError(FailureType.MISSING_CHUNK_FILE,
+ ContainerScanError error = new
ContainerScanError(FailureType.MISSING_DATA_FILE,
new File(containerDataFromDisk.getChunksPath()), new
IOException("Missing chunk file " +
chunkFile.getAbsolutePath()));
blockErrors.add(error);
}
} else if (chunk.getChecksumData().getType() !=
ContainerProtos.ChecksumType.NONE) {
+ currentTree.addBlock(block.getBlockID().getLocalID());
Review Comment:
This handles the case where the block file exists but is zero length. The
accurate representation of this is a block node in the tree with no child chunk
nodes. I'll add a comment to the code here explaining this.
--
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]