[
https://issues.jboss.org/browse/TEIID-2359?page=com.atlassian.jira.plugin...
]
Steven Hawkins commented on TEIID-2359:
---------------------------------------
I need to correct my thoughts above. The reserved by thread ThreadLocal will not keep a
BufferManagerImpl reference alive as the ThreadLocal will be weakly held key - the value
is just an Integer.
There is a related issue however with the BlockByteBuffer ThreadLocal. There the value
will hold a hard reference to the memory buffer and thus may keep the buffer reference
around as long as the Thread is alive (or until the Java internal ThreadLocalMap is
compacted and tested for gc'ed keys).
I should also add this is only an issue when using local connections that use the calling
thread - otherwise all of the relevant threads will be stopped with the DQP pool is
shutdown/dereferenced.
BufferManager reserved thread local can keep buffermanager references
alive
---------------------------------------------------------------------------
Key: TEIID-2359
URL:
https://issues.jboss.org/browse/TEIID-2359
Project: Teiid
Issue Type: Feature Request
Components: Query Engine
Affects Versions: 8.0
Reporter: Steven Hawkins
Assignee: Steven Hawkins
The most common implementation of ThreadLocal holds does not garbarge collect ThreadLocal
values when the ThreadLocal goes out of scope - only when the Thread stops. Thus the
BufferManager reserved threadlocal being a non-static inner class is inadvertently keeping
a reference alive.
Marked as starting with Teiid 8.0 as selective Teiid restarts (which is how multiple
instances are introduced) are not performed in the 7.x series.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira