avijayanhwx commented on a change in pull request #1258:
URL: https://github.com/apache/hadoop-ozone/pull/1258#discussion_r462733996
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ContainerStateManager.java
##########
@@ -325,8 +325,12 @@ public void addContainerInfo(long containerID,
Pipeline pipeline) throws IOException {
Preconditions.checkNotNull(containerInfo);
containers.addContainer(containerInfo);
- pipelineManager.addContainerToPipeline(pipeline.getId(),
- ContainerID.valueof(containerID));
+ if (pipeline != null) {
Review comment:
@xiaoyuyao Good question. Although we get pipeline report for a new
pipeline through DN, it does not contain all the information that was used by
SCM to create the pipeline (Factor, other nodes). While implementing this, we
considered 2 ways to handle this, either through an elaborate pipeline creation
ACK command which Recon can pick up, or through Recon requesting SCM for a
confirmation whenever it sees a new pipeline. We went with the latter.
In general, any state change that "originates" in the SCM needs to be synced
with Recon. But anything that originates in the Datanode works automatically.
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ContainerStateManager.java
##########
@@ -325,8 +325,12 @@ public void addContainerInfo(long containerID,
Pipeline pipeline) throws IOException {
Preconditions.checkNotNull(containerInfo);
containers.addContainer(containerInfo);
- pipelineManager.addContainerToPipeline(pipeline.getId(),
- ContainerID.valueof(containerID));
+ if (pipeline != null) {
Review comment:
@xiaoyuyao Good question. Although we get pipeline report for a new
pipeline through DN, it does not contain all the information that was used by
SCM to create the pipeline (Factor, other nodes). While implementing this, we
considered 2 ways to handle this, either through an elaborate pipeline creation
ACK command which Recon can pick up, or through Recon requesting SCM for a
confirmation whenever it sees a new pipeline. We went with the latter.
In general, any state change that "originates" in the SCM needs to be synced
with Recon. But anything that originates in the Datanode works automatically.
Recon is like a "read-only" follower here. In the future, the plan is to have
Recon become a silent Ratis follower in the OM and SCM HA rings.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]