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/ratis.git
The following commit(s) were added to refs/heads/master by this push:
new ccbe9a62e RATIS-2194. FileLock didn't unlock properly (#1183)
ccbe9a62e is described below
commit ccbe9a62ebd7eec51cd4c8b4b4a0d81c673529c6
Author: Chung En Lee <[email protected]>
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 e5e74e991..6b41c8c2a 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
@@ -416,6 +416,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 {
@@ -430,12 +437,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) {