[
https://issues.apache.org/jira/browse/KAFKA-20981?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Matthias J. Sax reassigned KAFKA-20981:
---------------------------------------
Assignee: Matthias J. Sax
> Kafka Streams should handle unknown status code pro-actively
> ------------------------------------------------------------
>
> Key: KAFKA-20981
> URL: https://issues.apache.org/jira/browse/KAFKA-20981
> Project: Kafka
> Issue Type: Bug
> Components: streams
> Affects Versions: 4.2.0
> Reporter: Matthias J. Sax
> Assignee: Matthias J. Sax
> Priority: Major
>
> With KIP-1071, task assignment moved to the broker, and
> StreamsGroupHeartbeatResponse now carries status codes. The status field is
> present since v0. Adding a new status code is a semantic contract change: it
> must be backed by a KIP and a request-version bump, and the broker must gate
> the new code so it is only sent to clients that advertise the introducing
> version (as it does today for MISSING_CLIENT_TAGS, code 6, which is withheld
> from v0 clients). This is subtler than a schema change and easy to get wrong,
> so a buggy broker can send a code an older client does not recognize.
> The client decodes every status on every heartbeat via Status.fromCode, which
> throws on an unknown code. Today that throw is silently swallowed
> (https://issues.apache.org/jira/browse/KAFKA-20860): the client keeps
> heartbeating, advances its member epoch, and silently ignores the assignment
> and every one after it, while the coordinator sees a healthy member. Because
> the status is returned on every heartbeat, the condition persists for the
> member's lifetime; once https://issues.apache.org/jira/browse/KAFKA-20860 is
> addressed so the error surfaces, it would recur on every heartbeat unless
> handled here.
> We propose to verify the status code pro-actively, and if the client cannot
> recognize it, raise a Streams exception that shuts down the StreamThread and
> triggers the uncaught-exception handler, so the error surfaces cleanly.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)