-
Notifications
You must be signed in to change notification settings - Fork 3.7k
support limit message size produced by protocol handlers by maxMessag… #13204
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
support limit message size produced by protocol handlers by maxMessag… #13204
Conversation
|
@gaozhangmin:Thanks for your contribution. For this PR, do we need to update docs? |
|
@gaozhangmin:Thanks for providing doc info! |
|
There could have a case when we have both pulsar and kafka producer send msgs:
Could you please consider how to avoid this happen |
|
Why the previous design had no this problem? I'm little confused. @wangjialing218 |
|
I got the reason, I will try fix this case. |
|
As previous design, |
|
We do not have to do |
37a6eb3 to
e2a9284
Compare
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
Outdated
Show resolved
Hide resolved
0dbecd8 to
6b32a39
Compare
Jason918
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better that we can describe more details about the downside of this solution.
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
Outdated
Show resolved
Hide resolved
| private Set<BrokerEntryMetadataInterceptor> brokerEntryMetadataInterceptors; | ||
| private Set<ManagedLedgerPayloadProcessor> brokerEntryPayloadProcessors; | ||
|
|
||
| private final CopyOnWriteArrayList<Consumer<PublishBufferEvent>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer a better data structure than CopyOnWriteArrayList if we have a lot of producers.
…ePublishBufferSizeInMB
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
Show resolved
Hide resolved
6b32a39 to
cacfda0
Compare
|
/pulsarbot run-failure-checks |
1 similar comment
|
/pulsarbot run-failure-checks |
|
@gaozhangmin Thanks for your contribution. IMO, it's better to throttle in KOP side, do you have any other ideas? @BewareMyPower |
|
@hangc0276 For now I didn't have much context. AFAIK, this PR is an implementation of idea from #12959. Could you answer hang's question? @wangjialing218 |
|
@hangc0276 You may mentioned #7406, which introduced the throttle policy by io thread.
For this point, we could make sure broker and KoP share the IO thread pool, and do same throttle policy by io thread in KoP side. @BewareMyPower |
The |
Motivation
See #13170 .
Also, Protocols handlers like KOP should make changes to add and decrease pendingBytes from BrokerService.
Modifications
Add a LongAdder
totalPendingBytesin BrokerService to record total pending message size.Documentation
Check the box below and label this PR (if you have committer privilege).
Need to update docs?
doc-required(If you need help on updating docs, create a doc issue)
no-need-doc(Please explain why)
doc(If this PR contains doc changes)