[
https://issues.apache.org/jira/browse/SAMZA-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975745#comment-13975745
]
Chris Riccomini commented on SAMZA-64:
--------------------------------------
bq. 1) but have difficulty in writing the unit test for this. Any existing
class/method to trigger this error?
The easiest way to trigger this is to inject a serde into the
KafkaCheckpointManager constructor's serde parameter. The serde you inject can
throw an InvalidMessageCode when Serde.fromBytes is called. This method is only
invoked inside readLastCheckpoint's retryBackoff code.
bq. 2) Any other unrecoverable exceptions besides InvalidMessageCode?
I think these are the error codes that are not recoverable:
{noformat}
val InvalidMessageCode : Short = 2
val UnknownTopicOrPartitionCode : Short = 3
val InvalidFetchSizeCode : Short = 4
{noformat}
> Fail KafkaCheckpointManager on unrecoverable errors
> ---------------------------------------------------
>
> Key: SAMZA-64
> URL: https://issues.apache.org/jira/browse/SAMZA-64
> Project: Samza
> Issue Type: Bug
> Components: kafka
> Affects Versions: 0.6.0
> Reporter: Chris Riccomini
>
> KafkaCheckpointManager currently handles all errors from Kafka by waiting,
> and retrying. These error codes are located in Kafka's ErrorMapping class:
> {noformat}
> val UnknownCode : Short = -1
> val NoError : Short = 0
> val OffsetOutOfRangeCode : Short = 1
> val InvalidMessageCode : Short = 2
> val UnknownTopicOrPartitionCode : Short = 3
> val InvalidFetchSizeCode : Short = 4
> val LeaderNotAvailableCode : Short = 5
> val NotLeaderForPartitionCode : Short = 6
> val RequestTimedOutCode: Short = 7
> val BrokerNotAvailableCode: Short = 8
> val ReplicaNotAvailableCode: Short = 9
> val MessageSizeTooLargeCode: Short = 10
> val StaleControllerEpochCode: Short = 11
> {noformat}
> There was some discussion on SAMZA-62's RB about potentially not retrying on
> ALL errors. Some are not recoverable (e.g. InvalidMessageCode).
--
This message was sent by Atlassian JIRA
(v6.2#6252)