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

InsertField transformation fails when encountering tombstone event

Agile BoardAttach filesAttach ScreenshotVotersStop watchingWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      When applying the InsertField transformation to a tombstone event, an exception is raised:

      org.apache.kafka.connect.errors.DataException: Only Map objects supported in absence of schema for [field insertion], found: null
      	at org.apache.kafka.connect.transforms.util.Requirements.requireMap(Requirements.java:38)
      	at org.apache.kafka.connect.transforms.InsertField.applySchemaless(InsertField.java:138)
      	at org.apache.kafka.connect.transforms.InsertField.apply(InsertField.java:131)
      	at org.apache.kafka.connect.transforms.InsertFieldTest.tombstone(InsertFieldTest.java:128)
      

      AFAICS, the transform can still be made working in in this case by simply building up a new value map from scratch.

      Update as per the discussion in the comments: tombstones should be left as-is by this SMT, as any insertion would defeat their purpose of enabling log compaction.

      Attachments

        Issue Links

        Activity

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

          People

            Unassigned Unassigned
            gunnar.morling Gunnar Morling
            Randall Hauch Randall Hauch
            Votes:
            2 Vote for this issue
            Watchers:
            6 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment