Skip to content

KAFKA-19450: ShareConsumerPerformance does not handle exceptions from consumeMessagesForSingleShareConsumer #20126

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 9, 2025

Conversation

adixitconfluent
Copy link
Contributor

@adixitconfluent adixitconfluent commented Jul 8, 2025

About

Within ShareConsumerPerformance.java, all the share consumers run with
within an executorService object and when we
perform executorService.submit(), we do not store this future and
exception would be recovered only when we do a future.get() in this
case. I believe this is a shortcoming
in ShareConsumerPerformance.java which needs to be improved.

Reviewers: Andrew Schofield [email protected]

@github-actions github-actions bot added triage PRs from the community tools small Small PRs labels Jul 8, 2025
@AndrewJSchofield AndrewJSchofield added the KIP-932 Queues for Kafka label Jul 8, 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.

@@ -153,6 +157,9 @@ private static void consume(List<KafkaShareConsumer<byte[], byte[]>> shareConsum
// Preserve interrupt status
Thread.currentThread().interrupt();
}
for (Future<?> future : futures) {
future.get(1, TimeUnit.MILLISECONDS);
Copy link
Member

Choose a reason for hiding this comment

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

Is there any point in waiting for 1 ms here? Wouldn't future.get() be as effective?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it would be the same. I'll change this code.

@AndrewJSchofield AndrewJSchofield changed the title KAFKA-19450: MINOR: ShareConsumerPerformance does not handle exceptions from consumeMessagesForSingleShareConsumer KAFKA-19450: ShareConsumerPerformance does not handle exceptions from consumeMessagesForSingleShareConsumer Jul 8, 2025
@AndrewJSchofield AndrewJSchofield removed the triage PRs from the community label Jul 8, 2025
@AndrewJSchofield AndrewJSchofield merged commit e489682 into apache:trunk Jul 9, 2025
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-approved KIP-932 Queues for Kafka small Small PRs tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants