You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Maryann Xue (JIRA)" <ji...@apache.org> on 2014/02/28 21:06:19 UTC
[jira] [Created] (PHOENIX-90) MemoryChunk objects might be orphaned
when creating new caches in TenantCacheImpl
Maryann Xue created PHOENIX-90:
----------------------------------
Summary: MemoryChunk objects might be orphaned when creating new caches in TenantCacheImpl
Key: PHOENIX-90
URL: https://issues.apache.org/jira/browse/PHOENIX-90
Project: Phoenix
Issue Type: Bug
Affects Versions: 3.0.0
Reporter: Maryann Xue
Assignee: Maryann Xue
Priority: Minor
Fix For: 3.0.0
{code}
@Override
public Closeable addServerCache(ImmutableBytesPtr cacheId, ImmutableBytesWritable cachePtr, ServerCacheFactory cacheFactory) throws SQLException {
MemoryChunk chunk = this.getMemoryManager().allocate(cachePtr.getLength());
Closeable element = cacheFactory.newCache(cachePtr, chunk);
getServerCaches().put(cacheId, element);
return element;
}
{code}
The above code might lead to the "chunk" object being orphaned if any exception happens within "cacheFactory.newCache()".
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)