zhijiangW commented on a change in pull request #8320: 
[FLINK-12201][network][metrics] Introduce InputGateWithMetrics in Task to 
increment numBytesIn metric
URL: https://github.com/apache/flink/pull/8320#discussion_r282814554
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
 ##########
 @@ -637,6 +636,11 @@ else if (current == ExecutionState.CANCELING) {
 
                        TaskKvStateRegistry kvStateRegistry = 
kvStateService.createKvStateTaskRegistry(jobId, getJobVertexId());
 
+                       InputGate[] gates = new InputGate[inputGates.length];
+                       for (int i = 0; i < inputGates.length; i++) {
 
 Review comment:
   Yes, I also did it in the constructor in first version. Later I think it 
might be better to make `InputGateWithMetrics` involved in less logics such as 
`close`, so I change it as now to keep the previous arrays of `SingleInputGate` 
in task.
   
   I think it also makes sense to do it in constructor, then I would fix it.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to