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

Kafka Streams restoration crashes with NPE when the record value is null

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.3.0
    • Component/s: streams
    • Labels:
      None

      Description

      To add more context here:

      a NPE will be triggered in RecordConverters#ByteBuffer.allocate(8 + rawValue.length) if the raw value with record is null. A scenario you could reproduce is like:

      1. Having a source KTable (timestampedKeyValueStore) reads in tombstone records where the value field is null. Note that you need to turn off stream level cache, otherwise the null value will not be forwarded.
      2. Shutdown the application, and clear local state stores.
      3. Restart the application before changelog topic starts compaction. If we are "lucky", the tombstone record will trigger null pointer exception during restoration when we try to extract raw value length.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bchen225242 Boyang Chen
                Reporter:
                bchen225242 Boyang Chen
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: