-
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
domain: avoid check schema changed when change is tiflash replica status #13034
Conversation
Codecov Report
@@ Coverage Diff @@
## master #13034 +/- ##
===========================================
Coverage 80.1514% 80.1514%
===========================================
Files 468 468
Lines 111177 111177
===========================================
Hits 89110 89110
Misses 15241 15241
Partials 6826 6826 |
domain/domain.go
Outdated
@@ -254,6 +254,9 @@ func (do *Domain) tryLoadSchemaDiffs(m *meta.Meta, usedVersion, newVersion int64 | |||
if err != nil { | |||
return false, nil, err | |||
} | |||
if diff.Type == model.ActionUpdateTiFlashReplicaStatus || diff.Type == model.ActionSetTiFlashReplica { |
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.
Since we may add more skippable types, how about adding a function like skippableSchemaCheckTypes(diff.Type)
?
/run-all-tests |
/run-mybatis-test |
/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.
Rest LGTM
tblIDs = append(tblIDs, ids...) | ||
} | ||
builder.Build() | ||
return true, tblIDs, nil | ||
} | ||
|
||
func canSkipSchemaCheckerDDL(tp model.ActionType) bool { | ||
switch tp { | ||
case model.ActionUpdateTiFlashReplicaStatus, model.ActionSetTiFlashReplica: |
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.
By now two options here, how about use if A||B? maybe fast.
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.
em... I prefer switch
😂
/run-unit-test |
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
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 |
Your auto merge job has been accepted, waiting for 13130, 12895, 13108, 13107, 12628, 13089, 13090 |
/run-all-tests |
…tus (pingcap#13034) Signed-off-by: crazycs <crazycs520@gmail.com>
What problem does this PR solve?
Some DDL change no need to add to
schemaChecker
.Such as:
Maybe below DDL type also no need to add to
schemaChecker
:What is changed and how it works?
Check List
Tests
Code changes
Side effects
Related changes
Release note