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

TiFlash stop to replicate data #17900

Closed
crazycs520 opened this issue Jun 10, 2020 · 0 comments · Fixed by #17872
Closed

TiFlash stop to replicate data #17900

crazycs520 opened this issue Jun 10, 2020 · 0 comments · Fixed by #17872
Assignees
Labels
severity/major type/bug The issue is confirmed as a bug.

Comments

@crazycs520
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Fix https://asktug.com/t/topic/35126/15

This Buf will affect the TiFlash data replicate.

Reproduce:

  1. mock delay in TiDB as below:
 func onCreateSchema(d *ddlCtx, t *meta.Meta, job *model.Job) (ver int64, _ error) {
@@ -156,6 +158,8 @@ func onDropSchema(t *meta.Meta, job *model.Job) (ver int64, _ error) {
                dbInfo.State = model.StateWriteOnly
                err = t.UpdateDatabase(dbInfo)
        case model.StateWriteOnly:
+               fmt.Printf("---owner wait--------\n\n")
+               time.Sleep(10 * time.Second)


@@ -43,6 +44,8 @@ func (b *Builder) ApplyDiff(m *meta.Meta, diff *model.SchemaDiff) ([]int64, erro
        if diff.Type == model.ActionCreateSchema {
                return nil, b.applyCreateSchema(m, diff)
        } else if diff.Type == model.ActionDropSchema {
+               fmt.Printf("-----------apply wait")
+               time.Sleep(time.Second * 10)
  1. execute drop database test in sessino1;
  2. wait 1 second after step 2, execute drop table t in session 2
  3. execute in shell: curl "http://$IP:10080/tiflash/replica" then will got below error:
(Schema ID 52).(Table ID 53) doesn't exist.

Since curl "http://$IP:10080/tiflash/replica" failed, it will cause the TiFlash stop to replicate data.

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. Affected version (Required)

v4.0.0

5. Root Cause Analysis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants