Yubiao Feng created FLINK-41194:
-----------------------------------
Summary: Use PulsarAdmin to make PulsarSink transaction commits
idempotent during recovery
Key: FLINK-41194
URL: https://issues.apache.org/jira/browse/FLINK-41194
Project: Flink
Issue Type: Bug
Components: Connectors / Pulsar
Affects Versions: 2.0.0
Reporter: Yubiao Feng
The Pulsar sink currently retries transaction commits during checkpoint
recovery without checking the transaction state first. If the transaction was
already committed before the recovery attempt, committing it again may fail
with an exception and cause recovery to fail.
Restore the {{PulsarAdmin}} construction support removed by
[FLINK-32938|https://github.com/apache/flink-connector-pulsar/pull/59],
including the admin URL configuration.
Before committing a transaction, use {{PulsarAdmin}} to inspect the latest
published message state:
* If the transaction is still uncommitted, commit it.
* If it has already been committed, mark the request as already committed.
* If it has been aborted, fail the request with a known reason.
* Retry when the transaction state cannot be queried temporarily.
This makes PulsarSink transaction commits idempotent during checkpoint recovery.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)