You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by sz...@apache.org on 2022/04/28 14:58:32 UTC
[ozone] branch master updated: HDDS-6658. BackgroundPipelineCreator does not always stop quickly (#3357)
This is an automated email from the ASF dual-hosted git repository.
szetszwo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new c251258832 HDDS-6658. BackgroundPipelineCreator does not always stop quickly (#3357)
c251258832 is described below
commit c2512588322677afcb0118c9ccb0057f01b877b3
Author: Stephen O'Donnell <st...@gmail.com>
AuthorDate: Thu Apr 28 15:58:25 2022 +0100
HDDS-6658. BackgroundPipelineCreator does not always stop quickly (#3357)
---
.../apache/hadoop/hdds/scm/pipeline/BackgroundPipelineCreator.java | 5 ++---
.../apache/hadoop/hdds/scm/pipeline/BackgroundPipelineScrubber.java | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/BackgroundPipelineCreator.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/BackgroundPipelineCreator.java
index c9eb68346f..006453fad3 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/BackgroundPipelineCreator.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/BackgroundPipelineCreator.java
@@ -148,9 +148,7 @@ public class BackgroundPipelineCreator implements SCMService {
LOG.info("Stopping {}.", THREAD_NAME);
// in case RatisPipelineUtilsThread is sleeping
- synchronized (monitor) {
- monitor.notifyAll();
- }
+ thread.interrupt();
try {
thread.join();
@@ -175,6 +173,7 @@ public class BackgroundPipelineCreator implements SCMService {
}
} catch (InterruptedException e) {
LOG.warn("{} is interrupted.", THREAD_NAME);
+ running.set(false);
Thread.currentThread().interrupt();
}
}
diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/BackgroundPipelineScrubber.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/BackgroundPipelineScrubber.java
index be465f6321..29fbd00d7c 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/BackgroundPipelineScrubber.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/BackgroundPipelineScrubber.java
@@ -136,7 +136,7 @@ public class BackgroundPipelineScrubber implements SCMService {
LOG.info("Pipeline Scrubber Service is not running, skip stop.");
return;
}
- notifyAll();
+ scrubThread.interrupt();
}
LOG.info("Stopping Pipeline Scrubber Service.");
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org