-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDDS-10374. Make container scanner generate merkle trees during the scan #7490
base: HDDS-10239-container-reconciliation
Are you sure you want to change the base?
HDDS-10374. Make container scanner generate merkle trees during the scan #7490
Conversation
…anner-builds-mt * HDDS-10239-container-reconciliation: HDDS-10928. Implement container comparison logic within datanodes. (apache#7293)
Missing chunks are incorrectly reported as corrupted
Metadata scanner integration tests are passing
Should Not Be Equal As Strings 0 ${data_checksum} | ||
Container checksums should match ${container} ${data_checksum} | ||
# Check that reconcile CLI returns success. Without fault injection, there is no change expected to the | ||
# container's checksums to inidcate it made a difference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# container's checksums to inidcate it made a difference | |
# container's checksums to indicate it made a difference |
@@ -1348,7 +1358,6 @@ public void markContainerUnhealthy(Container container, ScanResult reason) | |||
} finally { | |||
container.writeUnlock(); | |||
} | |||
createContainerMerkleTree(container); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a container moves from OPEN
to UNHEALTHY
state we should try to build a merkle tree with whatever data we have at the moment before the scanner builds the actual merkle tree. If for some reason (either metadata/data error) we are unable to build it, then we can log the exception and move.
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()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not add the block when we add the first chunk?
What changes were proposed in this pull request?
Summary
Allow the container scanner to update the container Merkle Tree with the currently calculated hashes of what is on disk. If the tree does not already exist, it will be created. Even if the container is unhealthy, the merkle tree should still be updated to reflect the current state of the container. Hashes stored in RocksDB that were given by the client during write will not be modified.
What is the link to the Apache JIRA
HDDS-10374
How was this patch tested?
KeyValueContainerCheck
modifiedMore robust testing of fault combinations will be added later using the framework being developed under HDDS-11942