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

Add index causes DDL to get stuck when the temp dir does not exist #45456

Closed
tangenta opened this issue Jul 19, 2023 · 0 comments · Fixed by #45457
Closed

Add index causes DDL to get stuck when the temp dir does not exist #45456

tangenta opened this issue Jul 19, 2023 · 0 comments · Fixed by #45457
Labels
affects-7.1 affects-7.2 component/ddl This issue is related to DDL of TiDB. severity/major type/bug The issue is confirmed as a bug.

Comments

@tangenta
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. Create a TiDB cluster and bootstrap it.
  2. Remove the directory /tmp/tmp_ddl-4000.
  3. Turn on the fast add index feature: set global tidb_ddl_enable_fast_reorg = 1.
  4. Add index for an arbitrary table.

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

No error.

3. What did you see instead (Required)

DDL hangs.

[2023/07/19 09:36:45.117 +08:00] [INFO] [ddl_worker.go:981] ["run DDL job"] [worker="worker 2, tp add index"] [category=ddl] [job="ID:150, Type:add index, State:running, SchemaState:none, SchemaID:2, TableID:148, RowCount:0, ArgLen:0, start time: 2023-07-19 09:36:39.884 +0800 CST, Err:[ddl:-1]cannot get disk capacity at /tmp/tidb/tmp_ddl-4000: no such file or directory, ErrCount:5, SnapshotVersion:0, UniqueWarnings:0"]
[2023/07/19 09:36:45.118 +08:00] [INFO] [index.go:620] ["run add index job"] [category=ddl] [job="ID:150, Type:add index, State:running, SchemaState:none, SchemaID:2, TableID:148, RowCount:0, ArgLen:6, start time: 2023-07-19 09:36:39.884 +0800 CST, Err:[ddl:-1]cannot get disk capacity at /tmp/tidb/tmp_ddl-4000: no such file or directory, ErrCount:5, SnapshotVersion:0, UniqueWarnings:0"] [indexInfo="{\"id\":1,\"idx_name\":{\"O\":\"idx\",\"L\":\"idx\"},\"tbl_name\":{\"O\":\"\",\"L\":\"\"},\"idx_cols\":[{\"name\":{\"O\":\"k\",\"L\":\"k\"},\"offset\":2,\"length\":-1}],\"state\":0,\"backfill_state\":0,\"comment\":\"\",\"index_type\":1,\"is_unique\":false,\"is_primary\":false,\"is_invisible\":false,\"is_global\":false,\"mv_index\":false}"]
[2023/07/19 09:36:45.118 +08:00] [INFO] [backend_mgr.go:78] ["ingest backfill is not available"] [category=ddl-ingest] [error="cannot get disk capacity at /tmp/tidb/tmp_ddl-4000: no such file or directory"]
[2023/07/19 09:36:45.118 +08:00] [WARN] [ddl_worker.go:943] ["run DDL job error"] [worker="worker 2, tp add index"] [category=ddl] [error="cannot get disk capacity at /tmp/tidb/tmp_ddl-4000: no such file or directory"]
[2023/07/19 09:36:45.124 +08:00] [INFO] [ddl_worker.go:826] ["run DDL job failed, sleeps a while then retries it."] [worker="worker 2, tp add index"] [category=ddl] [waitTime=1s] [error="cannot get disk capacity at /tmp/tidb/tmp_ddl-4000: no such file or directory"]
[2023/07/19 09:36:46.124 +08:00] [INFO] [ddl_worker.go:1191] ["schema version doesn't change"] [category=ddl]

4. What is your TiDB version? (Required)

17cda10

@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 labels Jul 19, 2023
@tangenta tangenta 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 labels Jul 19, 2023
@jebter jebter added the component/ddl This issue is related to DDL of TiDB. label Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.1 affects-7.2 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.

2 participants