Open lance6716 opened 11 months ago
panic: runtime error: comparing uncomparable type []uint8 goroutine 1734018212 [running]: github.com/pingcap/tiflow/pkg/sqlmodel.(*RowChange).IsIdentityUpdated(0x2?) github.com/pingcap/tiflow/pkg/sqlmodel/reduce.go:106 +0x108 github.com/pingcap/tiflow/dm/syncer.genDMLsWithSameOp({0x4003862a80, 0x106, 0x267ad60?}) github.com/pingcap/tiflow/dm/syncer/dml.go:466 +0x134 github.com/pingcap/tiflow/dm/syncer.(*DMLWorker).genSQLs(0x400ffb8150?, {0x4003862a80?, 0x3?, 0x3?}) github.com/pingcap/tiflow/dm/syncer/dml_worker.go:285 +0x8c github.com/pingcap/tiflow/dm/syncer.(*DMLWorker).executeBatchJobs(0x4002790780, 0x9, {0x4003862a80?, 0x106, 0x12c}) github.com/pingcap/tiflow/dm/syncer/dml_worker.go:239 +0x110 github.com/pingcap/tiflow/dm/syncer.(*DMLWorker).executeJobs(0x4002790780, 0x9, 0x40620fd0e0) github.com/pingcap/tiflow/dm/syncer/dml_worker.go:184 +0x2c0 created by github.com/pingcap/tiflow/dm/syncer.(*DMLWorker).run github.com/pingcap/tiflow/dm/syncer/dml_worker.go:107 +0x5c
Here we may compare []byte, should use bytes.Compare for this type.
[]byte
https://github.com/pingcap/tiflow/blob/5d6aaa216ef8b8fc36eb2ec91680dc59b923d9c5/pkg/sqlmodel/reduce.go#L105
by checking the panic stack, this problem can be workaround by setting multiple-rows to false
multiple-rows
/assign @lance6716 @GMHDBJD
multiple-rows is false by default.
/severity moderate
What did you do?
Here we may compare
[]byte
, should use bytes.Compare for this type.https://github.com/pingcap/tiflow/blob/5d6aaa216ef8b8fc36eb2ec91680dc59b923d9c5/pkg/sqlmodel/reduce.go#L105