Skip to content

[FLINK-40671][network] Document why UnknownInputChannel graduation hardcodes needsRecovery=false - #29191

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

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

Conversation

@1996fanrui

Copy link
Copy Markdown
Member

What is the purpose of the change

UnknownInputChannel.toRemoteInputChannel / toLocalInputChannel hardcode
needsRecovery=false when graduating to a real channel. This looks unsafe next to the
recovery path, but it is correct: unknown channels only exist in BATCH jobs, which have no
channel state, while channel-state recovery only exists in streaming (unaligned checkpoints) —
the two are mutually exclusive. This adds a comment documenting that invariant.

Brief change log

  • Comment-only, at the two graduation sites in UnknownInputChannel.

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

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
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no

@flinkbot

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

metrics.getNumBytesInRemoteCounter(),
metrics.getNumBuffersInRemoteCounter(),
channelStateWriter == null ? ChannelStateWriter.NO_OP : channelStateWriter,
// Unknown channels exist only in BATCH jobs, which have no channel

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was expecting a change to the docs from the PR title. Is there an external consideration that we could add to the docs around this? Or is this just for code hygene?

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.

3 participants