Uploaded image for project: 'Samza'
  1. Samza
  2. SAMZA-2587

IntermediateMessageSerde exception handling

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: In Progress
    • Major
    • Resolution: Unresolved
    • None
    • 1.6
    • None
    • None

    Description

      In IntermediateMessageSerde, we expect the first byte of payload to be the type of message (message|watermark|EOS). The serde will read the first byte, then use the corresponding serde to deserialize the rest of bytes. For compatibility reason, if any exception happens, the serde will try to deserialize all bytes again.

      This caused an issue. In the case when userMessageSerde failed to deserialize the message with all bytes except for the first byte, it still tried to use userMessageSerde to deserialize the message with all bytes. Of course it failed again. But the container died with OOM instead of exception of the deserialization. The reason is that the size of an array was encoded in the bytes. In the second time, the serde was trying to construct a huge array which caused OOM without throwing the root exception, which was causing it super hard to debug.

      We should remove the second deserialization to make the code more clear.

      Attachments

        Activity

          People

            YixingZhang Yixing Zhang
            YixingZhang Yixing Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h 10m
                2h 10m