HDDS-15581. ozone debug replicas chunk-info reports wrong block size for EC keys#10592
Open
len548 wants to merge 3 commits into
Open
HDDS-15581. ozone debug replicas chunk-info reports wrong block size for EC keys#10592len548 wants to merge 3 commits into
len548 wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
ozone debug replicas chunk-inforeported the same blockData.size for every EC replica instead of the per-replica size from each datanode.Example steps to reproduce
ozone debug replicas chunk-info <volume>/<bucket>/<key>
Expected (EC 3+2, 1,148,576 bytes):
Actual: all replicas show `1,048,576.
`Root cause: After HDDS-13445,
ChunkKeyHandleriterated over pipeline datanodes but calledContainerProtocolCalls.getBlock(), which usestryEachDatanodeand always queries the closest node unless errors reading the datanode. The loop variable of datanode was ignored by that. The current testing doesn't catch this bug because it doesn't check the size for each replicas.Fix: Add
ContainerProtocolCalls.getBlockFromDatanode()and use it inChunkKeyHandlerso each replica is queried on its own datanode with the correct EC replica index.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15581
How was this patch tested?
Replace .block file-count checks in ozone-debug-tests-ec3-2.robot with robot tests that assert blockData.size per replica for EC(3,2) covering different stripe layout scenarios. Add the same tests for EC(6,3) suite and wire it into ec-test.sh after scaling to 9 datanodes.
Also refactor keywords
Count Datanodes In ServiceandHas Enough Datanodesfrom awss3ecstorage.robot to ec library.CI: https://github.com/len548/ozone/actions/runs/28040511916/job/83005380343