xintongsong commented on a change in pull request #15246:
URL: https://github.com/apache/flink/pull/15246#discussion_r595789570
##########
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:
I'm planning to introduce an environment variable for activating the
check. Maybe it makes sense to take that step now, so we can activate the check
only for the relevant test cases, before activating it for all tests by
default. WDYT?
----------------------------------------------------------------
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]