-
Notifications
You must be signed in to change notification settings - Fork 131
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
skip the "cancled" ddl in ddl history #1229
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. |
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.
Could you please help add a unit test in TestNewSyncer
function? Thanks a lot!
drainer/syncer.go
Outdated
log.Info("skip ddl due to the failed ddl", zap.String("sql", sql), zap.Int64("commit ts", commitTS)) | ||
shouldSkip = true | ||
} else if s.cfg.SyncDDL { | ||
schema, table, err = s.schema.getSchemaTableAndDelete(b.job.BinlogInfo.SchemaVersion) |
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 we can't skip this step when s.cfg.SyncDDL == false
. The version2SchemaTable
map will keep increasing and cause an oom issue. What's more, schema, table
info will be needed when we do the following steps.
drainer/syncer.go
Outdated
|
||
if b.job.BinlogInfo.SchemaVersion == 0 { | ||
log.Info("skip ddl due to the failed ddl", zap.String("sql", sql), zap.Int64("commit ts", commitTS)) | ||
shouldSkip = 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.
I think just skipping this kind of jobs and then append fake binlogs is okay.
shouldSkip = true | |
appendFakeBinlogIfNeeded(nil, commitTS) | |
continue |
ptal again ~ @lichunzhu |
/merge |
@okJiang: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
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: 32c6f7b
|
/cherry-pick release-7.1 |
@okJiang: new pull request created to branch In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
@okJiang: new pull request could not be created: failed to create pull request against pingcap/tidb-binlog#release-7.1 from head ti-chi-bot:cherry-pick-1229-to-release-7.1: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for ti-chi-bot:cherry-pick-1229-to-release-7.1."}],"documentation_url":"https://docs.github.com/rest/reference/pulls#create-a-pull-request"} In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
/cherry-pick release-6.5 |
@okJiang: new pull request created to branch In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
What problem does this PR solve?
Issue Number: close #1228
What is changed and how it works?
as title
Check List
Tests
Code changes
Side effects
Related changes
tidb-ansible
repositoryRelease note