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

[Broker] Fix Future.join() causing deadlock. #14469

Merged
merged 11 commits into from Mar 1, 2022
Merged

[Broker] Fix Future.join() causing deadlock. #14469

merged 11 commits into from Mar 1, 2022

Conversation

mattisonchao
Copy link
Member

@mattisonchao mattisonchao commented Feb 25, 2022

Master issue #14438

Motivation

Invoking the join() method in the async method will cause some deadlock.

Modifications

  • Refactor PersistentTopic#tryToDeletePartitionedMetadata to pure async.

Verifying this change

  • Make sure that the change passes the CI checks.

Documentation

  • no-need-doc

Copy link
Member

@michaeljmarshall michaeljmarshall left a comment

Choose a reason for hiding this comment

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

@mattisonchao - thanks for opening the PR. I left some feedback.

@mattisonchao
Copy link
Member Author

/pulsarbot rerun-failure-checks

@mattisonchao
Copy link
Member Author

/pulsarbot rerun-failure-checks

Copy link
Contributor

@Jason918 Jason918 left a comment

Choose a reason for hiding this comment

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

Is there any test cases covering this?

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

Lgtm

Can you please find existing tests that cover this change?
I am not sure we have tests that cover all error cases

@mattisonchao
Copy link
Member Author

@Jason918 @eolivelli
I have supplemented the metadata test on the original basis.

@mattisonchao
Copy link
Member Author

mattisonchao commented Feb 28, 2022

Hi, @michaeljmarshall

PTAL :)

@eolivelli
Copy link
Contributor

@michaeljmarshall could you please take a final look ?

Copy link
Member

@michaeljmarshall michaeljmarshall left a comment

Choose a reason for hiding this comment

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

@mattisonchao - PTAL. I will approve and merge this once we agree on my comment, thanks!

…ersistent/PersistentTopic.java

Co-authored-by: Michael Marshall <mikemarsh17@gmail.com>
@codelipenghui codelipenghui merged commit 65318e8 into apache:master Mar 1, 2022
codelipenghui pushed a commit that referenced this pull request Mar 1, 2022
Master issue #14438

### Motivation

Invoking the ``join()`` method in the async method will cause some deadlock.

### Modifications

- Refactor ``PersistentTopic#tryToDeletePartitionedMetadata`` to pure async.

(cherry picked from commit 65318e8)
@michaeljmarshall
Copy link
Member

Just in case anyone is looking for more context, one of my concerns with the initial implementation had to do with unsafe publication of mutable state, which can behave in unexpected ways. I explain this more in this comment #14469 (comment)

gaoran10 pushed a commit that referenced this pull request Mar 1, 2022
Master issue #14438

### Motivation

Invoking the ``join()`` method in the async method will cause some deadlock.

### Modifications

- Refactor ``PersistentTopic#tryToDeletePartitionedMetadata`` to pure async.

(cherry picked from commit 65318e8)
@gaoran10 gaoran10 added cherry-picked/branch-2.9 Archived: 2.9 is end of life area/broker labels Mar 2, 2022
Nicklee007 pushed a commit to Nicklee007/pulsar that referenced this pull request Apr 20, 2022
Master issue apache#14438

### Motivation

Invoking the ``join()`` method in the async method will cause some deadlock. 

### Modifications

- Refactor ``PersistentTopic#tryToDeletePartitionedMetadata`` to pure async.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker cherry-picked/branch-2.9 Archived: 2.9 is end of life doc-not-needed Your PR changes do not impact docs release/2.9.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants