You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Marcus Eriksson (JIRA)" <ji...@apache.org> on 2014/06/02 09:08:02 UTC

[jira] [Commented] (CASSANDRA-7330) Infinite loop in StreamReader.read during exception condition while running repair

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

Marcus Eriksson commented on CASSANDRA-7330:
--------------------------------------------

patch looks good to me, but lets wait with committing until we have the AE figured out

> Infinite loop in StreamReader.read during exception condition while running repair
> ----------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-7330
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7330
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: 2.0.8+
>            Reporter: Joshua McKenzie
>            Assignee: Joshua McKenzie
>            Priority: Minor
>              Labels: Core
>             Fix For: 2.0.9
>
>         Attachments: 7330_v1.txt
>
>
> InputStream.skip is returning -1 during exception conditions which leads the following logic to infinite loop:
> {code:title=loop}
> protected void drain(InputStream dis, long bytesRead) throws IOException
> {
>     long toSkip = totalSize() - bytesRead;
>     toSkip = toSkip - dis.skip(toSkip);
>     while (toSkip > 0)
>         toSkip = toSkip - dis.skip(toSkip);
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)