zhijiangW commented on a change in pull request #8463: [FLINK-12530][network]
Move Task.inputGatesById to NetworkEnvironment
URL: https://github.com/apache/flink/pull/8463#discussion_r285926831
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskExecutor.java
##########
@@ -614,34 +612,23 @@ private void stopTaskExecutorServices() throws Exception
{
if (task != null) {
for (final PartitionInfo partitionInfo: partitionInfos)
{
- IntermediateDataSetID
intermediateResultPartitionID = partitionInfo.getIntermediateDataSetID();
-
- final SingleInputGate singleInputGate =
task.getInputGateById(intermediateResultPartitionID);
+ // Run asynchronously because it might be
blocking
+ getRpcService().execute(
+ () -> {
+ try {
+
networkEnvironment.updatePartitionInfo(partitionInfo);
+ } catch (IOException |
PartitionException | InterruptedException e) {
Review comment:
Yes, I agree with the same effect, only concern the unit test. If we ever
had the unit test for verifying the task is in `CANCELED` state after
`PartitionException`, then this change should make the previous test failure
because the task would be in `FAILED` state after change.
----------------------------------------------------------------
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