-
Notifications
You must be signed in to change notification settings - Fork 357
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
Scheduler: Add common struct and implementation #4952
base: master
Are you sure you want to change the base?
Conversation
|
||
/// All schedulers should have access to the common context for shared | ||
/// implementation. | ||
fn scheduling_common_mut(&mut self) -> &mut SchedulingCommon<Tx>; |
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.
here so above fn can have shared implementation.
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
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.
Overall, LGTM.
I tried to go through each function moved into common to see any subtle differences in implementation, but it would be easy to miss something. Called out one potential change we could make.
Is there any behavior change in the implementation of any of the common functions that you think warrants more intense scrutiny?
pub fn take_batch( | ||
&mut self, | ||
thread_id: ThreadId, | ||
target_num_transactions_per_batch: usize, |
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.
should target_num_transactions_per_batch
become part of the common struct so we don't have to pass it through the send functions?
403fa1a
to
deb6390
Compare
Problem
PrioGraphScheduler
andGreedyScheduler
have quite a bit of duplicate fields and codeSummary of Changes
scheduler_common.rs
to host common data and functionsFixes #