Skip to content

[Bug] [Zeta] the retry mechanism may have a serious bug #10461

@Sephiroth1024

Description

@Sephiroth1024

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

Pre agreements:

  • Take MySQL as an example.
  • When we submit a job, seatunnel will query the current table structures in the target database and store them in AbstractDebeziumDeserializationSchema#tableChangesStructMap.
    Refer to it as tableChangesStructMap.
  • To be simplified, assume that the worker will perform the checkpoint(actually the master does).
  • Assume that there is a database and it has two tables, tb1 and tb2.
  1. Now we submit a job.
Image
  1. Then a new table called tb3 is created.
Image
  1. Perform a checkpoint.
Image
  1. The task failed for some reason and master will retry. And something is wrong because the master's tableChangesStructMap is an old version (the only time when master builds tableChangesStructMap is when the job is submitted).
Image
  1. Perform a checkpoint. And the wrong table structures will be stored in the checkpoint file forever.
Image

It may cause some exceptions like Can't obtain schema for table xxx.

It can also cause some debezium's exceptions like Data row is smaller than a column index. When the debezium starts, it will recover it's DatabaseSchema from DatabaseHistory. The seatunnel's implementation is EmbeddedDatabaseHistory, and it will recover from the latest checkpoint.

What kind of exceptions it may cause depends on what kind of DDL statements the database executes.

SeaTunnel Version

2.3.12

SeaTunnel Config

//

Running Command

//

Error Exception

//

Zeta or Flink or Spark Version

No response

Java or Scala Version

No response

Screenshots

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions