-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-13442][network] Remove unnecessary notifySubpartitionConsumed method from view reader #9262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit a42027d (Tue Aug 27 09:17:50 UTC 2019) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. DetailsThe Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
|
The refactoring work which was confirmed in FLINK-13245 should not be the blocker for release-1.9. But during refactoring to remove the @flinkbot attention @StephanEwen @pnowojski |
|
I removed the last commit for fixing the problem of |
pnowojski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Thanks for review @pnowojski ! I would handle it later. |
…method from view reader Currently the methods of NetworkSequenceViewReader#notifySubpartitionConsumed and NetworkSequenceViewReader#releaseAllResources would be called meanwhile in netty stack during releasing resources. As confirmed in FLINK-13245, in order to make this release logic simple and clean, we could remove the redundant notifySubpartitionConsumed from NetworkSequenceViewReader side, and also remove it from ResultSubpartitionView side. In the implementation of ResultSubpartitionView#releaseAllResources it would further notify the parent subpartition of consumed state via ResultSubpartition#notifySubpartitionConsumed which further feedback to parent ResultPartition layer via onConsumedSubpartition. Finally ResultPartition could decide whether to release itself or not. E.g. for the case of ReleaseOnConsumptionResultPartition which is mainly used for pipelined partition, it would release partition after reference counter decreased to 0. For the case of ResultPartition which would be generated for blocking partition by default, it would never be released after notifying consumed. And the JM/scheduler would decide when to release partition properly.In addition, InputChannel#notifySubpartitionConsumed could also be removed as a result of above.
What is the purpose of the change
Currently the methods of
NetworkSequenceViewReader#notifySubpartitionConsumedandNetworkSequenceViewReader#releaseAllResourceswould be called meanwhile in netty stack during releasing resources.As confirmed in FLINK-13245, in order to make this release logic simple and clean, we could remove the redundant
notifySubpartitionConsumedfromNetworkSequenceViewReaderside, and also remove it fromResultSubpartitionViewside. In the implementation ofResultSubpartitionView#releaseAllResourcesit would further notify the parent subpartition of consumed state viaResultSubpartition#notifySubpartitionConsumedwhich further feedback to parentResultPartitionlayer viaonConsumedSubpartition. FinallyResultPartitioncould decide whether to release itself or not.E.g. for the case of
ReleaseOnConsumptionResultPartitionwhich is mainly used for pipelined partition, it would release partition after reference counter decreased to0. For the case of
ResultPartitionwhich would be generated for blocking partition by default, it would never be released after notifying consumed. And the JM/schedulerwould decide when to release partition properly. In addition,
InputChannel#notifySubpartitionConsumedcould also be removed as a result of above.Brief change log
notifySubpartitionConsumedfromNetworkSequenceViewReadernotifySubpartitionConsumedfromResultSubpartitionViewnotifySubpartitionConsumedfromInputChannelVerifying 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:
@Public(Evolving): (no)Documentation