druid icon indicating copy to clipboard operation
druid copied to clipboard

Kafka ingestion breaks when headers miss values

Open daniel-imgarena opened this issue 2 years ago • 1 comments

Please provide a detailed title (e.g. "Broker crashes when using TopN query with Bound filter" instead of just "Broker crashes").

Affected Version

28.0.1, at least

Description

When getting data from Kafka message headers, if the header has a key but not a value, ingestion breaks and starts a never ending loop of new task spawning and breaking in the first seconds when trying to process the same record again.

Screenshot 2024-03-20 at 12 38 52 Screenshot 2024-03-20 at 12 41 37

We can't control what's on the producer side, but we should assure Druid that it will either ignore this header (best) or at least skip the record with weird headers. Stopping the ingestion is not good behaviour.

daniel-imgarena avatar Mar 20 '24 12:03 daniel-imgarena

Yes. The code should just add null I suppose. Is it something you will be interested in fixing? Should be a simple fix in this class - https://github.com/apache/druid/blob/master/extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/data/input/kafkainput/KafkaStringHeaderReader.java

abhishekagarwal87 avatar Mar 20 '24 14:03 abhishekagarwal87