-
Notifications
You must be signed in to change notification settings - Fork 397
Description
I was looking at the logs on our QA environment and got very concerned about using it in production, because the rotate interval configurations (both rotate.interval.ms and rotate.schedule.interval.ms) do not actually work as described.
Both settings are only looked at when a call to write() is made, which only happens if Connect sends records to the task.
If the traffic comes in spurts, data can stay uncommitted for hours before new traffic comes in and the timer is triggered. On traffic following daylight patterns, the last records will remain uncommitted overnight.
With sporadic traffic it's even worse. Not only records can languish uncommitted, but if load redistribution happens more often than traffic, the uncommitted records get discarded, and a new timer starts once the topic is re-assigned, which might result in records staying uncommitted indefinitely unless a flush size is also set at very low values and, even then, we still face the prospect of going days before the record is finally committed.
Kafka Connect has a solution to that: offset.flush.interval.ms. Kafka Connect HDFS blithely ignores it. And if the connector is closed, all uncommitted data is discarded. There's literally no way of getting Kafka Connect HDFS to commit data without actually sending data.
We have both these patterns as well as high traffic volumes at very different scales, but the producers and consumers of all topics are the same, and it would be extremely inconvenient to have to resort to a separate tool just for it.