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

merge-sort step cannot be cancelled if some routine failed and might oom #48367

Closed
D3Hunter opened this issue Nov 7, 2023 · 0 comments · Fixed by #48341
Closed

merge-sort step cannot be cancelled if some routine failed and might oom #48367

D3Hunter opened this issue Nov 7, 2023 · 0 comments · Fixed by #48341
Labels
affects-7.5 component/ddl This issue is related to DDL of TiDB. severity/major type/bug The issue is confirmed as a bug.

Comments

@D3Hunter
Copy link
Contributor

D3Hunter commented Nov 7, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

merge-sort step cannot be cancelled if some routine failed, we need use WithContext to create err-group

var eg errgroup.Group

currently we calculate writer mem-limit using half of machine memory, we need limit it by concurrency

memTotal, err := memory.MemTotal()
if err != nil {
return err
}
memSize := (memTotal / 2) / uint64(len(dataFilesSlice))

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

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

@D3Hunter D3Hunter added type/bug The issue is confirmed as a bug. component/ddl This issue is related to DDL of TiDB. affects-7.5 severity/major labels Nov 7, 2023
@ti-chi-bot ti-chi-bot bot added 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 Nov 7, 2023
@D3Hunter D3Hunter removed 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 Nov 7, 2023
@D3Hunter D3Hunter changed the title merge-sort step can be cancelled if some routine failed and might oom merge-sort step cannot be cancelled if some routine failed and might oom Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.5 component/ddl This issue is related to DDL of TiDB. severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant