Skip to content

KAFKA-20232: Fix WakeupException in awaitMetadataUpdate()#21592

Open
Baisang wants to merge 1 commit into
apache:trunkfrom
Baisang:KAFKA-20232_wakeup_awaitmetadaupdate
Open

KAFKA-20232: Fix WakeupException in awaitMetadataUpdate()#21592
Baisang wants to merge 1 commit into
apache:trunkfrom
Baisang:KAFKA-20232_wakeup_awaitmetadaupdate

Conversation

@Baisang

@Baisang Baisang commented Feb 26, 2026

Copy link
Copy Markdown

Asynchronous offset commits may throw an unexpected WakeupException.
This was addressed for some code paths previously in
#12626, but left out for the
awaitMetadataUpdate() code path. This patch fixes the problem by
passing through a flag to awaitMetadataUpdate() to indicate whether
wakeups should be disabled. This is used to disable wakeups in the
context of asynchronous offset commits. All other uses leave wakeups
enabled.

Reviewers: Nikita Shupletsov nikita@shupletsov.ca, Lianet Magrans
lmagrans@confluent.io

@github-actions github-actions Bot added triage PRs from the community consumer clients small Small PRs labels Feb 26, 2026
@github-actions

github-actions Bot commented Mar 6, 2026

Copy link
Copy Markdown

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

@lianetm lianetm added ci-approved and removed triage PRs from the community needs-attention labels Mar 10, 2026

@Nikita-Shupletsov Nikita-Shupletsov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thank you

@Baisang

Baisang commented Jun 10, 2026

Copy link
Copy Markdown
Author

Hi @Nikita-Shupletsov , thanks for the review. Wondering what the next step is here to get another approval

@Nikita-Shupletsov

Copy link
Copy Markdown
Contributor

@lianetm could you please take a look? thank you!

@lianetm lianetm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! Just minor comments around java docs

* @param disableWakeup true if we should not check for wakeups, false otherwise
* @return true if update succeeded, false otherwise.
*/
public boolean awaitMetadataUpdate(Timer timer, boolean disableWakeup) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

could we add the "throws WakeUp" java doc?

@@ -161,9 +161,20 @@ public boolean hasReadyNodes(long now) {
* @return true if update succeeded, false otherwise.
*/
public boolean awaitMetadataUpdate(Timer timer) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

here too, probably worth clarifying that this one "throws WakeUp"

(consistent with the java doc of the poll in this same file btw)

@lianetm

lianetm commented Jun 15, 2026

Copy link
Copy Markdown
Member

Also @Baisang could you please merge trunk latest changes too? thanks!

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.

3 participants