HDFS-13799. TestEditLogTailer#testTriggersLogRollsForAllStandbyNN fails due to
missing synchronization
between rollEditsRpcExecutor and tailerThread shutdown. Contributed
by Hrishikesh Gadre.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/75406990
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/75406990
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/75406990
Branch: refs/heads/branch-3.1
Commit: 754069906bda1d961bce9f584d0457ee10db6762
Parents: e4b75ad
Author: Xiao Chen <[email protected]>
Authored: Tue Aug 7 16:11:37 2018 -0700
Committer: Arpit Agarwal <[email protected]>
Committed: Mon Aug 20 14:51:07 2018 -0700
----------------------------------------------------------------------
.../org/apache/hadoop/hdfs/server/namenode/ha/EditLogTailer.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/75406990/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/EditLogTailer.java
----------------------------------------------------------------------
diff --git
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/EditLogTailer.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/EditLogTailer.java
index 2003f94..b306b8d 100644
---
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/EditLogTailer.java
+++
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/EditLogTailer.java
@@ -234,7 +234,6 @@ public class EditLogTailer {
}
public void stop() throws IOException {
- rollEditsRpcExecutor.shutdown();
tailerThread.setShouldRun(false);
tailerThread.interrupt();
try {
@@ -242,6 +241,8 @@ public class EditLogTailer {
} catch (InterruptedException e) {
LOG.warn("Edit log tailer thread exited with an exception");
throw new IOException(e);
+ } finally {
+ rollEditsRpcExecutor.shutdown();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]