HDDS-11069. Block location is missing in output of Ozone debug chunkinfo command for EC.#6909
Merged
aryangupta1998 merged 3 commits intoapache:masterfrom Jul 12, 2024
Merged
Conversation
added 2 commits
July 8, 2024 12:23
Contributor
|
@swamirishi could you please take a look? |
Comment on lines
335
to
346
| int replicaIdx = pipeline.getReplicaIndex(dn); | ||
| ContainerProtos.GetBlockRequestProto getBlockRequestProto = | ||
| request.getGetBlock(); | ||
| DatanodeBlockID datanodeBlockID = getBlockRequestProto.getBlockID(); | ||
| DatanodeBlockID newDatanodeBlockID = | ||
| DatanodeBlockID.newBuilder(datanodeBlockID) | ||
| .setReplicaIndex(replicaIdx).build(); | ||
| ContainerProtos.GetBlockRequestProto newGetBlockRequestProto = | ||
| ContainerProtos.GetBlockRequestProto.newBuilder(getBlockRequestProto) | ||
| .setBlockID(newDatanodeBlockID).build(); | ||
| request = ContainerCommandRequestProto.newBuilder(request) | ||
| .setGetBlock(newGetBlockRequestProto).build(); |
Contributor
There was a problem hiding this comment.
Suggested change
| int replicaIdx = pipeline.getReplicaIndex(dn); | |
| ContainerProtos.GetBlockRequestProto getBlockRequestProto = | |
| request.getGetBlock(); | |
| DatanodeBlockID datanodeBlockID = getBlockRequestProto.getBlockID(); | |
| DatanodeBlockID newDatanodeBlockID = | |
| DatanodeBlockID.newBuilder(datanodeBlockID) | |
| .setReplicaIndex(replicaIdx).build(); | |
| ContainerProtos.GetBlockRequestProto newGetBlockRequestProto = | |
| ContainerProtos.GetBlockRequestProto.newBuilder(getBlockRequestProto) | |
| .setBlockID(newDatanodeBlockID).build(); | |
| request = ContainerCommandRequestProto.newBuilder(request) | |
| .setGetBlock(newGetBlockRequestProto).build(); | |
| ContainerProtos.GetBlockRequestProto gbr = request.getGetBlock(); | |
| request = request.toBuilder().setGetBlock(gbr.toBuilder().setBlockID( | |
| gbr.getBlockID().toBuilder().setReplicaIndex( | |
| pipeline.getReplicaIndex(dn)).build()).build()).build(); |
Contributor
Author
There was a problem hiding this comment.
Thanks , updated the patch.
Contributor
|
Thanks @sadanand48 for the patch, @nandakumar131 for the review. |
xichen01
pushed a commit
to xichen01/ozone
that referenced
this pull request
Jul 26, 2024
…nfo command for EC. (apache#6909) (cherry picked from commit a8c377f)
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?
After HDDS-10983 , it requires every getBlock request be assigned a replicaIndex in case of an EC block. The request constructed for getBlock in this tool didn't have that. This change sets the replicaIndex if key is EC in the getBlock request.
I have reconstructed the request after unpacking the existing request which could have been avoided but since the usecase is just a debug tool and it was simple change, I went with it.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-11069
How was this patch tested?
Unit test