You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mb...@apache.org on 2021/03/26 11:10:44 UTC
[asterixdb] 01/09: [NO ISSUE][REP] Catch all exception leading to a
replica failure
This is an automated email from the ASF dual-hosted git repository.
mblow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git
commit 8f4d70f71204e79d4521df93853d328786e71cd8
Author: Murtadha Hubail <mh...@apache.org>
AuthorDate: Mon Mar 8 19:29:00 2021 +0300
[NO ISSUE][REP] Catch all exception leading to a replica failure
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
- Catch all exceptions and not only IO exceptions to avoid
uncaught exceptions leading to a node shutdown.
Change-Id: Ibe2286caca247f0070ae399f71a400cd223417b3
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/10423
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <ti...@apache.org>
---
.../apache/asterix/replication/management/LogReplicationManager.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/asterixdb/asterix-replication/src/main/java/org/apache/asterix/replication/management/LogReplicationManager.java b/asterixdb/asterix-replication/src/main/java/org/apache/asterix/replication/management/LogReplicationManager.java
index be372df..6a23ae6 100644
--- a/asterixdb/asterix-replication/src/main/java/org/apache/asterix/replication/management/LogReplicationManager.java
+++ b/asterixdb/asterix-replication/src/main/java/org/apache/asterix/replication/management/LogReplicationManager.java
@@ -211,7 +211,7 @@ public class LogReplicationManager {
}
}
- private synchronized void handleFailure(ISocketChannel replicaSocket, IOException e) {
+ private synchronized void handleFailure(ISocketChannel replicaSocket, Exception e) {
if (failedSockets.contains(replicaSocket)) {
return;
}
@@ -249,7 +249,7 @@ public class LogReplicationManager {
}
} catch (AsynchronousCloseException e) {
LOGGER.debug(() -> "Stopped listening on socket:" + dest, e);
- } catch (IOException e) {
+ } catch (Exception e) {
handleFailure(replicaSocket, e);
}
}