You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jun Rao (JIRA)" <ji...@apache.org> on 2009/05/27 23:28:26 UTC

[jira] Created: (CASSANDRA-201) get_slice_from forces iterating all columns and leaks file handlers with exception

get_slice_from forces iterating all columns and leaks file handlers with exception 
-----------------------------------------------------------------------------------

                 Key: CASSANDRA-201
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-201
             Project: Cassandra
          Issue Type: Bug
            Reporter: Jun Rao
            Assignee: Jun Rao


There are 2 bugs in the get_slice_from code in CFS.java. 
1. The following 2 lines forces all columns to be iterated in each iterator, which is inefficient.
            List<IColumn> L = new ArrayList();
            CollectionUtils.addAll(L, collated);
2. If any exception occurs, the opened file handlers are not closed.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-201) get_slice_from forces iterating all columns and leaks file handlers with exception

Posted by "Jun Rao (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jun Rao updated CASSANDRA-201:
------------------------------

    Attachment: issue201.patchv1

Attach a fix.

> get_slice_from forces iterating all columns and leaks file handlers with exception 
> -----------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-201
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-201
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jun Rao
>            Assignee: Jun Rao
>         Attachments: issue201.patchv1
>
>
> There are 2 bugs in the get_slice_from code in CFS.java. 
> 1. The following 2 lines forces all columns to be iterated in each iterator, which is inefficient.
>             List<IColumn> L = new ArrayList();
>             CollectionUtils.addAll(L, collated);
> 2. If any exception occurs, the opened file handlers are not closed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-201) get_slice_from forces iterating all columns and leaks file handlers with exception

Posted by "Michael Greene (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Greene updated CASSANDRA-201:
-------------------------------------

    Component/s: Core

> get_slice_from forces iterating all columns and leaks file handlers with exception 
> -----------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-201
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-201
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Jun Rao
>            Assignee: Jun Rao
>             Fix For: 0.4
>
>         Attachments: issue201.patchv1
>
>
> There are 2 bugs in the get_slice_from code in CFS.java. 
> 1. The following 2 lines forces all columns to be iterated in each iterator, which is inefficient.
>             List<IColumn> L = new ArrayList();
>             CollectionUtils.addAll(L, collated);
> 2. If any exception occurs, the opened file handlers are not closed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-201) get_slice_from forces iterating all columns and leaks file handlers with exception

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713961#action_12713961 ] 

Hudson commented on CASSANDRA-201:
----------------------------------

Integrated in Cassandra #90 (See [http://hudson.zones.apache.org/hudson/job/Cassandra/90/])
    remove unnecessary List creation in getSliceFrom and move close() cleanup for to the finally block.  patch by Jun Rao; reviewed by jbellis for 


> get_slice_from forces iterating all columns and leaks file handlers with exception 
> -----------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-201
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-201
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jun Rao
>            Assignee: Jun Rao
>         Attachments: issue201.patchv1
>
>
> There are 2 bugs in the get_slice_from code in CFS.java. 
> 1. The following 2 lines forces all columns to be iterated in each iterator, which is inefficient.
>             List<IColumn> L = new ArrayList();
>             CollectionUtils.addAll(L, collated);
> 2. If any exception occurs, the opened file handlers are not closed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.