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

Panic in mysql dml writer #1124

Open
hongyunyan opened this issue Mar 18, 2025 · 0 comments
Open

Panic in mysql dml writer #1124

hongyunyan opened this issue Mar 18, 2025 · 0 comments
Assignees
Labels
type/bug The issue is confirmed as a bug.

Comments

@hongyunyan
Copy link
Collaborator

hongyunyan commented Mar 18, 2025

What did you do?

Run the schrddl workload in serial mode

What did you expect to see?

No response

What did you see instead?

[2025/03/18 02:11:42.002 +00:00] [PANIC] [mysql_writer_dml.go:200] ["Here are two invalid rows, one is Delete A, the other is Update A to B"] [Events="[{\"version\":0,\"dispatcher_id\":{\"low\":11766953444167129355,\"high\":7287039303564457910},\"physical_table_id\":2767,\"start_ts\":456724027949187358,\"commit_ts\":456724027949187359,\"table_info_version\":456724026363215891,\"seq\":105,\"state\":0,\"length\":13,\"approximate_size\":1750,\"row_types\":\"AgICAgICAgICAgICAgICAgICAgICAgICAgI=\",\"rows\":{},\"raw_rows\":null,\"table_info\":{\"schema-id\":2767,\"table-name\":{\"Schema\":\"ddl\",\"Table\":\"ta960c56f\",\"TableID\":2767,\"IsPartition\":false}},\"replicating_ts\":456724026756956209},{\"version\":0,\"dispatcher_id\":{\"low\":11766953444167129355,\"high\":7287039303564457910},\"physical_table_id\":2767,\"start_ts\":456724027949187407,\"commit_ts\":456724027949187408,\"table_info_version\":456724026363215891,\"seq\":106,\"state\":0,\"length\":10,\"approximate_size\":1298,\"row_types\":\"AgICAgICAgICAgICAgICAgICAgI=\",\"rows\":{},\"raw_rows\":null,\"table_info\":{\"schema-id\":2767,\"table-name\":{\"Schema\":\"ddl\",\"Table\":\"ta960c56f\",\"TableID\":2767,\"IsPartition\":false}},\"replicating_ts\":456724026756956209},{\"version\":0,\"dispatcher_id\":{\"low\":11766953444167129355,\"high\":7287039303564457910},\"physical_table_id\":2767,\"start_ts\":456724027949187443,\"commit_ts\":456724027949187444,\"table_info_version\":456724026363215891,\"seq\":107,\"state\":0,\"length\":13,\"approximate_size\":1085,\"row_types\":\"AAAAAAAAAAAAAAAAAA==\",\"rows\":{},\"raw_rows\":null,\"table_info\":{\"schema-id\":2767,\"table-name\":{\"Schema\":\"ddl\",\"Table\":\"ta960c56f\",\"TableID\":2767,\"IsPartition\":false}},\"replicating_ts\":456724026756956209},{\"version\":0,\"dispatcher_id\":{\"low\":11766953444167129355,\"high\":7287039303564457910},\"physical_table_id\":2767,\"start_ts\":456724027949187577,\"commit_ts\":456724027949187578,\"table_info_version\":456724026363215891,\"seq\":109,\"state\":0,\"length\":1,\"approximate_size\":71,\"row_types\":\"AQ==\",\"rows\":{},\"raw_rows\":null,\"table_info\":{\"schema-id\":2767,\"table-name\":{\"Schema\":\"ddl\",\"Table\":\"ta960c56f\",\"TableID\":2767,\"IsPartition\":false}},\"replicating_ts\":456724026756956209},{\"version\":0,\"dispatcher_id\":{\"low\":11766953444167129355,\"high\":7287039303564457910},\"physical_table_id\":2767,\"start_ts\":456724027949187635,\"commit_ts\":456724027949187636,\"table_info_version\":456724026363215891,\"seq\":110,\"state\":0,\"length\":1,\"approximate_size\":71,\"row_types\":\"AQ==\",\"rows\":{},\"raw_rows\":null,\"table_info\":{\"schema-id\":2767,\"table-name\":{\"Schema\":\"ddl\",\"Table\":\"ta960c56f\",\"TableID\":2767,\"IsPartition\":false}},\"replicating_ts\":456724026756956209},{\"version\":0,\"dispatcher_id\":{\"low\":11766953444167129355,\"high\":7287039303564457910},\"physical_table_id\":2767,\"start_ts\":456724027962294290,\"commit_ts\":456724027962294291,\"table_info_version\":456724026363215891,\"seq\":111,\"state\":0,\"length\":2,\"approximate_size\":142,\"row_types\":\"AAA=\",\"rows\":{},\"raw_rows\":null,\"table_info\":{\"schema-id\":2767,\"table-name\":{\"Schema\":\"ddl\",\"Table\":\"ta960c56f\",\"TableID\":2767,\"IsPartition\":false}},\"replicating_ts\":456724026756956209},{\"version\":0,\"dispatcher_id\":{\"low\":11766953444167129355,\"high\":7287039303564457910},\"physical_table_id\":2767,\"start_ts\":456724027962294371,\"commit_ts\":456724027962294372,\"table_info_version\":456724026363215891,\"seq\":113,\"state\":0,\"length\":2,\"approximate_size\":260,\"row_types\":\"AQE=\",\"rows\":{},\"raw_rows\":null,\"table_info\":{\"schema-id\":2767,\"table-name\":{\"Schema\":\"ddl\",\"Table\":\"ta960c56f\",\"TableID\":2767,\"IsPartition\":false}},\"replicating_ts\":456724026756956209},{\"version\":0,\"dispatcher_id\":{\"low\":11766953444167129355,\"high\":7287039303564457910},\"physical_table_id\":2767,\"start_ts\":456724027962294620,\"commit_ts\":456724027962294621,\"table_info_version\":456724026363215891,\"seq\":119,\"state\":0,\"length\":1,\"approximate_size\":81,\"row_types\":\"AQ==\",\"rows\":{},\"raw_rows\":null,\"table_info\":{\"schema-id\":2767,\"table-name\":{\"Schema\":\"ddl\",\"Table\":\"ta960c56f\",\"TableID\":2767,\"IsPartition\":false}},\"replicating_ts\":456724026756956209},{\"version\":0,\"dispatcher_id\":{\"low\":11766953444167129355,\"high\":7287039303564457910},\"physical_table_id\":2767,\"start_ts\":456724027962294862,\"commit_ts\":456724027962294863,\"table_info_version\":456724026363215891,\"seq\":126,\"state\":0,\"length\":4,\"approximate_size\":364,\"row_types\":\"AgIBAQE=\",\"rows\":{},\"raw_rows\":null,\"table_info\":{\"schema-id\":2767,\"table-name\":{\"Schema\":\"ddl\",\"Table\":\"ta960c56f\",\"TableID\":2767,\"IsPartition\":false}},\"replicating_ts\":456724026756956209},{\"version\":0,\"dispatcher_id\":{\"low\":11766953444167129355,\"high\":7287039303564457910},\"physical_table_id\":2767,\"start_ts\":456724027975401530,\"commit_ts\":456724027975401531,\"table_info_version\":456724026363215891,\"seq\":128,\"state\":0,\"length\":1,\"approximate_size\":133,\"row_types\":\"AgI=\",\"rows\":{},\"raw_rows\":null,\"table_info\":{\"schema-id\":2767,\"table-name\":{\"Schema\":\"ddl\",\"Table\":\"ta960c56f\",\"TableID\":2767,\"IsPartition\":false}},\"replicating_ts\":456724026756956209},{\"version\":0,\"dispatcher_id\":{\"low\":11766953444167129355,\"high\":7287039303564457910},\"physical_table_id\":2767,\"start_ts\":456724027975401872,\"commit_ts\":456724027975401873,\"table_info_version\":456724026363215891,\"seq\":135,\"state\":0,\"length\":3,\"approximate_size\":253,\"row_types\":\"AgIBAQ==\",\"rows\":{},\"raw_rows\":null,\"table_info\":{\"schema-id\":2767,\"table-name\":{\"Schema\":\"ddl\",\"Table\":\"ta960c56f\",\"TableID\":2767,\"IsPartition\":false}},\"replicating_ts\":456724026756956209},{\"version\":0,\"dispatcher_id\":{\"low\":11766953444167129355,\"high\":7287039303564457910},\"physical_table_id\":2767,\"start_ts\":456724027975401956,\"commit_ts\":456724027975401957,\"table_info_version\":456724026363215891,\"seq\":136,\"state\":0,\"length\":2,\"approximate_size\":142,\"row_types\":\"AAA=\",\"rows\":{},\"raw_rows\":null,\"table_info\":{\"schema-id\":2767,\"table-name\":{\"Schema\":\"ddl\",\"Table\":\"ta960c56f\",\"TableID\":2767,\"IsPartition\":false}},\"replicating_ts\":456724026756956209}]"] [stack="github.com/pingcap/ticdc/pkg/sink/mysql.(*MysqlWriter).generateBatchSQLInSafeMode\n\tgithub.com/pingcap/ticdc/pkg/sink/mysql/mysql_writer_dml.go:200\ngithub.com/pingcap/ticdc/pkg/sink/mysql.(*MysqlWriter).generateBatchSQL\n\tgithub.com/pingcap/ticdc/pkg/sink/mysql/mysql_writer_dml.go:134\ngithub.com/pingcap/ticdc/pkg/sink/mysql.(*MysqlWriter).prepareDMLs\n\tgithub.com/pingcap/ticdc/pkg/sink/mysql/mysql_writer_dml.go:90\ngithub.com/pingcap/ticdc/pkg/sink/mysql.(*MysqlWriter).Flush\n\tgithub.com/pingcap/ticdc/pkg/sink/mysql/mysql_writer.go:203\ngithub.com/pingcap/ticdc/downstreamadapter/worker.(*MysqlDMLWorker).Run\n\tgithub.com/pingcap/ticdc/downstreamadapter/worker/mysql_worker.go:118\ngithub.com/pingcap/ticdc/downstreamadapter/sink.(*MysqlSink).Run.func1\n\tgithub.com/pingcap/ticdc/downstreamadapter/sink/mysql_sink.go:124\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\tgolang.org/x/[email protected]/errgroup/errgroup.go:78"]```

### Versions of the cluster

Upstream TiDB cluster version (execute `SELECT tidb_version();` in a MySQL client):

```console
(paste TiDB cluster version here)

Upstream TiKV version (execute tikv-server --version):

(paste TiKV version here)

TiCDC version (execute cdc version):

(paste TiCDC version here)
@hongyunyan hongyunyan added the type/bug The issue is confirmed as a bug. label Mar 18, 2025
@hongyunyan hongyunyan self-assigned this Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

1 participant