0
votes

I need to output data from Flink to MySQL because of the old system. but I found docs in flink like this:

Created JDBC sink provides at-least-once guarantee. Effectively exactly-once can be achieved using upsert statements or idempotent updates.

But the system can't use idempotent updates. I want to know why Flink unable to guarantee the exact once of JDBC connector in the case of JDBC transactions? Thanks.

1

1 Answers

1
votes

The reason this isn't trivial is that for a Flink sink to take advantage of transaction support in the external data store, the two-phase commit has to be integrated with Flink's checkpointing mechanism.

Until recently, no one had done this work for the JDBC connector. However, this feature was just merged to master, and will be included in 1.13; see FLINK-15578. For the design discussion, see [DISCUSS] JDBC exactly-once sink.

For more on the current upsert support (in the context of Flink SQL), see idempotent writes.