Skip to content
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

[fix][client] Fix race-condition causing doReconsumeLater to hang when creating retryLetterProducer has failed #23560

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hanmz
Copy link
Contributor

@hanmz hanmz commented Nov 5, 2024

Motivation

When retryLetterProducer creation fails, retryLetterProducer will be set to null. So retryLetterProducer==null may occur when race-condition is present, at this time, the results cannot be completed.

Only handle the situation when retryLetterProducer is not equal to null:

Modifications

When retryLetterProducer==null, mark the result as an completeExceptionally.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Nov 5, 2024
@lhotari
Copy link
Member

lhotari commented Nov 5, 2024

Do you have a chance to add a test case?

@hanmz
Copy link
Contributor Author

hanmz commented Nov 11, 2024

Do you have a chance to add a test case?

I've added a test case.

@lhotari lhotari changed the title [fix][client] Fix race-condition causing doReconsumeLater hang up when create retryLetterProducer is failed [fix][client] Fix race-condition causing doReconsumeLater to hang when creating retryLetterProducer has failed Nov 11, 2024
@lhotari lhotari added this to the 4.1.0 milestone Nov 11, 2024
Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the contribution @hanmz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/client doc-not-needed Your PR changes do not impact docs release/3.0.8 release/3.3.3 release/4.0.1 type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants