zhijiangW commented on a change in pull request #11687:
URL: https://github.com/apache/flink/pull/11687#discussion_r415207643



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/reader/AbstractRecordReader.java
##########
@@ -63,6 +63,8 @@ protected AbstractRecordReader(InputGate inputGate, String[] 
tmpDirectories) {
        }
 
        protected boolean getNextRecord(T target) throws IOException, 
InterruptedException {
+               inputGate.requestPartitions();

Review comment:
       This is the only concentrated place work for all the batch cases. 
Otherwise we have to add this call for all the specific invokable instances 
derived from `BatchTask` class, even we also need to consider many other cases 
which bypassed the invokable class and use the wrapped `AbstractRecordReader` 
directly in unit tests, etc.
   
   I remembered in the early version, the `requestPartitions` was also placed 
inside `SingleInputGate#getNext`  method. Because of the mailbox requirement, 
it was migrated into `#setup` afterwards.
   
   Considering the batch case unrelated to mailbox path, so i think it might be 
accepted to redo it still in the original place only work for batch cases.




----------------------------------------------------------------
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.

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


Reply via email to