[ 
https://issues.apache.org/jira/browse/KAFKA-8523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16931662#comment-16931662
 ] 

Gunnar Morling edited comment on KAFKA-8523 at 9/17/19 5:08 PM:
----------------------------------------------------------------

Yes, I was arriving at pretty much the same conclusion; that said: is an option 
even needed: I've come to think that a tombstone should remain just that, a 
tombstone, i.e. I don't see a good reason to inject any value into a tombstone 
really; after all, it has specific semantics -- enabling compaction -- which 
shouldn't be altered. So I would suggest I simply update my PR so that it 
passes on tombstones unmodified and that should be good enought. WDYT?

Note, if we wanted to have an option, I think it would allow to pass on 
tombstones unmodified (as suggested above) OR to insert the new field, i.e. 
there wouldn't be an empty map really returned, but a map with a single entry 
for that new field (so what the current PR is doing). This could be done, but 
as argued it'd change the message's nature of being a tombstone, so it's 
probably not desirable?


was (Author: gunnar.morling):
Yes, I was arriving at pretty much the same conclusion; that said: is an option 
even needed: I've come to think that a tombstone should remain just that, a 
tombstone, i.e. I don't see a good reason to inject any value into a tombstone 
really; after all, it has specific semantics -- enabling compaction -- which 
shouldn't be altered. So I would suggest I simply update my PR so that it 
passes on tombstones unmodified and that should be good enought. WDYT?

> InsertField transformation fails when encountering tombstone event
> ------------------------------------------------------------------
>
>                 Key: KAFKA-8523
>                 URL: https://issues.apache.org/jira/browse/KAFKA-8523
>             Project: Kafka
>          Issue Type: Bug
>          Components: KafkaConnect
>            Reporter: Gunnar Morling
>            Priority: Major
>
> When applying the {{InsertField}} transformation to a tombstone event, an 
> exception is raised:
> {code}
> 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)
> {code}
> AFAICS, the transform can still be made working in in this case by simply 
> building up a new value map from scratch.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to