Skip to content
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 tiflash job. (#941) #942

Merged
merged 4 commits into from
Apr 4, 2020

Conversation

sre-bot
Copy link

@sre-bot sre-bot commented Apr 3, 2020

cherry-pick #941 to release-3.1


What problem does this PR solve?

Fix abort when there'a model.ActionUpdateTiFlashReplicaStatus job caused the job.Query is empty:

return "", "", "", errors.Errorf("[ddl job sql miss]%+v", job)

[ddl job sql miss]ID:85, Type:update tiflash replica status, State:synced, SchemaState:public, SchemaID:45, TableID:62, RowCount:0, ArgLen:0, start time: 2020-04-01 10:52:07.845 +0800 CST, Err:<nil>, ErrCount:0, SnapshotVersion:0"] [errorVerbose="[ddl job sql miss]I      D:85, Type:update tiflash replica status, State:synced, SchemaState:public, SchemaID:45, TableID:62, RowCount:0, ArgLen:0, start time: 2020-04-01 10:52:07.845 +0800 CST, Err:<nil>, ErrCount:0, SnapshotVersion:0\ngithub.com/pingcap/tidb-binlog/drainer.(*Schema).handl      eDDL\n\t/home/jenkins/agent/workspace/release_tidb_4.0/go/src/github.com/pingcap/tidb-binlo

What is changed and how it works?

Skip the tiflash job.

Check List

Tests

  • Manual test (add detailed scripts or steps below)
    test:
  1. create table t(id int);
  2. ALTER TABLE t SET TIFLASH REPLICA 3 LOCATION LABELS "rack", "host", "abc"; // model.ActionSetTiFlashReplica
  3. curl -X POST -d '{"id":45,"region_count":3,"flash_region_count":3}' https://127.0.0.1:10080/tiflash/replica // model.ActionUpdateTiFlashReplicaStatus
  4. performance write on table t and check can still replicate.

ref: pingcap/tidb#12453

  • No code

Related changes

  • Need to cherry-pick to the release branch

  • Need to be included in the release note

    • Skip TiFlash relate DDL job to avoid replication abort.

test:
1. create table t(id int);
2. ALTER TABLE t SET TIFLASH REPLICA 3 LOCATION LABELS "rack", "host", "abc";            // model.ActionSetTiFlashReplica
3. curl -X POST -d '{"id":45,"region_count":3,"flash_region_count":3}' https://127.0.0.1:10080/tiflash/replica  // model.ActionUpdateTiFlashReplicaStatus
4. performance write on table t and check can still replicate.

ref: pingcap/tidb#12453
@july2993
Copy link
Contributor

july2993 commented Apr 3, 2020

/run-all-tests

@IANTHEREAL IANTHEREAL merged commit 553b0ac into pingcap:release-3.1 Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants