You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2014/03/01 00:16:21 UTC

[jira] [Commented] (PHOENIX-85) Refine error handling in HashJoinPlan execution and add warnings

    [ https://issues.apache.org/jira/browse/PHOENIX-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13916560#comment-13916560 ] 

ASF GitHub Bot commented on PHOENIX-85:
---------------------------------------

Github user JamesRTaylor commented on a diff in the pull request:

    https://github.com/apache/incubator-phoenix/pull/10#discussion_r10185708
  
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/cache/TenantCacheImpl.java ---
    @@ -82,9 +82,17 @@ public Closeable getServerCache(ImmutableBytesPtr cacheId) {
         @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;
    +        try {
    --- End diff --
    
    Good catch, but I'd code this like this instead so that you guarantee to close the chunk and ignore any exception that occurs when you close it, as you'd be in the middle of throwing another, different exception:
    
        boolean success = false;
        try {
            Closeable element = cacheFactory.newCache(cachePtr, chunk);
            getServerCaches().put(cacheId, element);
            success = true;
            return element;
        } finally {
            if (!success) Closeables.closeQuietly(chunk); // com.google.common.io.Closeables
        }


> Refine error handling in HashJoinPlan execution and add warnings
> ----------------------------------------------------------------
>
>                 Key: PHOENIX-85
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-85
>             Project: Phoenix
>          Issue Type: Improvement
>    Affects Versions: 3.0.0
>            Reporter: Maryann Xue
>            Assignee: Maryann Xue
>            Priority: Trivial
>             Fix For: 3.0.0
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Remove all hash cache spontaneously if any of the sub-query execution raises an exception.
> Compare the end time of each sub-query execution with the earliest finished sub-query execution. If the time difference is greater than the "max server cache live time", warn users that the earlier hash caches on the server might have expired and have been removed.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)