Martijn Visser created FLINK-41192:
--------------------------------------
Summary: HTTP sink request never completes when a retry attempt
throws
Key: FLINK-41192
URL: https://issues.apache.org/jira/browse/FLINK-41192
Project: Flink
Issue Type: Bug
Components: Connectors / HTTP
Affects Versions: http-1.0.0
Reporter: Martijn Visser
Fix For: http-1.1.0
HttpSinkClientWithRetry passes the request attempt to Resilience4j's
Retry.decorateCompletionStage.
Resilience4j 1.7.1 runs retry attempts on its scheduler and does not catch an
exception thrown by
the attempt itself (AsyncRetryBlock.run calls supplier.get() without a
try/catch). The returned
future then never completes. HttpSinkWriter sets no AsyncSink request timeout,
so the request stays
in flight for the default 10 minutes, blocking any checkpoint flush meanwhile,
and is then resent as
a whole batch, including entries the first attempt already delivered.
On main nothing triggers this reliably: request building is deterministic and
fails on the first
attempt, where the exception reaches the caller. With FLINK-40279 the OIDC
token is fetched per
request, so a token endpoint failure on a retry attempt hits it. Introduced in
FLINK-40277, not
released yet.
Reproduction: a submitter that returns a retryable result on the first attempt
and throws on the
second; putRequests(...).join() never returns.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)