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
pessimistic-txn: eliminate CleanUpWaitFor
when waiter timeouts
#5157
pessimistic-txn: eliminate CleanUpWaitFor
when waiter timeouts
#5157
Conversation
Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
LGTM |
@@ -322,6 +322,7 @@ fn run_raft_server(pd_client: RpcClient, cfg: &TiKvConfig, security_mgr: Arc<Sec | |||
pd_client, | |||
resolver, | |||
cfg.pessimistic_txn.monitor_membership_interval, | |||
cfg.pessimistic_txn.wait_for_lock_timeout, |
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'm afraid there might be too many arguments. May it be better if we pass the whole cfg.pessimistic_txn
?
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.
Yes. I will file a PR to pass &cfg.pessimistic_txn
to WaiterManger
and Detector
.
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
) -> Self { | ||
Self { | ||
store_id, | ||
leader_info: None, | ||
leader_client: None, | ||
// TODO: make it configurable. | ||
detect_table: Rc::new(RefCell::new(DetectTable::new(time::Duration::from_secs(3)))), | ||
detect_table: Rc::new(RefCell::new(DetectTable::new(time::Duration::from_millis( |
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 we can remove the Rc in another PR.
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
…v#5157) Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
…v#5157) Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
Signed-off-by: youjiali1995 zlwgx1023@gmail.com
What have you changed? (mandatory)
Use
wait-for-lock-timeout
as the TTL of the detect table. So when waiter timeouts, there is no need to send 'CleanUpWaitFor` request to the deadlock detector.What are the type of the changes? (mandatory)