Repository: asterixdb
Updated Branches:
  refs/heads/master 2660c6307 -> b9d55c40e


[NO ISSUE][NET] Avoid Sleeping The Network Thread on Failures

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- We currently sleep the networking thread incrementally with
  every failure. This sleep was added to avoid CPU spinning
  back when failures on pending networking operations were not
  handled properly which led to processing the same networking
  message that caused the failure over and over. This sleep is
  not needed anymore since every failed read/write/send/connect
  network operations will not be attempted again.

Change-Id: I9f7ddc088868f8cf4d0a15ec5349021af8ccae36
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2978
Integration-Tests: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Sonar-Qube: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mb...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/c636cbf9
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/c636cbf9
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/c636cbf9

Branch: refs/heads/master
Commit: c636cbf90ba7aff350c36645354b74524217dce5
Parents: bd728af
Author: Murtadha Hubail <mhub...@apache.org>
Authored: Wed Sep 26 01:04:54 2018 +0300
Committer: Murtadha Hubail <mhub...@apache.org>
Committed: Wed Sep 26 08:59:03 2018 -0700

----------------------------------------------------------------------
 .../apache/hyracks/ipc/impl/IPCConnectionManager.java    | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c636cbf9/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/impl/IPCConnectionManager.java
----------------------------------------------------------------------
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 53ada46..9ef506e 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
@@ -185,7 +185,6 @@ public class IPCConnectionManager {
         }
 
         private void doRun() {
-            int failingLoops = 0;
             while (!stopped) {
                 try {
                     int n = selector.select();
@@ -199,16 +198,8 @@ public class IPCConnectionManager {
                     if (n > 0) {
                         processSelectedKeys();
                     }
-                    // reset failingLoops on a good loop
-                    failingLoops = 0;
                 } catch (Exception e) {
-                    int sleepSecs = (int) Math.pow(2, Math.min(11, 
failingLoops++));
-                    LOGGER.log(Level.ERROR, "Exception processing message; 
sleeping " + sleepSecs + " seconds", e);
-                    try {
-                        Thread.sleep(TimeUnit.SECONDS.toMillis(sleepSecs));
-                    } catch (InterruptedException e1) {
-                        Thread.currentThread().interrupt();
-                    }
+                    LOGGER.log(Level.ERROR, "Exception processing message", e);
                 }
             }
         }

Reply via email to