-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
remove consumer unnecessary locks #9261
remove consumer unnecessary locks #9261
Conversation
I am interested in how much performance has improved |
@315157973 I will paste the perf result latter. |
This will break the current behavior. In some cases, user want a guarantee of the batch size. |
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBase.java
Outdated
Show resolved
Hide resolved
I pressure test with pulser-perf reader
The result as follow
It has improved 45%. For BatchReceive, I will test latter. |
For BatchReceive, I add batchReceive policy for PerformanceConsumer #9295 , and test as follow
perf command as follow:
The result as follow
The consume performance improved 5.6% I will move the lock back for batchReceive module. |
/pulsarbot run-failure-checks |
516a9d5
to
99f07fa
Compare
/pulsarbot run-failure-checks |
5 similar comments
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
I checked where the lock is removed, it should be thread safe cc @eolivelli |
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.
LGTM
cc @sijie @merlimat @rdhabalia PTAL
@codelipenghui Can you review this again? |
/pulsarbot run-failure-checks |
1 similar comment
/pulsarbot run-failure-checks |
909fe40
to
6f21173
Compare
@codelipenghui @sijie @merlimat PTAL again, thanks. |
@hangc0276 I think the description should be updated since the change does not break the batch receive behavior? |
@codelipenghui Ok, i have updated the description. |
This reverts commit 9d08f64
This reverts commit 9d08f64
…che#10508) ### Motivation apache#10240 has reverted the changes of the apache#9261 introduced which make the key_shared tests flaky. So it's better to move out the tests from the quarantine group. ### Modifications Move out the key_shared related tests from the quarantine group.
Motivation
ConsumerImpl
has many unnecessary locks for thread-safe Queue, such asQueues.newConcurrentLinkedQueue
,GrowableArrayBlockingQueue
,ConcurrentLinkedQueue
Changes
ConsumerImpl
Related to PR#8207