flink
flink copied to clipboard
[FLINK-35130][runtime] Simplify AvailabilityNotifierImpl to support speculative scheduler and improve performance
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)
CI report:
- 856d856fed8403922ae10fa4abf9884cb3879142 Azure: SUCCESS
Bot commands
The @flinkbot bot supports the following commands:-
@flinkbot run azure
re-run the last Azure build
@reswqa Could you please take a look at this change? Thanks
Could you rebase on the latest master branch for safety. I will merge this after AZP passed.
@reswqa ok, I've rebased the latest master. PTAL.