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

import into: some subtask keeps running when task cancelled #45048

Closed
D3Hunter opened this issue Jun 29, 2023 · 0 comments · Fixed by #45049 or #45080
Closed

import into: some subtask keeps running when task cancelled #45048

D3Hunter opened this issue Jun 29, 2023 · 0 comments · Fixed by #45049 or #45080
Labels
affects-7.2 component/lightning This issue is related to Lightning of TiDB. feature/developing the related feature is in development severity/major type/bug This issue is a bug.

Comments

@D3Hunter
Copy link
Contributor

D3Hunter commented Jun 29, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  • start task, and some node disk usage exceed disk quota and begin importing to TiKV while there're still some minimal task of some engine doing sort
  • cancel task or task is failed due to some error
  • the node which triggers disk quota keeps running until all engines imported, then it will cancel other subtasks

since we're using a background ctx when checking disk quota, it will block other chunk sorting routines so cleanUpEnv will not be called. see stack.log

s.importCtx, s.importCancel = context.WithCancel(context.Background())
s.wg.Add(1)
go func() {
defer s.wg.Done()
s.tableImporter.CheckDiskQuota(s.importCtx)

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

subtask cancelled fast

3. What did you see instead (Required)

subtask keeps running for more than 1 hour.

4. What is your TiDB version? (Required)

@D3Hunter D3Hunter added type/bug This issue is a bug. affects-7.2 labels Jun 29, 2023
@jebter jebter added severity/major component/lightning This issue is related to Lightning of TiDB. feature/developing the related feature is in development labels Jun 29, 2023
@ti-chi-bot ti-chi-bot bot added may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 labels Jun 29, 2023
@D3Hunter D3Hunter removed may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 labels Jun 29, 2023
ti-chi-bot bot pushed a commit that referenced this issue Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.2 component/lightning This issue is related to Lightning of TiDB. feature/developing the related feature is in development severity/major type/bug This issue is a bug.
Projects
None yet
2 participants