zhijiangW commented on a change in pull request #8566: [FLINK-12673][network]
Introduce NetworkEnvironment.getUnreleasedPartitions instead of using
getResultPartitionManager
URL: https://github.com/apache/flink/pull/8566#discussion_r289239909
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartitionManager.java
##########
@@ -122,14 +123,9 @@ void onConsumedPartition(ResultPartition partition) {
}
}
- public boolean areAllPartitionsReleased() {
+ public Collection<ResultPartitionID> getUnreleasedPartitions() {
synchronized (registeredPartitions) {
- for (ResultPartition partition :
registeredPartitions.values()) {
- if (!partition.isReleased()) {
- return false;
- }
- }
- return true;
+ return registeredPartitions.keySet();
Review comment:
Yes, the `partition#release` should also put under the synchronized in
`ResultPartitionManager#onConsumedPartition`, then it could solve this issue.
----------------------------------------------------------------
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