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 62edc69eb RATIS-1691. Potential deadlock in server shutdown (#729)
62edc69eb is described below
commit 62edc69ebc46d7ac2871fb815c2f86ab4c3e933f
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Sat Aug 27 09:27:55 2022 +0200
RATIS-1691. Potential deadlock in server shutdown (#729)
---
.../java/org/apache/ratis/server/impl/RaftServerProxy.java | 12 ++++++------
1 file changed, 6 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 ad488f53b..0825e7d12 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,14 +415,14 @@ class RaftServerProxy implements RaftServer {
} catch (IOException ignored) {
LOG.warn(getId() + ": Failed to close " +
SupportedDataStreamType.NETTY + " server", ignored);
}
+
+ try {
+ ConcurrentUtils.shutdownAndWait(executor);
+ } catch (Exception ignored) {
+ LOG.warn(getId() + ": Failed to shutdown executor", ignored);
+ }
});
pauseMonitor.stop();
-
- try {
- ConcurrentUtils.shutdownAndWait(executor);
- } catch (Exception ignored) {
- LOG.warn(getId() + ": Failed to shutdown executor", ignored);
- }
}
@Override