Skip to content

[flink] Tolerate transient heartbeat failures in tiering enumerator - #5405

Draft
jaredmdobson wants to merge 1 commit into
apache:mainfrom
jaredmdobson:flink-tiering-heartbeat-tolerance
Draft

jaredmdobson wants to merge 1 commit into
apache:mainfrom
jaredmdobson:flink-tiering-heartbeat-tolerance

Conversation

@jaredmdobson

Copy link
Copy Markdown

Draft: proof-of-concept code for the discussion in #5404, per the contribution guide. It stays a draft until there is consensus on the approach.

  • Generative AI disclosure:
    • No generative AI tools used
    • Yes (Claude Code, Claude Sonnet 5.5)

Generated-by: Claude Code (Claude Sonnet 5.5) following the guidelines

Purpose

Linked issue: close #5404

A transient coordinator heartbeat failure currently fails the whole tiering job.

Brief change log

  • Add lake.tiering.heartbeat.failure-tolerance (default 0, behaviour unchanged).
  • Within the tolerance, skip a retriable or timed-out heartbeat, keep unacknowledged finished and failed table reports, and refresh the cached coordinator address (so the stale-address loop of TieringSource should fail over when coordinator IP changes and heartbeat retries a stale endpoint #3106 does not return).
  • The periodic poll is the retry; no new thread or backoff.
  • The tolerance window starts at the first observed failure. Time spent waiting for a response (up to the enumerator's 3-minute limit) counts toward it.
  • A table granted by a lost response is not tracked; the coordinator reassigns it after its heartbeat timeout.
  • After a coordinator epoch change, adopt the new epoch once no report or round from the previous one is outstanding, and request no new table until then.
  • The close-time report and startup registration are unchanged.

Tests

  • New TieringSourceEnumeratorHeartbeatTest (5 tests).
  • TieringSourceEnumerator*Test in fluss-flink-common: 30 run, 0 failures (JDK 11).
  • Against the unchanged enumerator (plus a no-op setClock so the tests compile), the report-retention, tolerance-expiry and coordinator-epoch tests fail.
  • spotless:check on fluss-common and fluss-flink-common passes. A build of the changed modules and their dependencies passes with checkstyle and RAT enabled.
  • The full mvn clean verify was not run locally.

API and Format

One new config option. No RPC or storage format change.

Documentation

Added the option to the lakehouse storage page.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HWXvAgjCrkjob7rfuMyBma

One failed lakeTieringHeartbeat currently fails the whole tiering job,
discarding the rounds in progress, although the error is retriable.

Add the opt-in lake.tiering.heartbeat.failure-tolerance (default 0,
unchanged behaviour). Within it, a retriable or timed-out heartbeat is
skipped, the cached coordinator address is refreshed and unacknowledged
reports are sent again by the next poll. After a coordinator epoch
change, no new table is requested until rounds and reports of the
previous epoch have drained.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HWXvAgjCrkjob7rfuMyBma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[flink] One failed coordinator heartbeat fails the lake tiering job

1 participant