Skip to content

[FLINK-41115][runtime] Isolate adaptive graph recovery from IO - #29584

Draft
dpeacock wants to merge 1 commit into
apache:masterfrom
dpeacock:fix/FLINK-41115-adaptive-recovery-io
Draft

dpeacock wants to merge 1 commit into
apache:masterfrom
dpeacock:fix/FLINK-41115-adaptive-recovery-io

Conversation

@dpeacock

Copy link
Copy Markdown

What and why

Addresses FLINK-41115.

We encountered production rescales where AdaptiveScheduler waited 104–127 seconds for a graph-creation worker, although executing the supplier took about 0.32 seconds. Thread dumps showed the general JobManager IO workers occupied by checkpoint-file deletion.

Change

Run only background graph construction and state assignment on a JobManager-owned, shared recovery executor. Checkpoint-trigger initialization and cleanup keep their existing IO executor and feedback relationship. Predecessor sequencing, cancellation, state ownership and shutdown ordering are preserved.

The fixed recovery pool uses jobmanager.io-pool.size, adding up to N shared workers; configuration docs describe this. The queue remains unbounded, and synchronous storage calls inside recovery can still block. No diagnostic logging, dependency, public API signature, serializer, per-record or S3 connector changes.

Verification

Real MiniCluster tests saturate general IO with deletion and verify restored-task progress before releasing it, while new checkpoint initialization still waits. Negative controls detect incorrect routing, lost checkpoint feedback and premature shutdown.

Affected runtime/checkpoint suites and core, streaming, Kubernetes and documentation verification pass on Apache master. Configuration documentation was regenerated.

  • Generative AI tooling used: pi

Generated-by: pi 1.4.0

Checkpoint cleanup can occupy every JobManager IO worker and starve
adaptive graph creation. Production captures showed 104-127 seconds
before supplier entry, followed by about 0.32 seconds of supplier work.

Give only graph construction and state assignment a fixed shared recovery
executor. Keep checkpoint-trigger initialization and cleanup on general
IO to preserve their feedback, and retain supplier sequencing, job MDC,
shared ownership and shutdown ordering. Document the additional capacity.

Cover real checkpoint restore and task progress under blocked cleanup,
continued checkpoint throttling, and successful late-supplier fencing.
Validate routing, feedback and shutdown negative controls without adding
diagnostic logging or changing checkpoint formats and retention.

Generated-by: pi 1.4.0
@flinkbot

flinkbot commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

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.

2 participants