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

subtask is taken as scheduled away mistakenly, cause it rerun #50818

Closed
D3Hunter opened this issue Jan 30, 2024 · 0 comments · Fixed by #50821
Closed

subtask is taken as scheduled away mistakenly, cause it rerun #50818

D3Hunter opened this issue Jan 30, 2024 · 0 comments · Fixed by #50821
Labels
component/ddl This issue is related to DDL of TiDB. severity/moderate type/bug The issue is confirmed as a bug.

Comments

@D3Hunter
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  • checkBalanceSubtask routine runs GetSubtasksByExecIDAndStepAndStates
  • outer runSubtask finishes and cancel check-context
  • and trigger this query returns incorrect result when context done in the middle #50089, so GetSubtasksByExecIDAndStepAndStates returns no error and no result.
  • subtask taken as schedule away and cancel run-step-context, and rerun
[2024/01/29 19:01:49.509 +00:00] [Info] [task_executor.go:121] ["subtask is scheduled away, cancel running"] [task-id=1] [task-type=ImportInto]

but the subtask is not balanced in this time period

[2024/01/29 19:10:35.198 +00:00] [INFO] [balancer.go:203] [\"balance subtasks\"] [subtasks=\"[\\\"Subtask[ID=684, Step=5, Type=ImportInto, TaskID=1, State=pending, ExecID=tc-tidb-7.tc-tidb-peer.testbed-global-40t-gcp-tps-6390392-1-944.svc:4000]\\\"]\"]"
[2024/01/29 19:02:57.531 +00:00] [INFO] [balancer.go:203] [\"balance subtasks\"] [subtasks=\"[\\\"Subtask[ID=684, Step=5, Type=ImportInto, TaskID=1, State=pending, ExecID=tc-tidb-10.tc-tidb-peer.testbed-global-40t-gcp-tps-6390392-1-944.svc:4000]\\\"]\"]"
[2024/01/29 18:53:28.281 +00:00] [INFO] [balancer.go:203] [\"balance subtasks\"] [subtasks=\"[\\\"Subtask[ID=684, Step=5, Type=ImportInto, TaskID=1, State=pending, ExecID=tc-tidb-0.tc-tidb-peer.testbed-global-40t-gcp-tps-6390392-1-944.svc:4000]\\\"]\"]"

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

subtask run once

3. What did you see instead (Required)

run twice

4. What is your TiDB version? (Required)

master

@D3Hunter D3Hunter added type/bug The issue is confirmed as a bug. severity/moderate component/ddl This issue is related to DDL of TiDB. labels Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/ddl This issue is related to DDL of TiDB. severity/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant