You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "shibd (via GitHub)" <gi...@apache.org> on 2024/11/12 14:10:56 UTC
[PR] [fix][client] The partitionedProducer maxPendingMessages always is 0 [pulsar]
shibd opened a new pull request, #23593:
URL: https://github.com/apache/pulsar/pull/23593
### Motivation
After #13344, the default value of maxPendingMessages and maxPendingMessagesAcrossPartitions is 0.
When creating a producer with the partitioned topic, setting one of the values doesn't take effect; the actual value is always 0.
Here have will reset it
https://github.com/apache/pulsar/blob/92448d5f3113d783d41de6bae718d34cd73ca934/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PartitionedProducerImpl.java#L86-L89
### Modifications
- When setting one of the values, use it directly. Only perform the `min` check when both values are not zero.
### Verifying this change
- Add PartitionedProducerImplTest.testMaxPendingQueueSize to cover this logic.
- Add testProducerQueueFullBlockingWithPartitionedTopic test to cover blockQueueFullWithPartitiond case.
### Documentation
<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
- [ ] `doc` <!-- Your PR contains doc changes. -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->
### Matching PR in forked repository
PR in forked repository: <!-- ENTER URL HERE -->
<!--
After opening this PR, the build in apache/pulsar will fail and instructions will
be provided for opening a PR in the PR author's forked repository.
apache/pulsar pull requests should be first tested in your own fork since the
apache/pulsar CI based on GitHub Actions has constrained resources and quota.
GitHub Actions provides separate quota for pull requests that are executed in
a forked repository.
The tests will be run in the forked repository until all PR review comments have
been handled, the tests pass and the PR is approved by a reviewer.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [fix][client] The partitionedProducer maxPendingMessages always is 0 [pulsar]
Posted by "shibd (via GitHub)" <gi...@apache.org>.
shibd merged PR #23593:
URL: https://github.com/apache/pulsar/pull/23593
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org