zentol 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_r290665487
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartitionManager.java
 ##########
 @@ -106,30 +107,23 @@ public void shutdown() {
        // 
------------------------------------------------------------------------
 
        void onConsumedPartition(ResultPartition partition) {
-               final ResultPartition previous;
-
                LOG.debug("Received consume notification from {}.", partition);
 
                synchronized (registeredPartitions) {
-                       previous = 
registeredPartitions.remove(partition.getPartitionId());
-               }
-
-               // Release the partition if it was successfully removed
-               if (partition == previous) {
-                       partition.release();
-
-                       LOG.debug("Released {}.", partition);
+                       final ResultPartition previous = 
registeredPartitions.remove(partition.getPartitionId());
+                       // Release the partition if it was successfully removed
+                       if (partition == previous) {
 
 Review comment:
   this change exceeds the scope of the original issue and should be put into a 
separate commit.

----------------------------------------------------------------
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