You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/10/18 22:53:04 UTC

[GitHub] [ozone] aswinshakil opened a new pull request #2745: HDDS-5843. SCM terminates when adding container to a pipeline during startup

aswinshakil opened a new pull request #2745:
URL: https://github.com/apache/ozone/pull/2745


   ## What changes were proposed in this pull request?
   
   SCM terminates when a container in an OPEN state is added to a CLOSED pipeline during SCM startup.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-5843
   
   ## How was this patch tested?
   
   This patch was tested using CI tests.
   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] bharatviswa504 commented on a change in pull request #2745: HDDS-5843. SCM terminates when adding container to a pipeline during startup

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #2745:
URL: https://github.com/apache/ozone/pull/2745#discussion_r731411211



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateManagerImpl.java
##########
@@ -117,6 +117,18 @@ public void addContainerToPipeline(
     }
   }
 
+  @Override
+  public void addContainerToPipelineSCMStart(
+          PipelineID pipelineId, ContainerID containerID)
+          throws IOException {
+    lock.writeLock().lock();

Review comment:
       In PipelineManagerImpl we donot acquire lock, but here we do. Any reason?




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] bharatviswa504 commented on a change in pull request #2745: HDDS-5843. SCM terminates when adding container to a pipeline during startup

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #2745:
URL: https://github.com/apache/ozone/pull/2745#discussion_r731411027



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineManager.java
##########
@@ -68,6 +68,9 @@ Pipeline createPipeline(
   void addContainerToPipeline(PipelineID pipelineID, ContainerID containerID)
       throws IOException;
 
+  void addContainerToPipelineSCMStart(PipelineID pipelineID,

Review comment:
       Add JavaDoc for all the newly added methods




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] bharatviswa504 merged pull request #2745: HDDS-5843. SCM terminates when adding container to a pipeline during startup

Posted by GitBox <gi...@apache.org>.
bharatviswa504 merged pull request #2745:
URL: https://github.com/apache/ozone/pull/2745


   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] bharatviswa504 commented on a change in pull request #2745: HDDS-5843. SCM terminates when adding container to a pipeline during startup

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #2745:
URL: https://github.com/apache/ozone/pull/2745#discussion_r734105152



##########
File path: hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/pipeline/TestPipelineManagerImpl.java
##########
@@ -624,6 +626,30 @@ public void testSafeModeUpdatedOnSafemodeExit() throws Exception {
     pipelineManager.close();
   }
 
+  @Test
+  public void testAddContainerWithClosedPipeline() throws Exception {
+    GenericTestUtils.LogCapturer logCapturer = GenericTestUtils.LogCapturer.
+            captureLogs(LoggerFactory.getLogger(PipelineStateMap.class));
+    SCMHADBTransactionBuffer buffer = new MockSCMHADBTransactionBuffer(dbStore);
+    PipelineManagerImpl pipelineManager =
+            createPipelineManager(true, buffer);
+    Table<PipelineID, Pipeline> pipelineStore =
+            SCMDBDefinition.PIPELINES.getTable(dbStore);
+    Pipeline pipeline = pipelineManager.createPipeline(
+            new RatisReplicationConfig(HddsProtos.ReplicationFactor.THREE));
+    PipelineID pipelineID = pipeline.getId();
+    pipelineManager.addContainerToPipeline(pipelineID, ContainerID.valueOf(1));

Review comment:
       I am fine with this, but it would be nice to have repro..




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] bharatviswa504 commented on a change in pull request #2745: HDDS-5843. SCM terminates when adding container to a pipeline during startup

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #2745:
URL: https://github.com/apache/ozone/pull/2745#discussion_r731411211



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateManagerImpl.java
##########
@@ -117,6 +117,18 @@ public void addContainerToPipeline(
     }
   }
 
+  @Override
+  public void addContainerToPipelineSCMStart(
+          PipelineID pipelineId, ContainerID containerID)
+          throws IOException {
+    lock.writeLock().lock();

Review comment:
       In PipelineManagerImpl we donot acquire lock, but here we do. Any reason?
   // should not lock here, since no ratis operation happens.
   Should nt be the same, as these methods are called only during initialize.




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] bharatviswa504 commented on pull request #2745: HDDS-5843. SCM terminates when adding container to a pipeline during startup

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on pull request #2745:
URL: https://github.com/apache/ozone/pull/2745#issuecomment-949293853


   TestSCMInstallSnapshotWithHA failed looks unrelated to this PR, I have seen same test failure in another PR run, seems to be flaky. 


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] aswinshakil commented on a change in pull request #2745: HDDS-5843. SCM terminates when adding container to a pipeline during startup

Posted by GitBox <gi...@apache.org>.
aswinshakil commented on a change in pull request #2745:
URL: https://github.com/apache/ozone/pull/2745#discussion_r734107935



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateMap.java
##########
@@ -104,6 +104,33 @@ void addContainerToPipeline(PipelineID pipelineID, ContainerID containerID)
     pipeline2container.get(pipelineID).add(containerID);
   }
 
+  /**
+   * Add container to an existing pipeline during SCM Start.
+   *
+   * @param pipelineID - PipelineID of the pipeline to which container is added
+   * @param containerID - ContainerID of the container to add
+   */
+  void addContainerToPipelineSCMStart(PipelineID pipelineID,
+      ContainerID containerID) throws IOException {
+    Preconditions.checkNotNull(pipelineID,
+            "Pipeline Id cannot be null");
+    Preconditions.checkNotNull(containerID,
+            "Container Id cannot be null");
+
+    Pipeline pipeline = getPipeline(pipelineID);
+    if (pipeline.isClosed()) {
+      /*
+      When SCM restarts it can be an inconsistent state where some

Review comment:
       I will update them




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] aswinshakil commented on a change in pull request #2745: HDDS-5843. SCM terminates when adding container to a pipeline during startup

Posted by GitBox <gi...@apache.org>.
aswinshakil commented on a change in pull request #2745:
URL: https://github.com/apache/ozone/pull/2745#discussion_r731440421



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateMap.java
##########
@@ -104,6 +104,27 @@ void addContainerToPipeline(PipelineID pipelineID, ContainerID containerID)
     pipeline2container.get(pipelineID).add(containerID);
   }
 
+  /**
+   * Add container to an existing pipeline during SCM Start.
+   *
+   * @param pipelineID - PipelineID of the pipeline to which container is added
+   * @param containerID - ContainerID of the container to add
+   */
+  void addContainerToPipelineSCMStart(PipelineID pipelineID,
+      ContainerID containerID) throws IOException {
+    Preconditions.checkNotNull(pipelineID,
+            "Pipeline Id cannot be null");
+    Preconditions.checkNotNull(containerID,
+            "Container Id cannot be null");
+
+    Pipeline pipeline = getPipeline(pipelineID);
+    if (pipeline.isClosed()) {

Review comment:
       Sure, will add that!




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] bharatviswa504 commented on a change in pull request #2745: HDDS-5843. SCM terminates when adding container to a pipeline during startup

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #2745:
URL: https://github.com/apache/ozone/pull/2745#discussion_r733334785



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateMap.java
##########
@@ -104,6 +104,33 @@ void addContainerToPipeline(PipelineID pipelineID, ContainerID containerID)
     pipeline2container.get(pipelineID).add(containerID);
   }
 
+  /**
+   * Add container to an existing pipeline during SCM Start.
+   *
+   * @param pipelineID - PipelineID of the pipeline to which container is added
+   * @param containerID - ContainerID of the container to add
+   */
+  void addContainerToPipelineSCMStart(PipelineID pipelineID,
+      ContainerID containerID) throws IOException {
+    Preconditions.checkNotNull(pipelineID,
+            "Pipeline Id cannot be null");
+    Preconditions.checkNotNull(containerID,
+            "Container Id cannot be null");
+
+    Pipeline pipeline = getPipeline(pipelineID);
+    if (pipeline.isClosed()) {
+      /*
+      When SCM restarts it can be an inconsistent state where some

Review comment:
       Inconsistent -> SCM DB may not be up to date would be better wording




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] aswinshakil commented on a change in pull request #2745: HDDS-5843. SCM terminates when adding container to a pipeline during startup

Posted by GitBox <gi...@apache.org>.
aswinshakil commented on a change in pull request #2745:
URL: https://github.com/apache/ozone/pull/2745#discussion_r734101228



##########
File path: hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/pipeline/TestPipelineManagerImpl.java
##########
@@ -624,6 +626,30 @@ public void testSafeModeUpdatedOnSafemodeExit() throws Exception {
     pipelineManager.close();
   }
 
+  @Test
+  public void testAddContainerWithClosedPipeline() throws Exception {
+    GenericTestUtils.LogCapturer logCapturer = GenericTestUtils.LogCapturer.
+            captureLogs(LoggerFactory.getLogger(PipelineStateMap.class));
+    SCMHADBTransactionBuffer buffer = new MockSCMHADBTransactionBuffer(dbStore);
+    PipelineManagerImpl pipelineManager =
+            createPipelineManager(true, buffer);
+    Table<PipelineID, Pipeline> pipelineStore =
+            SCMDBDefinition.PIPELINES.getTable(dbStore);
+    Pipeline pipeline = pipelineManager.createPipeline(
+            new RatisReplicationConfig(HddsProtos.ReplicationFactor.THREE));
+    PipelineID pipelineID = pipeline.getId();
+    pipelineManager.addContainerToPipeline(pipelineID, ContainerID.valueOf(1));

Review comment:
       I tried to bring the Data Nodes down and then tried to close the pipeline. The pipeline is moves to CLOSED state and the containers goes into CLOSING state and hence when the SCM restarts it doesn't add the container to pipeline.




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] bharatviswa504 commented on a change in pull request #2745: HDDS-5843. SCM terminates when adding container to a pipeline during startup

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #2745:
URL: https://github.com/apache/ozone/pull/2745#discussion_r731410844



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateMap.java
##########
@@ -104,6 +104,27 @@ void addContainerToPipeline(PipelineID pipelineID, ContainerID containerID)
     pipeline2container.get(pipelineID).add(containerID);
   }
 
+  /**
+   * Add container to an existing pipeline during SCM Start.
+   *
+   * @param pipelineID - PipelineID of the pipeline to which container is added
+   * @param containerID - ContainerID of the container to add
+   */
+  void addContainerToPipelineSCMStart(PipelineID pipelineID,
+      ContainerID containerID) throws IOException {
+    Preconditions.checkNotNull(pipelineID,
+            "Pipeline Id cannot be null");
+    Preconditions.checkNotNull(containerID,
+            "Container Id cannot be null");
+
+    Pipeline pipeline = getPipeline(pipelineID);
+    if (pipeline.isClosed()) {

Review comment:
       Can you add some explanation for this, why we are doing this for future reference




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] bharatviswa504 commented on a change in pull request #2745: HDDS-5843. SCM terminates when adding container to a pipeline during startup

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #2745:
URL: https://github.com/apache/ozone/pull/2745#discussion_r731410844



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateMap.java
##########
@@ -104,6 +104,27 @@ void addContainerToPipeline(PipelineID pipelineID, ContainerID containerID)
     pipeline2container.get(pipelineID).add(containerID);
   }
 
+  /**
+   * Add container to an existing pipeline during SCM Start.
+   *
+   * @param pipelineID - PipelineID of the pipeline to which container is added
+   * @param containerID - ContainerID of the container to add
+   */
+  void addContainerToPipelineSCMStart(PipelineID pipelineID,
+      ContainerID containerID) throws IOException {
+    Preconditions.checkNotNull(pipelineID,
+            "Pipeline Id cannot be null");
+    Preconditions.checkNotNull(containerID,
+            "Container Id cannot be null");
+
+    Pipeline pipeline = getPipeline(pipelineID);
+    if (pipeline.isClosed()) {

Review comment:
       Can you add some explanation for this.




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] aswinshakil commented on a change in pull request #2745: HDDS-5843. SCM terminates when adding container to a pipeline during startup

Posted by GitBox <gi...@apache.org>.
aswinshakil commented on a change in pull request #2745:
URL: https://github.com/apache/ozone/pull/2745#discussion_r731444241



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateManagerImpl.java
##########
@@ -117,6 +117,18 @@ public void addContainerToPipeline(
     }
   }
 
+  @Override
+  public void addContainerToPipelineSCMStart(
+          PipelineID pipelineId, ContainerID containerID)
+          throws IOException {
+    lock.writeLock().lock();

Review comment:
       This implementation is the same as addContainerToPipeline. I haven't modified the usage the of lock here. But should we remove the lock here? 




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] bharatviswa504 commented on a change in pull request #2745: HDDS-5843. SCM terminates when adding container to a pipeline during startup

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #2745:
URL: https://github.com/apache/ozone/pull/2745#discussion_r733335700



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateManagerImpl.java
##########
@@ -117,6 +117,18 @@ public void addContainerToPipeline(
     }
   }
 
+  @Override
+  public void addContainerToPipelineSCMStart(
+          PipelineID pipelineId, ContainerID containerID)
+          throws IOException {
+    lock.writeLock().lock();

Review comment:
       If there is no contention here , and it is only called serially and also if only during start Still do we need it??
   

##########
File path: hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/pipeline/TestPipelineManagerImpl.java
##########
@@ -624,6 +626,30 @@ public void testSafeModeUpdatedOnSafemodeExit() throws Exception {
     pipelineManager.close();
   }
 
+  @Test
+  public void testAddContainerWithClosedPipeline() throws Exception {
+    GenericTestUtils.LogCapturer logCapturer = GenericTestUtils.LogCapturer.
+            captureLogs(LoggerFactory.getLogger(PipelineStateMap.class));
+    SCMHADBTransactionBuffer buffer = new MockSCMHADBTransactionBuffer(dbStore);
+    PipelineManagerImpl pipelineManager =
+            createPipelineManager(true, buffer);
+    Table<PipelineID, Pipeline> pipelineStore =
+            SCMDBDefinition.PIPELINES.getTable(dbStore);
+    Pipeline pipeline = pipelineManager.createPipeline(
+            new RatisReplicationConfig(HddsProtos.ReplicationFactor.THREE));
+    PipelineID pipelineID = pipeline.getId();
+    pipelineManager.addContainerToPipeline(pipelineID, ContainerID.valueOf(1));

Review comment:
       Test does not test the scenario, but I see it tests newly added code.

##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateMap.java
##########
@@ -104,6 +104,33 @@ void addContainerToPipeline(PipelineID pipelineID, ContainerID containerID)
     pipeline2container.get(pipelineID).add(containerID);
   }
 
+  /**
+   * Add container to an existing pipeline during SCM Start.
+   *
+   * @param pipelineID - PipelineID of the pipeline to which container is added
+   * @param containerID - ContainerID of the container to add
+   */
+  void addContainerToPipelineSCMStart(PipelineID pipelineID,
+      ContainerID containerID) throws IOException {
+    Preconditions.checkNotNull(pipelineID,
+            "Pipeline Id cannot be null");
+    Preconditions.checkNotNull(containerID,
+            "Container Id cannot be null");
+
+    Pipeline pipeline = getPipeline(pipelineID);
+    if (pipeline.isClosed()) {
+      /*
+      When SCM restarts it can be an inconsistent state where some

Review comment:
       Inconsistent -> SCM DB may not be update to date would be better wording




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] aswinshakil commented on a change in pull request #2745: HDDS-5843. SCM terminates when adding container to a pipeline during startup

Posted by GitBox <gi...@apache.org>.
aswinshakil commented on a change in pull request #2745:
URL: https://github.com/apache/ozone/pull/2745#discussion_r731440301



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineManager.java
##########
@@ -68,6 +68,9 @@ Pipeline createPipeline(
   void addContainerToPipeline(PipelineID pipelineID, ContainerID containerID)
       throws IOException;
 
+  void addContainerToPipelineSCMStart(PipelineID pipelineID,

Review comment:
       I will add them.
   




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] aswinshakil commented on a change in pull request #2745: HDDS-5843. SCM terminates when adding container to a pipeline during startup

Posted by GitBox <gi...@apache.org>.
aswinshakil commented on a change in pull request #2745:
URL: https://github.com/apache/ozone/pull/2745#discussion_r734099451



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateManagerImpl.java
##########
@@ -117,6 +117,18 @@ public void addContainerToPipeline(
     }
   }
 
+  @Override
+  public void addContainerToPipelineSCMStart(
+          PipelineID pipelineId, ContainerID containerID)
+          throws IOException {
+    lock.writeLock().lock();

Review comment:
       If it is being called serially we won't need a lock here. Since it was previously in the addContainerToPipeline I kept it here. 




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] bharatviswa504 commented on pull request #2745: HDDS-5843. SCM terminates when adding container to a pipeline during startup

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on pull request #2745:
URL: https://github.com/apache/ozone/pull/2745#issuecomment-949294311


   Kicked off another CI run.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] bharatviswa504 commented on pull request #2745: HDDS-5843. SCM terminates when adding container to a pipeline during startup

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on pull request #2745:
URL: https://github.com/apache/ozone/pull/2745#issuecomment-951423083


   Thank You @aswinshakil for the fix


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org