Skip to content
Permalink
Browse files
[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 <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>
  • Loading branch information
mhubail committed Mar 9, 2021
1 parent eb3cf8a commit 8f4d70f71204e79d4521df93853d328786e71cd8
Showing 1 changed file with 2 additions and 2 deletions.
@@ -211,7 +211,7 @@ private void endReplication(ISocketChannel socketChannel) {
}
}

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 void run() {
}
} catch (AsynchronousCloseException e) {
LOGGER.debug(() -> "Stopped listening on socket:" + dest, e);
} catch (IOException e) {
} catch (Exception e) {
handleFailure(replicaSocket, e);
}
}

0 comments on commit 8f4d70f

Please sign in to comment.