rzo1 commented on code in PR #9159:
URL: https://github.com/apache/storm/pull/9159#discussion_r4251367339


##########
storm-client/src/jvm/org/apache/storm/messaging/netty/StormServerHandler.java:
##########
@@ -59,12 +61,20 @@ public void exceptionCaught(ChannelHandlerContext ctx, 
Throwable cause) {
             // Doing nothing (probably due to an oom issue) and hoping 
Utils.handleUncaughtException will handle it
         }
         try {
-            Utils.handleUncaughtException(cause, ALLOWED_EXCEPTIONS, false);
+            Utils.handleUncaughtException(cause, allowedExceptions(cause), 
false);
             ctx.close();
         } catch (Error error) {
             LOG.info("Received error in netty thread.. terminating server...");

Review Comment:
   Done in a1ad9fda6.



##########
storm-client/src/jvm/org/apache/storm/messaging/netty/StormServerHandler.java:
##########
@@ -59,12 +61,20 @@ public void exceptionCaught(ChannelHandlerContext ctx, 
Throwable cause) {
             // Doing nothing (probably due to an oom issue) and hoping 
Utils.handleUncaughtException will handle it
         }
         try {
-            Utils.handleUncaughtException(cause, ALLOWED_EXCEPTIONS, false);
+            Utils.handleUncaughtException(cause, allowedExceptions(cause), 
false);
             ctx.close();
         } catch (Error error) {
             LOG.info("Received error in netty thread.. terminating server...");
             Runtime.getRuntime().exit(1);
         }
 
     }
+
+    // A strict-mode deserialization failure must terminate the worker even if 
it wraps an IOException.
+    static Set<Class<?>> allowedExceptions(Throwable cause) {

Review Comment:
   Done in a1ad9fda6.



##########
storm-client/test/jvm/org/apache/storm/messaging/netty/StormServerHandlerTest.java:
##########
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The 
ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with 
the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+package org.apache.storm.messaging.netty;
+
+import java.io.IOException;
+import org.apache.storm.messaging.FatalDeserializationException;
+import org.apache.storm.utils.Utils;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+public class StormServerHandlerTest {
+
+    @Test
+    public void testIoExceptionIsSwallowed() {

Review Comment:
   Done in a1ad9fda6.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to