-
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
*: add a sysvar to enable mutation checker #28663
*: add a sysvar to enable mutation checker #28663
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. |
@@ -952,6 +952,9 @@ type SessionVars struct { | |||
curr int8 | |||
data [2]stmtctx.StatementContext | |||
} | |||
|
|||
// EnableMutationChecker indicates whether to check data consistency for mutations | |||
EnableMutationChecker bool |
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.
In the relaese version we may need to use some hidden http api to control the checking mechanism and users will not need to know about it.
dd0126e
to
35c4020
Compare
/run-check_dev |
Comments resolved, PTAL @cfzjywxk @MyonKeminta |
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
sessionctx/variable/tidb_vars.go
Outdated
@@ -745,6 +748,7 @@ const ( | |||
DefTMPTableSize = 16777216 | |||
DefTiDBEnableLocalTxn = false | |||
DefTiDBEnableOrderedResultMode = false | |||
DefTiDBEnableMutationChecker = true |
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 we set it false if the cluster is upgraded from an old version?
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 don't get it. Why is an upgraded cluster special?
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.
Because I'm afraid there's some risk that the user's working service be broken by false-positive checks if there's bug in our implementation (?)
@cfzjywxk How do you think
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.
For upgrading better to make the newly introduced features disabled by default, for newly created clusters, we could default enable it. It's safer to disable it by default and enable it in bootstrap stage checking specific conditions
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.
All right
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 |
This pull request has been accepted and is ready to merge. Commit hash: a47c225fbf02402a9642549daba0e2d245017162
|
Signed-off-by: ekexium <ekexium@gmail.com>
Signed-off-by: ekexium <ekexium@gmail.com>
Signed-off-by: ekexium <ekexium@gmail.com>
…sters Signed-off-by: ekexium <ekexium@gmail.com>
a47c225
to
96ef757
Compare
Merge canceled because a new commit is pushed. |
Signed-off-by: ekexium ekexium@gmail.com
What problem does this PR solve?
Issue Number: #26833
Problem Summary:
Add a system variable
tidb_enable_mutation_checker
to enable the check.What is changed and how it works?
Proposal: xxx
What's Changed:
How it Works:
Check List
Tests
Side effects
Documentation
Release note