cameronlee314 commented on a change in pull request #1426:
URL: https://github.com/apache/samza/pull/1426#discussion_r482358915



##########
File path: 
samza-core/src/main/java/org/apache/samza/serializers/IntermediateMessageSerde.java
##########
@@ -83,21 +83,17 @@ public Object fromBytes(byte[] bytes) {
           throw new UnsupportedOperationException(String.format("Message type 
%s is not supported", type.name()));
       }
       return object;
-
     } catch (UnsupportedOperationException ue) {
       throw new SamzaException(ue);
     } catch (Exception e) {
       // This will catch the following exceptions:
       // 1) the first byte is not a valid type so it will cause 
ArrayOutOfBound exception
       // 2) the first byte happens to be a valid type, but the deserialization 
fails with certain exception
-      // For these cases, we fall back to user-provided serde
-      try {
-        return userMessageSerde.fromBytes(bytes);
-      } catch (Exception umse) {
-        LOGGER.error("Error deserializing from both intermediate message serde 
and user message serde. "
-            + "Original exception: ", e);
-        throw umse;
-      }
+      // For these cases, we WILL NOT fall back to user-provided serde. Thus, 
we are not compatible with upgrade
+      // directly from samza version older than 0.13.1.
+      LOGGER.error("Error deserializing with intermediate message serde. If 
you are upgrading from samza version older"
+          + " than 0.13.1, please upgrade to samza 1.5 first.");

Review comment:
       If a user upgraded to 0.13.1+ some time ago, they could theoretically 
run into an error if they just still happened to have some intermediate 
messages from before 0.13.1 in their topic (e.g. they have really long 
retention) and they got processed for some reason. So maybe you can generalize 
the log message a little bit more to also cover the case if there are still 
messages from before 0.13.1 in their stream.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to