kezhuw commented on a change in pull request #15273:
URL: https://github.com/apache/flink/pull/15273#discussion_r598945787



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/memory/MemoryManager.java
##########
@@ -346,9 +346,6 @@ private MemorySegment releaseSegmentsForOwnerUntilNextOwner(
                     while (segmentsIterator.hasNext()) {
                         MemorySegment segment = segmentsIterator.next();
                         try {
-                            if (segment == null || segment.isFreed()) {

Review comment:
       I think removing of `segment == null` could be in a dedicated cleanup 
jira. I guess `null` `MemorySegment` works in existing code on purpose though I 
don't think it is a good.




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


Reply via email to