-
Notifications
You must be signed in to change notification settings - Fork 989
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
Parallel bl db #4176
Parallel bl db #4176
Conversation
86f4619
to
b8035a1
Compare
1594eea
to
7674f7e
Compare
There's been a few iterations on this, so here's an overview of the thread safe structure. We've added Currently, most core subsystems assume single thread access only and are not thread safe. Due to this assumption, background threads should have no access to most core subsystems ( The |
7674f7e
to
f3cbd03
Compare
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.
Thanks for the PR, very nice changes! (that also improve bucketlist interface and separation of responsibilities). Please squash the commits, and we can merge.
@@ -0,0 +1,292 @@ | |||
// Copyright 2024 Stellar Development Foundation and contributors. Licensed |
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.
Looks like there are some outdated files in the beginning of the commit history, and some small fixes at the end, please squash the commits (commit history doesn't need to be super precise, just make sure to remove obsolete interface changes etc)
bb037ed
to
916bb73
Compare
r+ 916bb73 |
Description
Builds on top of #4172 to enable parallel loads for BucketListDB.
This is an experimental draft PR that makes BucketListDB thread safe. The interface is as follows:
Each thread should call
BucketManager::getSearchableBucketListSnapshot()
to initialize their local snapshot. All loads from the thread should go through this snapshot object. After initialization, theBucketListSnapshot
object automatically stays in sync with the current BucketList.This change has a very simple, single threaded unit test. I've also run a watcher node successfully, but have yet to do a significant multi-threaded test.
Checklist
clang-format
v8.0.0 (viamake format
or the Visual Studio extension)