-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
txn: remove scheduler #4098
txn: remove scheduler #4098
Conversation
Signed-off-by: siddontang <siddontang@gmail.com>
Signed-off-by: qupeng <qupeng@pingcap.com>
Please provide some bench results. |
Signed-off-by: qupeng <qupeng@pingcap.com>
Signed-off-by: qupeng <qupeng@pingcap.com>
/test |
Signed-off-by: qupeng <qupeng@pingcap.com>
Signed-off-by: qupeng <qupeng@pingcap.com>
Signed-off-by: qupeng <qupeng@pingcap.com>
/release |
Signed-off-by: qupeng <qupeng@pingcap.com>
Signed-off-by: qupeng <qupeng@pingcap.com>
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
|
||
fn dequeue_task(&self, cid: u64) -> Task { | ||
let mut tasks = self.task_contexts[id_index(cid)].lock().unwrap(); | ||
let task = tasks.get_mut(&cid).unwrap().task.take().unwrap(); |
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.
I think use remove
directly is more clear.
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.
There is an Option<Task>
in TaskContext
. When getting a snapshot we need to get the inner Task
but leave the TaskContext
.
} | ||
} | ||
|
||
fn dequeue_task_context(&self, cid: u64) -> TaskContext { |
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.
Seems duplicate with dequeue_task?
Signed-off-by: qupeng <qupeng@pingcap.com>
Signed-off-by: qupeng <qupeng@pingcap.com>
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
Signed-off-by: qupeng <qupeng@pingcap.com>
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
Signed-off-by: qupeng <qupeng@pingcap.com>
Signed-off-by: qupeng <qupeng@pingcap.com>
What have you changed? (mandatory)
Reomve scheduler thread. So in the current implement introduced by this PR, callers dispatch messages to schedule-worker directly instead of scheduler first.
What are the type of the changes? (mandatory)
Improvement.
How has this PR been tested? (mandatory)
Unit tests and integration tests.
Does this PR affect documentation (docs) update? (mandatory)
No.
Does this PR affect tidb-ansible update? (mandatory)
No.