-
Notifications
You must be signed in to change notification settings - Fork 702
add content about lazy uniqueness check #10414
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
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. |
constraints.md
Outdated
|
||
{{< copyable "sql" >}} | ||
In optimistic transactions, TiDB checks unique constraints [lazily](/transaction-overview.md#lazy-check-of-constraints) by default. When an optimistic transaction is committed, TiDB performs a bulk check, which helps reduce network overhead and 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.
How about "When an optimistic transaction is committed, TiDB performs a batch check on unique constraints in this transaction, which helps reduce network overhead and 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.
Can be "... by default, namely these checks are performed in the commit phase, which ..."
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.
"namely these checks are performed in the commit phase" might give the confusion that "these checks are not performed in the execution phase"?
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.
Emm you are right. Some checks could be performed in the execution phase. How about "some checks may be performed in the commit phase"?
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.
It might be hard to know what are "some check may be", how about "By default, for optimistic transactions, TiDB checks unique constraints lazily in the execution phase and strictly in the commit phase, which helps reduce network overhead and 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.
Sounds OK to me
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.
Done.
Co-authored-by: ekexium <eke@fastmail.com>
… into lazy-uniqueness-check
Co-authored-by: ekexium <eke@fastmail.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.
Rest LGTM
@@ -768,9 +768,10 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a | |||
- Persists to cluster: Yes | |||
- Type: Boolean | |||
- Default value: `OFF` |
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 off be 0?
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.
OFF
and 0 are equivalent.
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
Co-authored-by: xixirangrang <hfxsd@hotmail.com>
… into lazy-uniqueness-check
Co-authored-by: xixirangrang <hfxsd@hotmail.com>
/remove-status LGT1 |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 143a9ee
|
First-time contributors' checklist
What is changed, added or deleted? (Required)
Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions.
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?