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

ASF GitHub Bot logged work on HDDS-1389:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 04/Apr/19 22:56
            Start Date: 04/Apr/19 22:56
    Worklog Time Spent: 10m 
      Work Description: bharatviswa504 commented on pull request #696: 
HDDS-1389. Fix testSCMChillModeRestrictedOp.
URL: https://github.com/apache/hadoop/pull/696#discussion_r272396982
 
 

 ##########
 File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/chillmode/ChillModeHandler.java
 ##########
 @@ -88,16 +88,25 @@ public ChillModeHandler(Configuration configuration,
   @Override
   public void onMessage(ChillModeStatus chillModeStatus,
       EventPublisher publisher) {
-    try {
-      isInChillMode.set(chillModeStatus.getChillModeStatus());
-      scmClientProtocolServer.setChillModeStatus(isInChillMode.get());
-      scmBlockManager.setChillModeStatus(isInChillMode.get());
-      Thread.sleep(waitTime);
-    } catch (InterruptedException e) {
-      Thread.currentThread().interrupt();
-    } finally {
-      replicationManager.start();
+
+    isInChillMode.set(chillModeStatus.getChillModeStatus());
+    scmClientProtocolServer.setChillModeStatus(isInChillMode.get());
+    scmBlockManager.setChillModeStatus(isInChillMode.get());
+
+    if (!isInChillMode.get()) {
+      final Thread chillModeExitThread = new Thread(() -> {
+        try {
+          Thread.sleep(waitTime);
+        } catch (InterruptedException e) {
 
 Review comment:
   Had offline discussion we shall make this daemon thread.
   Adding here to not to miss 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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 223341)
    Time Spent: 40m  (was: 0.5h)

> Fix testSCMChillModeRestrictedOp
> --------------------------------
>
>                 Key: HDDS-1389
>                 URL: https://issues.apache.org/jira/browse/HDDS-1389
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>            Reporter: Bharat Viswanadham
>            Assignee: Nanda kumar
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> This test failure is caused by HDDS-1207, as we use the same ChillModeHandler 
> thread for waitTime sleep. Because of that, this is causing a test failure.
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to