zhijiangW commented on a change in pull request #8210: [FLINK-12203] Refactor
ResultPartitionManager to break tie with Task
URL: https://github.com/apache/flink/pull/8210#discussion_r278441847
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartitionManager.java
##########
@@ -83,26 +72,14 @@ public ResultSubpartitionView createSubpartitionView(
}
}
- public void releasePartitionsProducedBy(ExecutionAttemptID executionId)
{
- releasePartitionsProducedBy(executionId, null);
- }
-
- public void releasePartitionsProducedBy(ExecutionAttemptID executionId,
Throwable cause) {
+ public void releasePartitionsProducedBy(ResultPartitionID partitionId,
Throwable cause) {
synchronized (registeredPartitions) {
- final Map<IntermediateResultPartitionID,
ResultPartition> partitions =
- registeredPartitions.row(executionId);
-
- for (ResultPartition partition : partitions.values()) {
- partition.release(cause);
+ if (registeredPartitions.containsKey(partitionId)) {
+
registeredPartitions.get(partitionId).release(cause);
+ registeredPartitions.remove(partitionId);
+ LOG.debug("Released partition {} produced by
{}.",
+ partitionId.getPartitionId(),
partitionId.getPartitionId());
Review comment:
The last parameter in log should be `partitionId.getProducerId()`?
----------------------------------------------------------------
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