-
Notifications
You must be signed in to change notification settings - Fork 875
[COR-50] Introduce thread-local leasers for builders and strings #22176
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
Conversation
|
Should add a test that at least tickles TSAN when run. |
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.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on December 28
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
6db4315 to
cdcf639
Compare
|
Should also measure performance implications. At the moment there is only a very small number of leasable builders/string available per thread, as opposed to the previously unbounded number per transaction. |
a4e360a to
46a60a2
Compare
371ba8d to
89a2ec8
Compare
a1709b0 to
4278066
Compare
|
For the record: simple performance tests did not show any effect of this change on performance. |
Scope & Purpose
Introduces thread-local leasers for velocypack::Builder and std::string.
This also addresses a problem with
async-prefetchwhere builders and strings were leased through the transaction context, which is not meant to be acceessed concurrently.Fixes #22158 and other issues with
async-prefetchNote
Introduce thread-local leasers for Builder and std::string and refactor transaction leasers to use them, fixing async-prefetch concurrency issues and adding targeted tests.
ThreadLocalLeaser: AddBasics/ThreadLocalLeaser.hwith thread-local pooling for reusable objects; typedefsThreadLocalBuilderLeaserandThreadLocalStringLeaser.ThreadLocalLeaserTest.cppcovering leasing, stash behavior, moves, and cross-thread handoff.transaction::StringLeaserandtransaction::BuilderLeasernow useThreadLocal*Leaser(release/acquire/get); remove context-based leasing/destructors/clear/steal.Helpers.cpp/.h,Methods.cpp(drop explicit_replicationData.clear()), and helpers to new APIs.tests/Mocks/PhysicalCollectionMock.cppto usebuilder.release().aql-async-prefetch-leaser-reuse.jsto stress async-prefetch concurrency.Written by Cursor Bugbot for commit c0d5590. This will update automatically on new commits. Configure here.