-
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
[improve][ml] Use lock-free queue in InflightReadsLimiter since there's no concurrent access #23962
base: master
Are you sure you want to change the base?
Conversation
@guan46 Just curious to know: how do you know that this improves performance? What's your use case and what are you measuring? |
This PR is correct, but just interested to know more about the motivation behind this PR. @guan46 Please run CI in your own fork as a first verification step. That ensures that this change doesn't break something and you'll be able to work on the changes without needing someone to spend time in checking if this PR is ok or not. |
SpscArrayQueue has a memory barrier to ensure data consistency in concurrent situations, whereas ArrayDeque has no memory barrier. ArrayDeque can improve performance in non-concurrent situations @lhotari |
@guan46 Yes, I agree on that. I'm not against the changes in this PR. If you are looking for future contribution opportunities in Pulsar, you can always ask for suggestions on the dev channel in Pulsar Slack. Joining the Pulsar bi-weekly community meeting is a place where contributions are also discussed. I can help to find contribution opportunies with high impact. Regarding the "performance improvement" aspect: This PR won't improve performance so that you'd be able to measure the difference. One reason for this is that the queue is only used when permits are all used. |
All the tests of my repo have passed, please take a look.Thank you! @lhotari |
I can't get into pulsar's workspace.Could you help me? @lhotari |
@guan46 you will be able to join with the link at https://pulsar.apache.org/community/#section-discussions or |
All the tests of my repo have passed, please take a look. @lhotari |
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.
Please check the latest review comment.
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/cache/InflightReadsLimiter.java
Outdated
Show resolved
Hide resolved
|
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, good work @guan46
/pulsarbot rerun-failure-checks |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #23962 +/- ##
============================================
+ Coverage 73.57% 74.26% +0.69%
+ Complexity 32624 31929 -695
============================================
Files 1877 1854 -23
Lines 139502 143881 +4379
Branches 15299 16352 +1053
============================================
+ Hits 102638 106858 +4220
+ Misses 28908 28645 -263
- Partials 7956 8378 +422
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Motivation
Modifications
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: guan46#7