Prototype of new scheduler
Hi Alex,
scanner/engine/scheduler.h contains my prototype of the new scheduler. Please take a look and let me know if you have any comments.
Goal: Merge the experimental scheduler in this PR into master.
We would like to merge this branch into master so that it's development can occur in parallel and in sync with improvements to the systems. By merging, it will make it possible to test both variants of the scheduler side by side for performance and correctness, and enable use cases that might benefit from the nascent experimental scheduler. The current approach for enabling both schedulers side-by-side is to insert a flag when starting the master that tells it which mode to start in: the existing scheduler or the new experimental one.
Minimum requirements:
- [ ] Rebase onto current master
- [ ] Add a flag in
db.runthat switches between the schedulers - [ ] Duplicate or make compatible with the old scheduler the structs and functions that have been modified
- [ ] Create a new worker class for the experimental scheduler to keep the old one unmodified
- [ ] Add conditionals in the master to enable switching between the old strategy and the new one
I'm likely missing some TODOs. Let me know and I'll add them.
I've finished these minimum requirements:
- [x] Rebase onto current master
- [x] Add a flag in
Database()that switches between the schedulers For coding convenience, I added a flag in the constructor ofDatabase()(rather thandb.run) to switch between the schedulers. Example:db = Database(new_scheduler=True) - [x] Duplicate or make compatible with the old scheduler the structs and functions that have been modified
- [x] Create a new worker class for the experimental scheduler to keep the old one unmodified
- [x] Add conditionals in the master to enable switching between the old strategy and the new one I actually created a new master class as well in order to enable switching between two schedulers.
When new_scheduler is True, the new scheduler should behave exactly the same as what I specified in my doc.
Can you also test it from your side and let me know if any problem occurs?
Awesome! I'll do a review pass now.