DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
Status
Current state: Under Discussion
Discussion thread: here
JIRA: here
Motivation
As part of our analysis around KAFKA-19430, we realized it's not possible to handle a CorruptRecordException in Streams because it's not exposed to the client; instead, a generic KafkaException is thrown. This KIP proposes to expose CorruptRecordException directly, allowing the client to decide how to handle this specific error.
Public Interfaces
The idea is to expose CorruptRecordException when the error is already present in the broker's fetch response, which signifies disk corruption. We will also enhance CorruptRecordException to include the TopicPartition and offset.
It's important to highlight that offset here is an offset we're trying to read from, not a offset of corruption!
|
|---|
|
Proposed Changes
Expose
CorruptRecordExceptionwhen it is present in broker responses, indicating a disk failure.Enhance
CorruptRecordExceptionto contain the topic partition and corrupted offset.
Compatibility, Deprecation, and Migration Plan
There is no deprecation planned.
The
CorruptRecordExceptionclass will be updated.It will be exposed for the described use case.
Test Plan
- Unit tests will be created to ensure the new functionality works as expected.