[
https://issues.apache.org/jira/browse/FLINK-21419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17300222#comment-17300222
]
Kezhu Wang commented on FLINK-21419:
------------------------------------
# detecting concurrent frees: To detect and guard concurrent frees, solely
{{volatile}} is not enough. {{AtomicBoolean}} or {{synchronized}} with other no
volatile variable should suffice. It will not detect 100% cases but should
guard 100% cases. In these detected cases, caller will fail, this means
FLINK-21728 should still exist but behaves different.
# safety net for leaking: I think {{JavaGcCleanerWrapper}} is hacking for
runtime compatibility for java 8. It should run on all future java versions as
all it accesses are public things. {{finalize}} is a fallback before java 9
{{Cleaner}} if we don't want keep reflection things. I am neutral to either.
Both will reclaim leaking resources finally and provide possible valuable
leaking path.
# Throw exception on slot being freed if {{MemoryManager#verifyEmpty}} fails:
Not sure. I glimpsed the code and found the result of {{TaskSlot.closeAsync}}
is only concerned in task execution shutdown phase. In that phase, there is no
much difference between logging and exception.
cc [~xintongsong]
> Remove GC cleaner mechanism for unsafe memory segments
> ------------------------------------------------------
>
> Key: FLINK-21419
> URL: https://issues.apache.org/jira/browse/FLINK-21419
> Project: Flink
> Issue Type: Sub-task
> Components: Runtime / Coordination
> Reporter: Xintong Song
> Assignee: Nicholas Jiang
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.13.0
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)