Uh oh!
There was an error while loading. Please reload this page.
HDDS-4954. Add replicaIndex to the RPC protocols - #2055
Conversation
umamaheswararao
commented
Mar 19, 2021
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.
containerinstanceIndex -> containerInstanceIndex
There was a problem hiding this comment.
Fixed with moving this field to the DatanodeBlockID
umamaheswararao
left a comment
There was a problem hiding this comment.
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.
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.
Sure, I added a detailed javadoc.
elek
commented
Mar 22, 2021
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 |
elek
commented
Mar 22, 2021
Thanks the review @umamaheswararao, I updated the improved version, PTAL... |
umamaheswararao
commented
Mar 22, 2021
@elek thanks for the update. I will take a look at the latest patch.
this works as well for me. |
umamaheswararao
commented
Mar 23, 2021
Can we avoid unrelated import organization changes if possible? Otherwise I am +1 on the changes. |
…a849b3cc95d950f72c82bc9c1d7b7ca586bf' into ec-instanceid
elek
commented
Mar 29, 2021
Sorry, I just realized that I didn't push my changes which restored the import orders. Should be there now... |
elek
commented
Mar 30, 2021
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: