HDFS-13799. TestEditLogTailer#testTriggersLogRollsForAllStandbyNN fails due to missing synchronization

between rollEditsRpcExecutor and tailerThread shutdown. Contributed by Hrishikesh Gadre.
This commit is contained in:
Xiao Chen 2018-08-07 16:11:37 -07:00
parent d838179d8d
commit 0f8cb127cd

View File

@ -234,7 +234,6 @@ public void start() {
} }
public void stop() throws IOException { public void stop() throws IOException {
rollEditsRpcExecutor.shutdown();
tailerThread.setShouldRun(false); tailerThread.setShouldRun(false);
tailerThread.interrupt(); tailerThread.interrupt();
try { try {
@ -242,6 +241,8 @@ public void stop() throws IOException {
} catch (InterruptedException e) { } catch (InterruptedException e) {
LOG.warn("Edit log tailer thread exited with an exception"); LOG.warn("Edit log tailer thread exited with an exception");
throw new IOException(e); throw new IOException(e);
} finally {
rollEditsRpcExecutor.shutdown();
} }
} }