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_r285897951
##########
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:
We changed some previous behavior here but seems not covered by related
tests before.
The `PartitionException` would trigger cancel task before, so the task final
state might be canceled. But now we fail the task directly, so the task final
state might be failed. Does it need to supplement a unit test?
----------------------------------------------------------------
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