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

Global sort IMPORT INTO stuck after region size is larger than 96MB #55374

Closed
Lily2025 opened this issue Aug 13, 2024 · 5 comments · Fixed by #55759
Closed

Global sort IMPORT INTO stuck after region size is larger than 96MB #55374

Lily2025 opened this issue Aug 13, 2024 · 5 comments · Fixed by #55759
Assignees
Labels
affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.3 component/ddl This issue is related to DDL of TiDB. severity/critical type/bug The issue is confirmed as a bug.

Comments

@Lily2025
Copy link

Lily2025 commented Aug 13, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

1、tidb_enable_dist_task='on' and enable global sort
2、run import into

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

import into can success

3. What did you see instead (Required)

import into blocked

img_v3_02dn_fa67a709-910a-4240-8090-d52d4496f07g

the status of import job is not finished after 2h0m0s (now: 2024-08-12 23:45:55, jobId: 60004, step: importing, status: running)
operatorLogs:
[2024-08-12 21:45:54] ###### start import into
import into user_data1 from 's3://qe-testing/brie/lightning-mhy-100G-csv/sysbench.user_data1.000001*.csv?access-key=xxxxxx&secret-access-key=xxxxxx&endpoint=http%3a%2f%2fks3-cn-beijing-internal.ksyuncs.com&force-path-style=false&region=Beijing&provider=ks' WITH DETACHED,thread=16,skip_rows=1
[2024-08-12 21:45:54] ###### wait for import job to finish
[2024-08-12 23:45:55] ###### wait for import job to finish timeout (2h0m0s)
select id, table_schema, table_name, step, status,parameters from mysql.tidb_import_jobs where start_time >= '2024-08-12 21:45:54' and table_schema = 'importtest1' and table_name = 'user_data1'
jobId: 60004, table_schema: importtest1, table_name: user_data1, step: importing, status: running

4. What is your TiDB version? (Required)

./tidb-server -V
Release Version: v8.3.0-alpha
Edition: Community
Git Commit Hash: 6df7aba
Git Branch: heads/refs/tags/v8.3.0-alpha
UTC Build Time: 2024-08-10 11:52:15
GoVersion: go1.21.10
Race Enabled: false
Check Table Before Drop: false
Store: unistore
2024-08-12T21:45:47.369+0800

@Lily2025 Lily2025 added the type/bug The issue is confirmed as a bug. label Aug 13, 2024
@Lily2025 Lily2025 changed the title import into blocked after injection one import into blocked after injection one of tikv network partition Aug 13, 2024
@Lily2025
Copy link
Author

/assign D3Hunter
/severity critical

@D3Hunter
Copy link
Contributor

duplicate with #51734

@lance6716 lance6716 changed the title import into blocked after injection one of tikv network partition Global sort IMPORT INTO stuck after region size is larger than 96MB Aug 13, 2024
@lance6716 lance6716 reopened this Aug 13, 2024
@lance6716
Copy link
Contributor

The reason is tikv's default region size is larger than 96MB after tikv/tikv#17311, and we hardcoded some calculations which assume the region size.

f3366cfe-c61e-402a-b54c-49733dec5cbf

So IMPORT INTO generates large tasks and can't allocate the memory for it.

ti-chi-bot bot pushed a commit to tikv/pd that referenced this issue Aug 16, 2024
…)" (#8541)

ref pingcap/tidb#55374

Revert the changes on the configuration of region-size. These changes will be delayed until v8.4.

Signed-off-by: lucasliang <[email protected]>
ti-chi-bot bot added a commit to tikv/tikv that referenced this issue Aug 16, 2024
ref pingcap/tidb#55374

Revert the changes on the configuration of region-size. These changes will be delayed until v8.4

Signed-off-by: lucasliang <[email protected]>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
@lance6716 lance6716 added the affects-8.1 This bug affects the 8.1.x(LTS) versions. label Nov 14, 2024
@lance6716
Copy link
Contributor

Mark affects-8.1 because user may manually changed the region parameters in old versions

@lance6716
Copy link
Contributor

close it because cherry-pick to 8.1.2 is done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.3 component/ddl This issue is related to DDL of TiDB. severity/critical type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants