errose28 opened a new pull request, #9015:
URL: https://github.com/apache/ozone/pull/9015
## What changes were proposed in this pull request?
Currently the container scanner rebuilds the merkle tree based only on what
it sees on disk. This will cause the data checksum to change when blocks are
deleted, which is not desirable. The scanner should also consult the list of
deleted blocks already stored in the checksum file and add those to the tree it
generates.
Also when reconciling, if a peer has marked a block as deleted and we have
not, but we also don't have the block, we need to add that block and its
checksum to our deleted block list. This allows checksums to converge for
containers that had blocks deleted before upgrading to reconciliation.
### implementation
- Pushes as much logic as possible down into the `ContainerMerkleTreeWriter`
and `ContainerChecksumTreeManager` to avoid complicating scanner, block delete,
and reconciliation.
- Stores deleted blocks in the merkle tree instead of a separate list.
- This aims to unify handling during the diff computation
- Resolves conflicts between peer checksums for deleted blocks using a
simple max of the checksums
- Once data is deleted, we just need checksums to converge to a value. It
does not have to be the correct one, and without data present it may be
impossible to determine which was the correct one that actually matched the
data.
- Since the block deleting service can add deleted nodes to the tree before
the container scanner gets to it, the data checksum is not updated in this case.
- Existing code has been modified to check data checksum existence using
the `dataChecksum` field in the tree, instead of assuming tree existence
implies there will be a data checksum.
## What is the link to the Apache JIRA
HDDS-13245
## How was this patch tested?
WIP. Unit tests are being added and updated. Changes to existing tests of
deleted block handling are required due to the change in how they are saved.
--
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]