aanchal204 commented on a change in pull request #118: Fix issues with channel 
re-connection
URL: https://github.com/apache/giraph/pull/118#discussion_r358374529
 
 

 ##########
 File path: 
giraph-core/src/main/java/org/apache/giraph/worker/BspServiceWorker.java
 ##########
 @@ -217,7 +217,16 @@ public BspServiceWorker(
         getGraphPartitionerFactory().createWorkerGraphPartitioner();
     workerInfo = new WorkerInfo();
     workerServer = new NettyWorkerServer<I, V, E>(conf, this, context,
-        graphTaskManager.createUncaughtExceptionHandler());
+        graphTaskManager.createUncaughtExceptionHandler(
+          (thread, throwable) -> {
+            // If the connection was closed by the client, then we just log
+            // the error, we do not fail the job, since the client will
+            // attempt to reconnect.
+            return throwable.getMessage().startsWith(
+              "Connection reset by peer") ? false : true;
 
 Review comment:
   Is there a better way to determine the exception type? If not, let's make 
this string as a constant and use everywhere, to avoid breaking this logic.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to