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

multi-schema-change ADD INDEX may be blocked #53791

Closed
lance6716 opened this issue Jun 4, 2024 · 1 comment · Fixed by #53916
Closed

multi-schema-change ADD INDEX may be blocked #53791

lance6716 opened this issue Jun 4, 2024 · 1 comment · Fixed by #53916
Assignees
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. component/ddl This issue is related to DDL of TiDB. severity/major type/bug The issue is confirmed as a bug.

Comments

@lance6716
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

diff --git a/pkg/ddl/ingest/env.go b/pkg/ddl/ingest/env.go
index c74d7f69fa..1c014b4f29 100644
--- a/pkg/ddl/ingest/env.go
+++ b/pkg/ddl/ingest/env.go
@@ -19,6 +19,7 @@ import (
        "path/filepath"
        "strconv"

+       "github.com/pingcap/failpoint"
        "github.com/pingcap/tidb/pkg/config"
        "github.com/pingcap/tidb/pkg/ddl/logutil"
        "github.com/pingcap/tidb/pkg/lightning/log"
@@ -68,6 +69,10 @@ func InitGlobalLightningEnv(filterProcessingJobIDs FilterProcessingJobIDsFunc) {
        } else {
                memTotal = memTotal / 2
        }
+       failpoint.Inject("setMemTotalInMB", func(val failpoint.Value) {
+               i := val.(int)
+               memTotal = uint64(i) * size.MB
+       })
        LitBackCtxMgr = NewLitBackendCtxMgr(sortPath, memTotal, filterProcessingJobIDs)
        litRLimit = util.GenRLimit("ddl-ingest")
        LitInitialized = true
$ GO_FAILPOINTS="github.com/pingcap/tidb/pkg/ddl/ingest/setMemTotalInMB=return(1100)" bin/tidb-server -store tikv -path 127.0.0.1:2379 -log-file /tmp/tidb.log
mysql> create table t (c int, c2 int, c3 int, c4 int);
Query OK, 0 rows affected (0.05 sec)

mysql> insert into t values (1,1,1,1), (2,2,2,2), (3,3,3,3);
Query OK, 3 rows affected (0.00 sec)
Records: 3  Duplicates: 0  Warnings: 0

mysql> alter table t add index i(c), add index i2(c2);

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

fail or success

3. What did you see instead (Required)

blocked

4. What is your TiDB version? (Required)

@lance6716 lance6716 added the type/bug The issue is confirmed as a bug. label Jun 4, 2024
@lance6716
Copy link
Contributor Author

tidb-test.log

there are errors in stdout/err

{"level":"warn","ts":"2024-06-04T14:23:03.321545+0800","logger":"etcd-client","caller":"[email protected]/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0x1400b222a80/","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: last connection error: connection error: desc = \"transport: Error while dialing: dial tcp: missing address\""}
{"level":"warn","ts":"2024-06-04T14:23:09.32308+0800","logger":"etcd-client","caller":"[email protected]/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0x1400b222a80/","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: last connection error: connection error: desc = \"transport: Error while dialing: dial tcp: missing address\""}
{"level":"warn","ts":"2024-06-04T14:23:15.323772+0800","logger":"etcd-client","caller":"[email protected]/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0x1400b222a80/","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: last connection error: connection error: desc = \"transport: Error while dialing: dial tcp: missing address\""}

@jebter jebter added the component/ddl This issue is related to DDL of TiDB. label Jun 4, 2024
@tangenta tangenta self-assigned this Jun 7, 2024
@tangenta tangenta added affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. and removed may-affects-8.1 labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. 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.

3 participants