[
https://issues.apache.org/jira/browse/FLINK-6337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15986670#comment-15986670
]
ASF GitHub Bot commented on FLINK-6337:
---------------------------------------
Github user zhijiangW commented on a diff in the pull request:
https://github.com/apache/flink/pull/3785#discussion_r113703927
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java
---
@@ -351,15 +351,15 @@ public void destroyBufferPool() {
/**
* Returns the requested subpartition.
*/
- public ResultSubpartitionView createSubpartitionView(int index,
BufferProvider bufferProvider, BufferAvailabilityListener availabilityListener)
throws IOException {
+ public ResultSubpartitionView createSubpartitionView(int index,
BufferAvailabilityListener availabilityListener) throws IOException {
int refCnt = pendingReferences.get();
checkState(refCnt != -1, "Partition released.");
checkState(refCnt > 0, "Partition not pinned.");
checkElementIndex(index, subpartitions.length, "Subpartition
not found.");
- ResultSubpartitionView readView =
subpartitions[index].createReadView(bufferProvider, availabilityListener);
+ ResultSubpartitionView readView =
subpartitions[index].createReadView(bufferPool, availabilityListener);
--- End diff --
Thank you for so efficient reviews!
I agree with your suggestion. It will be more complete and pretty good.
I will modify and submit another commit for it, and verify the tests again.
> Remove the buffer provider from PartitionRequestServerHandler
> -------------------------------------------------------------
>
> Key: FLINK-6337
> URL: https://issues.apache.org/jira/browse/FLINK-6337
> Project: Flink
> Issue Type: Improvement
> Components: Network
> Reporter: zhijiang
> Assignee: zhijiang
> Priority: Minor
>
> Currently, {{PartitionRequestServerHandler}} will create a
> {{LocalBufferPool}} when the channel is registered. The {{LocalBufferPool}}
> is only used to get segment size for creating read view in
> {{SpillableSubpartition}}, and the buffers in the pool will not be used all
> the time, so it will waste the buffer resource of global pool.
> We would like to remove the {{LocalBufferPool}} from the
> {{PartitionRequestServerHandler}}, and the {{LocalBufferPool}} in
> {{ResultPartition}} can also provide the segment size for creating sub
> partition view.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)