Skip to content

[hotfix][checkpoint] Refactor common behavior into ChannelStateFilteringHandler#getGateFilterHandler and GateFilterHandler#getVirtualChannelBy to reduce code duplication - #28954

Draft
RocMarshal wants to merge 1 commit into
apache:masterfrom
RocMarshal:hotfix_checkpoint

Conversation

@RocMarshal

Copy link
Copy Markdown
Contributor

What is the purpose of the change

[hotfix][checkpoint] Refactor common behavior into ChannelStateFilteringHandler#getGateFilterHandler and GateFilterHandler#getVirtualChannelBy to reduce code duplication in ChannelStateFilteringHandler.java

Brief change log

[hotfix][checkpoint] Refactor common behavior into ChannelStateFilteringHandler#getGateFilterHandler and GateFilterHandler#getVirtualChannelBy to reduce code duplication in ChannelStateFilteringHandler.java

Verifying this change

This change is already covered by existing tests

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

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
  • The serializers: (yes / no / don't know)
  • The runtime per-record code paths (performance sensitive): (yes / no / don't know)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)
  • The S3 file system connector: (yes / no / don't know)

Documentation

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

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

Generated-by: [Tool Name and Version]

…ingHandler#getGateFilterHandler and GateFilterHandler#getVirtualChannelBy to reduce code duplication in ChannelStateFilteringHandler.java
@RocMarshal RocMarshal changed the title [hotfix][checkpoint] Refactor common behavior into ChannelStateFilteringHandler#getGateFilterHandler and GateFilterHandler#getVirtualChannelBy to reduce code duplication in ChannelStateFilteringHandler.java [hotfix][checkpoint] Refactor common behavior into ChannelStateFilteringHandler#getGateFilterHandler and GateFilterHandler#getVirtualChannelBy to reduce code duplication Aug 11, 2026
@flinkbot

flinkbot commented Aug 11, 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

@weiqingy weiqingy left a comment

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.

Thanks for the cleanup. I diffed each new helper against both copies of the code it came from and the bodies are identical, so nothing changed in the move. One small note inline.

}
}

private VirtualChannel<T> getVirtualChannelBy(int oldSubtaskIndex, int oldChannelIndex) {

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.

nit: The comment at line 363 marks everything below it as code that goes away when FLINK-38544 lands. This new helper sits inside that section, but one of its two callers is at line 325, in the overload that stays. Up to now nothing inside the section was called from outside it, so that deletion could be a clean cut. Would moving the helper above line 362 be worth it to keep that true?

@RocMarshal
RocMarshal marked this pull request as draft August 11, 2026 06:17
@github-actions github-actions Bot added the community-reviewed PR has been reviewed by the community. label Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-reviewed PR has been reviewed by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants