Skip to content

[FLINK-40517][checkpointing] Aggregate cross-channel watermarks on the recovery unspilling thread for fan-in rescale - #29064

Open
1996fanrui wants to merge 1 commit into
apache:masterfrom
1996fanrui:FLINK-40517
Open

[FLINK-40517][checkpointing] Aggregate cross-channel watermarks on the recovery unspilling thread for fan-in rescale#29064
1996fanrui wants to merge 1 commit into
apache:masterfrom
1996fanrui:FLINK-40517

Conversation

@1996fanrui

Copy link
Copy Markdown
Member

What is the purpose of the change

On the normal recovery path, when a fan-in rescale merges several old input channels into one new channel,
DemultiplexingRecordDeserializer aggregates the recovered non-record elements across the merged channels:
it emits the min watermark (suppressed until every merged channel has one) and ACTIVE if any channel is
active. With checkpointing during recovery enabled that aggregation moves to the unspilling thread, but
ChannelStateFilteringHandler passed watermarks and statuses through verbatim — so a high watermark from one
merged channel advanced the operator watermark prematurely and legitimate in-flight lower-timestamp records
were dropped as late (silent data loss), and an IDLE from one merged channel wrongly idled the whole channel.
This performs the same min-watermark / any-active aggregation on the unspilling thread.

Brief change log

  • [FLINK-40517] Aggregate the min watermark (held while any merged old channel is still uninitialized) and any-active watermark-status per new channel in ChannelStateFilteringHandler; NO_RESCALE and fan-out stay verbatim.

Verifying this change

This change added tests:

  • GateFilterHandlerTest cases for fan-in min-watermark merge (with hold-until-all) and any-active watermark-status; both fail on verbatim pass-through.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no (recovery-time unspilling only)
  • Anything that affects deployment or recovery: yes (unaligned-checkpoint restore with in-flight channel state on rescale)
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

…e recovery unspilling thread for fan-in rescale
@flinkbot

flinkbot commented Sep 1, 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