You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mh...@apache.org on 2019/02/03 10:00:31 UTC

[asterixdb] 01/03: [NO ISSUE][NET] Catch All Network Unexpected Exceptions

This is an automated email from the ASF dual-hosted git repository.

mhubail pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git

commit 83f2efa367c20bc0a2bb406859fce2a8a24b9872
Author: Murtadha Hubail <mh...@apache.org>
AuthorDate: Fri Jan 25 00:18:58 2019 +0300

    [NO ISSUE][NET] Catch All Network Unexpected Exceptions
    
    - user model changes: no
    - storage format changes: no
    - interface changes: no
    
    Details:
    - Any case of any unexpected exception during
      IPC network operations, close the connection
      to allow it to be reestablished.
    
    Change-Id: I57db83faa1d1ecbc4702ca06e64e21fedb186313
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/3132
    Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Reviewed-by: Michael Blow <mb...@apache.org>
---
 .../java/org/apache/hyracks/ipc/impl/IPCConnectionManager.java | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/impl/IPCConnectionManager.java b/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/impl/IPCConnectionManager.java
index 9ef506e..b4828e9 100644
--- a/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/impl/IPCConnectionManager.java
+++ b/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/impl/IPCConnectionManager.java
@@ -232,7 +232,7 @@ public class IPCConnectionManager {
                     connectableKey.interestOps(SelectionKey.OP_READ);
                     connectionEstablished(handle);
                 }
-            } catch (IOException e) {
+            } catch (Exception e) {
                 LOGGER.warn("Exception finishing connect", e);
             } finally {
                 if (!connected) {
@@ -253,7 +253,7 @@ public class IPCConnectionManager {
                 handle.setKey(channelKey);
                 channelKey.attach(handle);
                 handle.setState(HandleState.CONNECT_RECEIVED);
-            } catch (IOException e) {
+            } catch (Exception e) {
                 LOGGER.error("Failed to accept channel ", e);
                 close(channelKey, channel);
             }
@@ -274,7 +274,7 @@ public class IPCConnectionManager {
                     }
                     handle.setKey(channelKey);
                     channelKey.attach(handle);
-                } catch (IOException e) {
+                } catch (Exception e) {
                     LOGGER.error("Failed to accept channel ", e);
                     close(channelKey, channel);
                     handle.setState(HandleState.CLOSED);
@@ -377,7 +377,7 @@ public class IPCConnectionManager {
                 if (!readBuffer.hasRemaining()) {
                     handle.resizeInBuffer();
                 }
-            } catch (IOException e) {
+            } catch (Exception e) {
                 LOGGER.error("TCP read error from {}", handle.getRemoteAddress(), e);
                 close(readableKey, channel);
             }
@@ -401,7 +401,7 @@ public class IPCConnectionManager {
                     handle.clearFull();
                     selector.wakeup();
                 }
-            } catch (IOException e) {
+            } catch (Exception e) {
                 LOGGER.error("TCP write error to {}", handle.getRemoteAddress(), e);
                 close(writableKey, channel);
             }