bharatviswa504 commented on a change in 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.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]