[ 
https://issues.apache.org/jira/browse/HDFS-16499?focusedWorklogId=741440&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-741440
 ]

ASF GitHub Bot logged work on HDFS-16499:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 15/Mar/22 05:24
            Start Date: 15/Mar/22 05:24
    Worklog Time Spent: 10m 
      Work Description: tomscut commented on a change in pull request #4058:
URL: https://github.com/apache/hadoop/pull/4058#discussion_r826591511



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/sps/TestExternalStoragePolicySatisfier.java
##########
@@ -428,6 +445,31 @@ public void testWhenStoragePolicySetToCOLD()
     }
   }
 
+  @Test(timeout = 300000)
+  public void testInfiniteStartWhenAnotherSPSRunning()
+      throws Exception {
+
+    try {
+      // Create cluster and create mover path when get NameNodeConnector.
+      createCluster(true);
+
+      // Disable system exit for assert.
+      ExitUtil.disableSystemExit();
+
+      // Get NameNodeConnector one more time to simulate starting other sps 
process.
+      // It should exit immediately when another sps is running.
+      LambdaTestUtils.intercept(ExitUtil.ExitException.class,
+          "Exit immediately because another ExternalStoragePolicySatisfier is 
running",
+          () -> ExternalStoragePolicySatisfier.getNameNodeConnector(config));
+
+      // Reset first exit exception to avoid AssertionError in 
MiniDFSCluster#shutdown.
+      // This has no effect on functionality.

Review comment:
       > How about doing this reset in finally?
   
   Thanks @umamaheswararao for your comments. I fixed it.




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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 741440)
    Time Spent: 1h 20m  (was: 1h 10m)

> [SPS]: Should not start indefinitely while another SPS process is running
> -------------------------------------------------------------------------
>
>                 Key: HDFS-16499
>                 URL: https://issues.apache.org/jira/browse/HDFS-16499
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: tomscut
>            Assignee: tomscut
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Normally, we can only start one SPS process at a time. When one process is 
> running, start another process and retry indefinitely. I think, in this case, 
> we should exit immediately.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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

Reply via email to