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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to