- Notifications
You must be signed in to change notification settings - Fork 179
Scheduler based on priority queue and communication stack improvements #2567
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
Merged
+2,126 −935
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Tracking
Standard development
CI Testing Labels
Documentation checklist
|
1246558
to b97b26a
Compare 2eded38
to b474dd0
Compare Ignition requested changes Jan 15, 2025
9284d5c
to 8f20e94
Compare 8eee243
to 4d7d718
Compare 5561953
to ad24b0a
Compare 4d8a942
to 8861717
Compare Moved worker pool to memgraph.cpp from Server Removed pool's pointer from ServerContext and Session SessionContext now has pool's pointer and a function to help add tasks Removed unused code from ChunkedDecoderBuffer Comments and general cleanup
Removed TypedValueResultStreamBase and DecodeValue unused due to MesssageRecord split Prepare doesn't assert but throws on missing parsed_res_ Should never happen, just in case General celan up
2c9ee63
to cc67bb2
Compare worker pool AwaitShutdown better names and general cleanup
cc67bb2
to 9b93c40
Compare Moved SimpleBarrier to its own header Redesign using wait and notify Unit tests Moved yielder to its own header and unified with RWSpinLock one
Hot threads reorganized into a class HotMaks unit tests
Bugfix in sched_mon not detecting last_task (introduced in prev cleanup) HIGH only specific query types unit tests
aaf69ed
to 711d09d
Compare Bugfix: Worker destoryed before safe - Worker was part of the operator() which exits on shutdown - Every worker has a vector of other workers - Worker can be destoryed only after each thread exited - workers_ is now a unique_ptr unit test fix
New command-line HIDDEN flag `scheduler` New e2e test
306a73d
to bd9b333
Compare Ignition approved these changes May 9, 2025
|
11 tasks
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI -build=community -test=core Run community build and core tests on push CI -build=coverage -test=core Run coverage build and core tests on push CI -build=debug -test=integration Run debug build and integration tests on push CI -build=jepsen -test=core Run jepsen build and core tests on push CI -build=release -test=benchmark Run release build and benchmark on push CI -build=release -test=e2e Run release build and e2e tests on push CI -build=release -test=query_modules Run release build and query modules tests on push CI -build=release -test=stress Run release build and stress tests on push Docs needed Docs needed feature feature
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Bolt worker pool has been separated from the boost::asio communication stack
While the communication still relies on boost::asio, it is only used to queue tasks onto the new scheduler
PriorityThreadPool is a new class that can order tasks by priority and execute them on N threads + 1 sidecar thread
The sidecar thread is used for high priority tasks only and is a workaround because tasks cannot yield at the moment
This allows us to never block a connection and to always execute selection of high priority queries
Deprecated
--bolt-session-inactivity-timeout
flagNew hidden flag
--scheduler
which allows user to select betweenpriority_queue
andasio