dawidwys commented on a change in pull request #15246:
URL: https://github.com/apache/flink/pull/15246#discussion_r595776849
##########
File path:
flink-core/src/main/java/org/apache/flink/core/memory/HybridMemorySegment.java
##########
@@ -131,6 +131,9 @@
@Override
public void free() {
+ if (isFreed()) {
+ throw new IllegalStateException("HybridMemorySegment can be freed
only once!");
+ }
Review comment:
Honestly, I was afraid that's gonna be the case that tests would fail, I
wanted to check anyway.
The problem without the check though, is that the tests I added pass even
without the fix :( Not sure, how can I test the change as I don't have anything
really to assert on. Do you have an idea? Or shall we simply leave the tests as
they are now and they will make sense once we introduce the check?
----------------------------------------------------------------
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]