Skip to content

KAFKA-19454: Handle topics missing in metadata in share delete. #20090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 3, 2025

Conversation

smjn
Copy link
Collaborator

@smjn smjn commented Jul 2, 2025

  • There are instances where share group delete calls in group
    coordinator (onPartitionsDelete, deleteShareGroups) where we lookup
    the metadata image to fetch the topic id/partitions/topic name for a
    topic name/id. However, there have been
    instances where the looked up info was not found due to cluster being
    under load or the underlying topic being deleted and information not
    propagated correctly.
  • To remedy the same, this PR adds checks to determine that topic is
    indeed present in the image before the lookups thus preventing NPEs. The
    problematic situations are logged.
  • New tests have been added for GroupMetadataManger and
    GroupCoordinatorService.

Reviewers: Andrew Schofield [email protected]

@smjn smjn requested a review from AndrewJSchofield July 2, 2025 11:13
@github-actions github-actions bot added triage PRs from the community group-coordinator labels Jul 2, 2025
@smjn smjn added KIP-932 Queues for Kafka ci-approved and removed triage PRs from the community labels Jul 2, 2025
Copy link
Member

@AndrewJSchofield AndrewJSchofield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Looks good to me.

@AndrewJSchofield AndrewJSchofield merged commit 268cf66 into apache:trunk Jul 3, 2025
23 checks passed
jiafu1115 pushed a commit to jiafu1115/kafka that referenced this pull request Jul 3, 2025
…he#20090)

* There are instances where share group delete calls in group
coordinator (`onPartitionsDelete`, `deleteShareGroups`) where we lookup
the metadata image to fetch the topic id/partitions/topic name for a
topic name/id. However, there have been
instances where the looked up info was not found due to cluster being
under load or the underlying topic being deleted and information not
propagated correctly.
* To remedy the same, this PR adds checks to determine that topic is
indeed present in the image before the lookups thus preventing NPEs. The
problematic situations are logged.
* New tests have been added for `GroupMetadataManger` and
`GroupCoordinatorService`.

Reviewers: Andrew Schofield <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants