Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-9032

Serializer is invoked with null when foreignValue=null

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 2.4.0
    • 2.4.0
    • streams
    • None
    • MacOS X, Kafka Streams branch 1678a54.

    Description

      I'm using the Ktable's foreign key join (ref: KIP-213).  When I try to leftJoin two KTables, and the left side's foreignKey does not have a key match in the right (other) KTable, the Join operation invokes the serializer with a foreignValue=null.  This then causes a NullPointerException in the provided (my) serializer.

      Stack Trace is attached.  Notes:

      In method RecordCollectorImpl#send() (around line 97), inspecting 'value' shows:
      
      SubscriptionResponseWrapper{version=0, foreignValue=null, originalValueHash=[-5192323959200117799, -2503872568163857643]} 

      This foreignValue is passed to Serializer.java#serialize() as 'data'.  Ultimately, it ends up in SubscriptionResponseWrapperSerde#serialize (#72) where 'serliazedData` is null.  This is what is passed to my serializer.

      This exception is readily reproducible; just set up the left message-value to include a foreign key value that does not exist on the right side (the 'other' table).

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            vvcephei John Roesler
            gyammine ghassan Yammine
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment