刚才复现了下那个index 的问题
在上游执行了修改字段的操作
alter table sbtest1 modify column pad varchar(90); 从varchar 100 到 varchar90
tidb-server 日志输出如下
[2021/07/29 17:43:50.585 +08:00] [ERROR] [conn.go:801] ["connection running loop panic"] [conn=1771] [lastSQL="DELETE FROM `oom`.`sbtest1` WHERE `id` = 280594 LIMIT 1;"] [err="runtime error: index out of range [7] with length 7"] [stack="goroutine 3234053 [running]:\
github.com/pingcap/tidb/server.(*clientConn).Run.func1(0x3bea358, 0xc002028030, 0xc0017ce700)\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:799 +0xf5\
panic(0x352b260, 0xc000d57938)\
\t/usr/local/go/src/runtime/panic.go:965 +0x1b9\
github.com/pingcap/tidb/executor.(*ExecStmt).Exec.func1(0xc0004c7ee0, 0xc002350b10, 0xc002350af0)\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/adapter.go:332 +0x4d4\
panic(0x352b260, 0xc000d57938)\
\t/usr/local/go/src/runtime/panic.go:965 +0x1b9\
encoding/binary.littleEndian.Uint64(...)\
\t/usr/local/go/src/encoding/binary/binary.go:77\
github.com/pingcap/tidb/util/rowcodec.decodeInt(0xc001847279, 0x7, 0xc7, 0x44812)\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/rowcodec/common.go:119 +0x94\
github.com/pingcap/tidb/util/rowcodec.(*ChunkDecoder).decodeColToChunk(0xc001cc0180, 0x1, 0xc0014dbcf8, 0xc001847279, 0x7, 0xc7, 0xc001564b90, 0x0, 0x0)\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/rowcodec/decoder.go:275 +0x113\
github.com/pingcap/tidb/util/rowcodec.(*ChunkDecoder).DecodeToChunk(0xc001cc0180, 0xc001847260, 0xd6, 0xe0, 0x3c165c8, 0xc001700d38, 0xc001564b90, 0x8, 0x8)\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/rowcodec/decoder.go:216 +0x2e5\
github.com/pingcap/tidb/executor.DecodeRowValToChunk(0x3c29b90, 0xc0011e5400, 0xc001564a00, 0xc001c3ef00, 0x3c165c8, 0xc001700d38, 0xc001847260, 0xd6, 0xe0, 0xc001564b90, ...)\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/point_get.go:495 +0x8e\
github.com/pingcap/tidb/executor.(*PointGetExecutor).Next(0xc001d09380, 0x3bea358, 0xc0021efec0, 0xc001564b90, 0xc001700e60, 0xc001700e50)\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/point_get.go:285 +0x553\
github.com/pingcap/tidb/executor.Next(0x3bea358, 0xc0021efec0, 0x3bee718, 0xc001d09380, 0xc001564b90, 0x0, 0x0)\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/executor.go:286 +0x2de\
github.com/pingcap/tidb/executor.(*DeleteExec).deleteSingleTableByChunk(0xc000c9b4a0, 0x3bea358, 0xc0021efec0, 0x0, 0x29205895130200)\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/delete.go:94 +0x5ca\
github.com/pingcap/tidb/executor.(*DeleteExec).Next(0xc000c9b4a0, 0x3bea358, 0xc0021efec0, 0xc001564b40, 0x0, 0xc002350720)\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/delete.go:50 +0x92\
github.com/pingcap/tidb/executor.Next(0x3bea358, 0xc0021efec0, 0x3bee118, 0xc000c9b4a0, 0xc001564b40, 0x0, 0x0)\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/executor.go:286 +0x2de\
github.com/pingcap/tidb/executor.(*ExecStmt).handleNoDelayExecutor(0xc0004c7ee0, 0x3bea358, 0xc0021efec0, 0x3bee118, 0xc000c9b4a0, 0x0, 0x0, 0x0, 0x0)\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/adapter.go:589 +0x2e7\
github.com/pingcap/tidb/executor.(*ExecStmt).handleNoDelay(0xc0004c7ee0, 0x3bea358, 0xc0021efec0, 0x3bee118, 0xc000c9b4a0, 0x5782800, 0x3bea301, 0x0, 0x0, 0x0, ...)\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/adapter.go:470 +0x1e5\
github.com/pingcap/tidb/executor.(*ExecStmt).Exec(0xc0004c7ee0, 0x3bea358, 0xc0021efec0, 0x0, 0x0, 0x0, 0x0)\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/adapter.go:419 +0x707\
github.com/pingcap/tidb/session.runStmt(0x3bea358, 0xc0021efbf0, 0xc0011e5400, 0x3c00298, 0xc0004c7ee0, 0x0, 0x0, 0x0, 0x0)\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/session/ses"]
ticdc 日志如下
[ERROR] [mysql.go:1045] ["execute DMLs failed"] [err="[CDC:ErrMySQLTxnError]sql: database is closed"]
[2021/07/29 17:44:12.031 +08:00] [INFO] [mysql.go:645] ["mysql sink receives redundant error"] [error="[CDC:ErrMySQLTxnError]sql: database is closed"] [errorVerbose="[CDC:ErrMySQLTxnError]sql: database is closed\
github.com/pingcap/errors.AddStack\
\tgithub.com/pingcap/errors@v0.11.5-0.20201126102027-b0a155152ca3/errors.go:174\
github.com/pingcap/errors.(*Error).GenWithStackByCause\
\tgithub.com/pingcap/errors@v0.11.5-0.20201126102027-b0a155152ca3/normalize.go:279\
github.com/pingcap/ticdc/pkg/errors.WrapError\
\tgithub.com/pingcap/ticdc/pkg/errors/helper.go:28\
github.com/pingcap/ticdc/cdc/sink.(*mysqlSink).execDMLWithMaxRetries.func2.3\
\tgithub.com/pingcap/ticdc/cdc/sink/mysql.go:896\
github.com/pingcap/ticdc/cdc/sink.(*Statistics).RecordBatchExecution\
\tgithub.com/pingcap/ticdc/cdc/sink/statistics.go:99\
github.com/pingcap/ticdc/cdc/sink.(*mysqlSink).execDMLWithMaxRetries.func2\
\tgithub.com/pingcap/ticdc/cdc/sink/mysql.go:893\
github.com/pingcap/ticdc/pkg/retry.Run.func1\
\tgithub.com/pingcap/ticdc/pkg/retry/retry.go:32\
github.com/cenkalti/backoff.RetryNotify\
\tgithub.com/cenkalti/backoff@v2.2.1+incompatible/retry.go:37\
github.com/cenkalti/backoff.Retry\
\tgithub.com/cenkalti/backoff@v2.2.1+incompatible/retry.go:24\
github.com/pingcap/ticdc/pkg/retry.Run\
\tgithub.com/pingcap/ticdc/pkg/retry/retry.go:31\
github.com/pingcap/ticdc/cdc/sink.(*mysqlSink).execDMLWithMaxRetries\
\tgithub.com/pingcap/ticdc/cdc/sink/mysql.go:885\
github.com/pingcap/ticdc/cdc/sink.(*mysqlSink).execDMLs\
\tgithub.com/pingcap/ticdc/cdc/sink/mysql.go:1044\
github.com/pingcap/ticdc/cdc/sink.(*mysqlSinkWorker).run.func3\
\tgithub.com/pingcap/ticdc/cdc/sink/mysql.go:799\
github.com/pingcap/ticdc/cdc/sink.(*mysqlSinkWorker).run\
\tgithub.com/pingcap/ticdc/cdc/sink/mysql.go:837\
github.com/pingcap/ticdc/cdc/sink.(*mysqlSink).createSinkWorkers.func1\
\tgithub.com/pingcap/ticdc/cdc/sink/mysql.go:640\
runtime.goexit\
\truntime/asm_amd64.s:1371"]
请问以上信息是否能判断出问题在哪。这个环境是新搭建的,我测试了一些删除数据的没啥问题。具体拓扑见
在delete 数据的时候没问题,然后做字段有损变更就遇到上面的问题了 。