This is an automated email from the ASF dual-hosted git repository. szetszwo pushed a commit to branch release-3.1.3_review in repository https://gitbox.apache.org/repos/asf/ratis.git
commit 268bd3c49e046ccae88267d07834b160a96db315 Author: Chung En Lee <wfps1...@gmail.com> AuthorDate: Wed Nov 27 07:45:18 2024 +0800 RATIS-2194. FileLock didn't unlock properly (#1183) --- .../java/org/apache/ratis/server/impl/RaftServerProxy.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerProxy.java b/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerProxy.java index 84221cfcf..242bb377b 100644 --- a/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerProxy.java +++ b/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerProxy.java @@ -415,6 +415,13 @@ class RaftServerProxy implements RaftServer { public void close() { lifeCycle.checkStateAndClose(() -> { LOG.info("{}: close", getId()); + + try { + ConcurrentUtils.shutdownAndWait(implExecutor.get()); + } catch (Exception ignored) { + LOG.warn(getId() + ": Failed to shutdown implExecutor", ignored); + } + impls.close(); try { @@ -429,12 +436,6 @@ class RaftServerProxy implements RaftServer { LOG.warn(getId() + ": Failed to close " + SupportedDataStreamType.NETTY + " server", ignored); } - try { - ConcurrentUtils.shutdownAndWait(implExecutor.get()); - } catch (Exception ignored) { - LOG.warn(getId() + ": Failed to shutdown implExecutor", ignored); - } - try { ConcurrentUtils.shutdownAndWait(executor.get()); } catch (Exception ignored) {