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



##########
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:
       Just to clarify: Is the idea that this PR will go into Samza 1.6? So 
upgrading to samza 1.5 first will convert all intermediate messages into the 
new format, which means going to 1.6 after that will then be compatible?
   Maybe consider adding a comment to the code about why upgrading to Samza 1.5 
will help.




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


Reply via email to