1996fanrui commented on code in PR #20075:
URL: https://github.com/apache/flink/pull/20075#discussion_r907979743


##########
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java:
##########
@@ -385,11 +385,16 @@ public Task(
                 shuffleEnvironment.createShuffleIOOwnerContext(
                         taskNameWithSubtaskAndId, executionId, 
metrics.getIOMetricGroup());
 
+        boolean overdraftBufferEnabled =
+                !nameOfInvokableClass.equals(
+                        
"org.apache.flink.streaming.runtime.tasks.SourceStreamTask");

Review Comment:
   Hi @pnowojski , thanks for your suggestion.
   
   It can be considered, I tried, it has some advantages that no need to modify 
the Task, only the SourceStreamTask, but it will break more interfaces.
   
   We need call `ResultPartition#setMaxOverdraftBuffers in SourceStreamTask`  
and ResultPartition will call `LocalBufferPool#setMaxOverdraftBuffers`.
   
   Call chain:
   - 
`recordWriter.getRecordWriter(n).getTargetPartition().setMaxOverdraftBuffers(x)`
   -  `LocalBufferPool#setMaxOverdraftBuffers`
   
   The getTargetPartition need to be changed, and need to add 2 
setMaxOverdraftBuffers.
   
   I think both are fine, what do you think?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to