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 PartitionedProducerImpl flushAsync always fail when one partition send TimeOutException #14602

Merged
merged 11 commits into from
Mar 15, 2022

Conversation

wenbingshen
Copy link
Member

Fixes #14598

Master Issue: #14598

Motivation

Detailed issue description can be found at #14598

Modifications

After the lastSendFuture returned to application from in org.apache.pulsar.client.impl.ProducerImpl#flushAsync acquired , it should not continue to be thrown to the application, the lastSendFuture whether an exception occurs or completed, and the application is only allowed to acquire it once, otherwise it will cause org. apache.pulsar.client.impl.PartitionedProducerImpl#flushAsync cannot continue to send data until data is sent again to the abnormal ProducerImpl.

Documentation

Check the box below or label this PR directly (if you have committer privilege).

Need to update docs?

  • no-need-doc

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Mar 8, 2022
@lhotari lhotari requested a review from michaeljmarshall March 8, 2022 10:56
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.

I support @lhotari 's suggestions.

@wenbingshen
Copy link
Member Author

@lhotari @michaeljmarshall @eolivelli Thanks much for your review and help. I add a test testSendTimeoutAndRecover. In the code before this PR, this unit test failed, in this PR, it does not fail.

@wenbingshen
Copy link
Member Author

/pulsarbot run-failure-checks

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. Good work @wenbingshen. Thank you for the contribution.

@wenbingshen
Copy link
Member Author

LGTM. Good work @wenbingshen. Thank you for the contribution.

@lhotari Thanks for your review and great comments. :)

Copy link
Contributor

@codelipenghui codelipenghui left a comment

Choose a reason for hiding this comment

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

Looks good to me, just left some minor comments.

@wenbingshen
Copy link
Member Author

/pulsarbot run-failure-checks

@congbobo184 congbobo184 merged commit ddca852 into apache:master Mar 15, 2022
codelipenghui pushed a commit that referenced this pull request Mar 18, 2022
… send TimeOutException (#14602)

Fixes #14598

Master Issue: #14598

Detailed issue description can be found at #14598

After the `lastSendFuture` returned to application from in `org.apache.pulsar.client.impl.ProducerImpl#flushAsync` acquired , it should not continue to be thrown to the application, the `lastSendFuture` whether an exception occurs or completed, and the application is only allowed to acquire it once, otherwise it will cause `org. apache.pulsar.client.impl.PartitionedProducerImpl#flushAsync ` cannot continue to send data until data is sent again to the abnormal `ProducerImpl`.

(cherry picked from commit ddca852)
@codelipenghui codelipenghui added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label Mar 18, 2022
@codelipenghui codelipenghui modified the milestones: 2.11.0, 2.10.0 Mar 19, 2022
codelipenghui pushed a commit that referenced this pull request Mar 19, 2022
… send TimeOutException (#14602)

Fixes #14598

Master Issue: #14598

### Motivation

Detailed issue description can be found at #14598

### Modifications

After the `lastSendFuture` returned to application from in `org.apache.pulsar.client.impl.ProducerImpl#flushAsync` acquired , it should not continue to be thrown to the application, the `lastSendFuture` whether an exception occurs or completed, and the application is only allowed to acquire it once, otherwise it will cause `org. apache.pulsar.client.impl.PartitionedProducerImpl#flushAsync ` cannot continue to send data until data is sent again to the abnormal `ProducerImpl`.

(cherry picked from commit ddca852)
Nicklee007 pushed a commit to Nicklee007/pulsar that referenced this pull request Apr 20, 2022
… send TimeOutException (apache#14602)

Fixes apache#14598 

Master Issue: apache#14598 

### Motivation

Detailed issue description can be found at apache#14598

### Modifications

After the `lastSendFuture` returned to application from in `org.apache.pulsar.client.impl.ProducerImpl#flushAsync` acquired , it should not continue to be thrown to the application, the `lastSendFuture` whether an exception occurs or completed, and the application is only allowed to acquire it once, otherwise it will cause `org. apache.pulsar.client.impl.PartitionedProducerImpl#flushAsync ` cannot continue to send data until data is sent again to the abnormal `ProducerImpl`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-picked/branch-2.9 Archived: 2.9 is end of life doc-not-needed Your PR changes do not impact docs release/2.8.2 release/2.9.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PartitionedProducerImpl flushAsync always fail
6 participants