-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
ddl: fix bug of updating tiflash replica status ddl job been stuck. #15001
Conversation
Signed-off-by: crazycs <crazycs520@gmail.com>
/run-all-tests |
Codecov Report
@@ Coverage Diff @@
## master #15001 +/- ##
===========================================
Coverage 80.2220% 80.2220%
===========================================
Files 503 503
Lines 132410 132410
===========================================
Hits 106222 106222
Misses 17814 17814
Partials 8374 8374 |
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 is ok
@@ -748,7 +748,8 @@ func onUpdateFlashReplicaStatus(t *meta.Meta, job *model.Job) (ver int64, _ erro | |||
} | |||
if tblInfo.TiFlashReplica == nil || (tblInfo.ID == physicalID && tblInfo.TiFlashReplica.Available == available) || | |||
(tblInfo.ID != physicalID && available == tblInfo.TiFlashReplica.IsPartitionAvailable(physicalID)) { |
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 think it will return nil in UpdateTableReplicaInfo
in ddl_api.go
rather than return error in onUpdateFlashReplicaStatus
at ddl_woker.go
.
you mean for the jobs already in queue? do the double check?
Then, may be you should call the onUpdateFlashReplicaStatus
directly.
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
… into fix-update-replica
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
/run-all-tests |
/run-all-tests |
/run-unit-test |
/run-unit-test |
Signed-off-by: crazycs crazycs520@gmail.com
What problem does this PR solve?
Need
cancel DDL job
when theupdate flash replica
DDL job need to do nothing.What is changed and how it works?
Check List
Tests
Code changes
Related changes
tidb-ansible
repositoryRelease note