flink icon indicating copy to clipboard operation
flink copied to clipboard

[FLINK-35130][runtime] Simplify AvailabilityNotifierImpl to support speculative scheduler and improve performance

Open TanYuxin-tyx opened this issue 10 months ago • 3 comments

What is the purpose of the change

The AvailabilityNotifierImpl in SingleInputGate has maps storing the channel ids. But the map key is the result partition id, which will change according to the different attempt numbers when speculation is enabled. This can be resolved by using inputChannels to get channel and the map key of inputChannels will not vary with the attempts. In addition, using that map instead can also improve performance for large scale jobs because no extra maps are created.

Brief change log

  • Simplify AvailabilityNotifierImpl
  • Remove useless method in AvailabilityNotifierI

Verifying this change

This change is already covered by existing tests, such as HybridShuffleITCase.

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)
  • If yes, how is the feature documented? (not documented)

TanYuxin-tyx avatar Apr 17 '24 09:04 TanYuxin-tyx

CI report:

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

flinkbot avatar Apr 17 '24 09:04 flinkbot

@reswqa Could you please take a look at this change? Thanks

TanYuxin-tyx avatar Apr 24 '24 01:04 TanYuxin-tyx

Could you rebase on the latest master branch for safety. I will merge this after AZP passed.

reswqa avatar Apr 25 '24 16:04 reswqa

@reswqa ok, I've rebased the latest master. PTAL.

TanYuxin-tyx avatar May 21 '24 07:05 TanYuxin-tyx