The Kafka consumer encounters an OffsetOutOfRange error, indicating the requested offset is not available on the broker. This typically happens when trying to read from an offset that has already been deleted due to the topic's retention policy. The plan involves modifying the KafkaConsumer class to handle this error more gracefully by seeking to the earliest or latest offset available (based on configuration) instead of failing.
The steps that were performed:
Add configuration option for handling OffsetOutOfRange
Implement offset reset logic in poll method
Update KafkaConsumer documentation
📣 Instructions for the reviewer which is you, yes you:
If these changes were incorrect, please close this PR and comment explaining why.
If these changes were incomplete, please continue working on this PR then merge it.
If you are feeling confident in my changes, please merge this PR.
This will greatly help us improve the autofix system. Thank you! 🙏
👋 Hi there! This PR was automatically generated 🤖
Triggered by evan.hicks@sentry.io
Fixes SNUBA-4KJ
The Kafka consumer encounters an OffsetOutOfRange error, indicating the requested offset is not available on the broker. This typically happens when trying to read from an offset that has already been deleted due to the topic's retention policy. The plan involves modifying the KafkaConsumer class to handle this error more gracefully by seeking to the earliest or latest offset available (based on configuration) instead of failing.
The steps that were performed:
📣 Instructions for the reviewer which is you, yes you:
This will greatly help us improve the autofix system. Thank you! 🙏
If there are any questions, please reach out to the AI/ML Team on #proj-autofix
🤓 Stats for the nerds:
Prompt tokens: 86194 Completion tokens: 1702 Total tokens: 87896