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
add descriptions for two system variables #9896
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
system-variables.md
Outdated
- Persists to cluster: Yes | ||
- Type: Boolean | ||
- Default value: `OFF` | ||
- This variable controls whether the calculated commit ts would be used for async commit. By default the two phase committer would request a new ts from the pd server and use it as the commit ts, and linearizability is guaranteed for all the concurrent transactions. This ts fetching cost could be saved if this variable is set to 'ON' which means the calculated commit is used, the cost is that causal consistency could not be guaranteed but not linearizability, more details could be referenced in this [document](https://en.pingcap.com/blog/async-commit-the-accelerator-for-transaction-commit-in-tidb-5-0/). If the usage scenario requires only causal consistency, this vairable could be set to 'ON' to improve performance. |
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.
Perhaps the description is not very accurate. When tidb_guarantee_linearizability
is ON
, the new ts from tso may not be the commit ts. It can still be smaller than the max read ts.
So, the more accurate way is to say whether a new ts from the pd server is used to calculate the final commit ts.
system-variables.md
Outdated
- Scope: SESSION | ||
- Persists to cluster: No | ||
- Type: String | ||
- This variable is used to get the last transaction info within the current session. The information includes: |
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.
Shall we put it clearly that it's a read-only system variable?
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
@songrijie PTAL |
system-variables.md
Outdated
- Persists to cluster: Yes | ||
- Type: Boolean | ||
- Default value: `OFF` | ||
- This variable controls the way commit ts is calculated for async commit. By default the two phase committer would request a new ts from the pd server and use it to calculate the final commit ts, and linearizability is then guaranteed for all the concurrent transactions. This ts fetching from the pd server could be saved if this variable is set to 'ON', the cost is that only causal consistency could be guaranteed but not linearizability, more details could be referenced in this [document](https://en.pingcap.com/blog/async-commit-the-accelerator-for-transaction-commit-in-tidb-5-0/). If the usage scenario requires only causal consistency, this vairable could be set to 'ON' to improve performance. |
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.
If we set this variable to ON, is the new TS fetched from PD used as the final commit TS?
- This variable controls the way commit ts is calculated for async commit. By default the two phase committer would request a new ts from the pd server and use it to calculate the final commit ts, and linearizability is then guaranteed for all the concurrent transactions. This ts fetching from the pd server could be saved if this variable is set to 'ON', the cost is that only causal consistency could be guaranteed but not linearizability, more details could be referenced in this [document](https://en.pingcap.com/blog/async-commit-the-accelerator-for-transaction-commit-in-tidb-5-0/). If the usage scenario requires only causal consistency, this vairable could be set to 'ON' to improve performance. | |
- This variable controls the way commit TS is calculated for async commit. By default (with the `OFF` value), the two-phase commit requests a new TS from the PD server and uses the TS to calculate the final commit TS. In this situation, linearizability is guaranteed for all the concurrent transactions. | |
- If you set this variable to `ON`, the TS fetched from the PD server is saved, with the cost that only causal consistency is guaranteed but not linearizability. For more details, see the blog post [Async Commit, the Accelerator for Transaction Commit in TiDB 5.0](https://en.pingcap.com/blog/async-commit-the-accelerator-for-transaction-commit-in-tidb-5-0/). | |
+ For scenarios that require only causal consistency, you can set this variable to `ON` to improve performance. |
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.
The new TS fetched from pd would be used to calculate the final commit TS, it may or may not be the final commit TS.
system-variables.md
Outdated
- Scope: SESSION | ||
- Persists to cluster: No | ||
- Type: String | ||
- This variable is used to get the last transaction info within the current session, it's a read-only variable. The transaction information includes: |
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.
So users can do nothing with it, right?
- This variable is used to get the last transaction info within the current session, it's a read-only variable. The transaction information includes: | |
- This variable is used to get the last transaction information within the current session. it is a read-only variable. The transaction information includes: |
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.
/hold |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: dea3fbc
|
LGTM |
In response to a cherrypick label: new pull request created: #9956. |
In response to a cherrypick label: new pull request created: #10837. |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
First-time contributors' checklist
What is changed, added or deleted? (Required)
Which TiDB version(s) do your changes apply to? (Required)
These two variables could be applied to all the release versions below.
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?