kerr: ReplicaNotAvailable is retriable; add UnknownTopicID
ReplicaNotAvailable extends InvalidMetadataException, which itself
extends RetriableException
@@ -54,7 +54,7 @@ var (
NotLeaderForPartition = &Error{"NOT_LEADER_FOR_PARTITION", 6, true, "This server is not the leader for that topic-partition."}
RequestTimedOut = &Error{"REQUEST_TIMED_OUT", 7, true, "The request timed out."}
BrokerNotAvailable = &Error{"BROKER_NOT_AVAILABLE", 8, false, "The broker is not available."}
- ReplicaNotAvailable = &Error{"REPLICA_NOT_AVAILABLE", 9, false, "The replica is not available for the requested topic-partition."}
+ ReplicaNotAvailable = &Error{"REPLICA_NOT_AVAILABLE", 9, true, "The replica is not available for the requested topic-partition."}
MessageTooLarge = &Error{"MESSAGE_TOO_LARGE", 10, false, "The request included a message larger than the max message size the server will accept."}
StaleControllerEpoch = &Error{"STALE_CONTROLLER_EPOCH", 11, false, "The controller moved to another broker."}
OffsetMetadataTooLarge = &Error{"OFFSET_METADATA_TOO_LARGE", 12, false, "The metadata field of the offset request was too large."}
@@ -145,6 +145,7 @@ var (
PrincipalDeserializationFailure = &Error{"PRINCIPAL_DESERIALIZATION_FAILURE", 97, false, "Request principal deserialization failed during forwarding. This indicates an internal error on the broker cluster security setup."}
SnapshotNotFound = &Error{"SNAPSHOT_NOT_FOUND", 98, false, "Requested snapshot was not found."}
PositionOutOfRange = &Error{"POSITION_OUT_OF_RANGE", 99, false, "Requested position is not greater than or equal to zero, and less than the size of the snapshot."}
+ UnknownTopicID = &Error{"UNKNOWN_TOPIC_ID", 100, true, "This server does not host this topic ID."}
)
var code2err = map[int16]error{
@@ -249,4 +250,5 @@ var code2err = map[int16]error{
97: PrincipalDeserializationFailure,
98: SnapshotNotFound,
99: PositionOutOfRange,
+ 100: UnknownTopicID,
}
