-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
session, exectutor: Guarantee external consistency by default; Add an explicit begin statement to disable it #22597
Conversation
Signed-off-by: ekexium <[email protected]>
Signed-off-by: ekexium <[email protected]>
Signed-off-by: ekexium <[email protected]>
Signed-off-by: ekexium <[email protected]>
/run-all-tests |
Currently, there are some controversies over how to disable external consistency:
|
It's ok to guarantee external consistency by default, but there must be a system variable to control it. We need an easy way to disable it, otherwise, it's difficult to get the best performance in POC or in users' business if they know what external consistency it is. I'm fine with the syntax and users use it to remove the guarantee by themself, but I think no one will use it... |
I suggest the async commit related settings changed by the HTTP APIs can be persistent and take effect globally. Then, we needn't set the property again after restarting or adding a new instance. |
Signed-off-by: ekexium <[email protected]>
Signed-off-by: ekexium <[email protected]>
Signed-off-by: ekexium <[email protected]>
Signed-off-by: ekexium <[email protected]>
be225f3
to
b639100
Compare
/run-all-tests |
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.
Let's change the ambiguous word "external consistency" in the TiDB repo.
Signed-off-by: ekexium <[email protected]>
c1ed099
to
d6991df
Compare
@youjiali1995 PTAL |
Signed-off-by: ekexium <[email protected]>
f6c9eb5
to
044d27a
Compare
Signed-off-by: ekexium <[email protected]>
c32fe7a
to
de28dd7
Compare
Signed-off-by: ekexium <[email protected]>
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.
Rest LGTM.
So we still use the global sysvar?😃 I prefer it to HTTP API. |
I wouldn't prefer either. If we don't use sysvar, where do you suggest to put the configurations? I discussed this with @ekexium about some alternatives like watching a key in the PD's etcd. Personally, I think this solution is simpler if a hidden sysvar is acceptable because we don't need to invent a new mechanism to synchronize configs across TiDB instances. |
I mean I agree with it... |
sorry I misread the sentence "I prefer it to HTTP API"... |
Signed-off-by: ekexium <[email protected]>
Signed-off-by: ekexium <[email protected]>
/run-all-tests |
030ea9f
to
5d08138
Compare
Signed-off-by: ekexium <[email protected]>
5d08138
to
cdd3d51
Compare
/run-all-tests |
LGTM. And please resolve conflicts. |
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.
LGTM
/merge |
/run-all-tests |
What problem does this PR solve?
Problem Summary:
External consistency is not a widely known concept for many users. So we guarantee it by default, and only allow disabling it by an explicit
start transaction with causal consistency only
statement.What is changed and how it works?
What's Changed:
tidb_guarantee_external_consistency
variable fromshow variables
start transaction with causal consistency only
to start a transaction that does not require external consistencyHow it Works:
Related changes
Check List
Tests
Side effects
Release note
start transaction with causal consistency only
to start a transaction that does not require external consistency.tidb_guarantee_external_consistency
totidb_guarantee_linearizability