[ 
https://issues.apache.org/jira/browse/KAFKA-21457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Muralidhar Basani updated KAFKA-21457:
--------------------------------------
    Description: 
If a streams application stops without leaving the group (crash / kill -9) and 
its source topic is then deleted, the dead members keep their assignment until 
the session timeout (group.streams.session.timeout.ms, default 45s).

During that window kafka-streams-groups.sh --describe --group <g> --all-groups 
fails:

Error:

 
{code:java}
Executing streams group command failed due to 
org.apache.kafka.common.errors.UnknownTopicOrPartitionException: Failed to 
fetch metadata for partition
streams-plaintext-input-1 because metadata for topic `streams-plaintext-input` 
could not be found
at 
...StreamsGroupCommand$StreamsGroupService.getOffsets(StreamsGroupCommand.java:476)
at 
...StreamsGroupCommand$StreamsGroupService.printOffsets(StreamsGroupCommand.java:432)
at 
...StreamsGroupCommand$StreamsGroupService.describeGroups(StreamsGroupCommand.java:285){code}
 

getOffsets passes all active-task partitions to listOffsets(...).all().get(), 
so one deleted topic fails the whole call, and with --all-groups it also aborts 
output for the remaining groups.

Reproduce : 

single-node KRaft broker;
run WordCountDemo with group.protocol=streams;
kill -9 it;
delete streams-plaintext-input;
run kafka-streams-groups.sh --describe --all-groups within 45s.

Expected: same as KAFKA-17218 (#24098): print - for offsets/lag of partitions 
whose topic no longer exists, and continue with other groups.

  was:
If a streams application stops without leaving the group (crash / kill -9) and 
its source topic is then deleted, the dead members keep their assignment until 
the session timeout (group.streams.session.timeout.ms, default 45s).

During that window kafka-streams-groups.sh --describe --group <g> --all-groups 
fails:

Error:

 
{code:java}
Executing streams group command failed due to 
org.apache.kafka.common.errors.UnknownTopicOrPartitionException: Failed to 
fetch metadata for partition
streams-plaintext-input-1 because metadata for topic `streams-plaintext-input` 
could not be found
at 
...StreamsGroupCommand$StreamsGroupService.getOffsets(StreamsGroupCommand.java:476)
at 
...StreamsGroupCommand$StreamsGroupService.printOffsets(StreamsGroupCommand.java:432)
at 
...StreamsGroupCommand$StreamsGroupService.describeGroups(StreamsGroupCommand.java:285){code}
 

getOffsets passes all active-task partitions to listOffsets(...).all().get(), 
so one deleted topic fails the whole call, and with --all-groups it also aborts 
output for the remaining groups.

Reproduce : 

single-node KRaft broker;
run WordCountDemo with group.protocol=streams;
kill -9 it;
delete streams-plaintext-input;
run kafka-streams-groups.sh --describe --all-groups within 45s.


Expected: same as kafka-consumer-groups.sh after KAFKA-17218 (#24098): print - 
for offsets/lag of partitions whose topic no longer exists, and continue with 
other groups.

Related: KAFKA-17218, PR #24098.


> kafka-streams-groups.sh --describe fails when a group's assigned topic was 
> deleted.
> -----------------------------------------------------------------------------------
>
>                 Key: KAFKA-21457
>                 URL: https://issues.apache.org/jira/browse/KAFKA-21457
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>            Reporter: Muralidhar Basani
>            Assignee: Muralidhar Basani
>            Priority: Minor
>
> If a streams application stops without leaving the group (crash / kill -9) 
> and its source topic is then deleted, the dead members keep their assignment 
> until the session timeout (group.streams.session.timeout.ms, default 45s).
> During that window kafka-streams-groups.sh --describe --group <g> 
> --all-groups fails:
> Error:
>  
> {code:java}
> Executing streams group command failed due to 
> org.apache.kafka.common.errors.UnknownTopicOrPartitionException: Failed to 
> fetch metadata for partition
> streams-plaintext-input-1 because metadata for topic 
> `streams-plaintext-input` could not be found
> at 
> ...StreamsGroupCommand$StreamsGroupService.getOffsets(StreamsGroupCommand.java:476)
> at 
> ...StreamsGroupCommand$StreamsGroupService.printOffsets(StreamsGroupCommand.java:432)
> at 
> ...StreamsGroupCommand$StreamsGroupService.describeGroups(StreamsGroupCommand.java:285){code}
>  
> getOffsets passes all active-task partitions to listOffsets(...).all().get(), 
> so one deleted topic fails the whole call, and with --all-groups it also 
> aborts output for the remaining groups.
> Reproduce : 
> single-node KRaft broker;
> run WordCountDemo with group.protocol=streams;
> kill -9 it;
> delete streams-plaintext-input;
> run kafka-streams-groups.sh --describe --all-groups within 45s.
> Expected: same as KAFKA-17218 (#24098): print - for offsets/lag of partitions 
> whose topic no longer exists, and continue with other groups.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to