-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-4954. Add replicaIndex to the RPC protocols #2055
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
Conversation
|
Thanks for separating the replication type changes into separate JIRA. We also discussed yesterday that, let's not make index as the property to chunkInfo. I am more comfortable if we make that as property to ContainerBlockID instead. Thanks for removing them in latest patch. |
| required DatanodeBlockID blockID = 1; | ||
| required ChunkInfo chunkData = 2; | ||
| optional bytes data = 3; | ||
| optional int32 containerinstanceIndex = 4; |
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.
containerinstanceIndex -> containerInstanceIndex
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.
Fixed with moving this field to the DatanodeBlockID
umamaheswararao
left a comment
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.
I understand you may be correcting the formatting issues like organizing imports and other formatting in existing code as well. Could you please check if it's possible to keep only changed lines to be formatted? That way branch code will have less changes and we can avoid conflict issues.
| } | ||
|
|
||
| public int getReplicaIndex(DatanodeDetails dn) { | ||
| return replicaIndexes.getOrDefault(dn, 0); |
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.
Could you please add a comment that, returning 0 means, it's just an invalid index and this API for EC. Because mostly we may not use this kind of API in non-EC flow, we may invoke this API in EC flow to get a particular DN index.
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.
Sure, I added a detailed javadoc.
Sure, I removed it, but during my git rebase it's not fully moved (I manage 10-12 patches today and trying to sync them one-by-one with different PRs) Now it should be good:
Same is true for |
|
Thanks the review @umamaheswararao, I updated the improved version, PTAL... |
|
@elek thanks for the update. I will take a look at the latest patch.
this works as well for me. |
|
Can we avoid unrelated import organization changes if possible? Otherwise I am +1 on the changes. |
…a849b3cc95d950f72c82bc9c1d7b7ca586bf' into ec-instanceid
|
Sorry, I just realized that I didn't push my changes which restored the import orders. Should be there now... |
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.
The latest changes LGTM
+1
Pending CI run
|
Merging it as CI is green. Thanks the review @umamaheswararao |
What changes were proposed in this pull request?
This is the initial patch to support differentiating between multiple container replicas.
With RATIS/Closed containers all the container replicas are exactly the same but with EC they will be different. We need an additional index for each container replicas to know how it should be handled.
This patch is part of bigger effort to show end2end solution for container indexes. The full picture can be found at https://github.com/elek/ozone/tree/ec with all of these improvements:
This doesn't include all of these modifications, it is just the very first, separated step where the proto files and Pipeline are modified.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-4954
How was this patch tested?
The patch is tested together with the full end2end code (https://github.com/elek/ozone/tree/ec)
Started Ozone cluster and created a key:
Checked the container yaml file if it contains the instandeIndex.
Checked the SCM log for the message from ReplicationMananger: