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/03/04 00:33:21 UTC

[jira] [Resolved] (PHOENIX-90) MemoryChunk objects might be orphaned when creating new caches in TenantCacheImpl

     [ https://issues.apache.org/jira/browse/PHOENIX-90?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maryann Xue resolved PHOENIX-90.
--------------------------------

    Resolution: Fixed

> 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
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> {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.2#6252)