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

Yuki Morishita updated CASSANDRA-5105:
--------------------------------------

    Attachment: 0002-fix-compressed-streaming-sends-extra-chunk.patch
                0001-add-CompressedInputStream-test.patch

I found one problem that can send extra chunk to destination which causes 
reading from wrong position.
This happens when the streaming section of sstable falls into the edge of 
compression chunks.
Test and fix attached.
                
> repair -pr throws EOFException
> ------------------------------
>
>                 Key: CASSANDRA-5105
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5105
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.2.0
>         Environment: Ubuntu 12.04 Java 7
>            Reporter: Michael Kjellman
>            Assignee: Yuki Morishita
>            Priority: Minor
>         Attachments: 0001-add-CompressedInputStream-test.patch, 
> 0002-fix-compressed-streaming-sends-extra-chunk.patch
>
>
> nodetool repair -pr threw an EOF exception
> {code:title=node1}
> ERROR 12:50:18,723 Exception in thread Thread[Streaming to 
> /10.8.25.113:1,5,main]
> java.lang.RuntimeException: java.io.EOFException
>       at com.google.common.base.Throwables.propagate(Throwables.java:160)
>       at 
> org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:32)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>       at java.lang.Thread.run(Thread.java:662)
> Caused by: java.io.EOFException
>       at java.io.DataInputStream.readInt(DataInputStream.java:375)
>       at 
> org.apache.cassandra.streaming.FileStreamTask.receiveReply(FileStreamTask.java:193)
>       at 
> org.apache.cassandra.streaming.compress.CompressedFileStreamTask.stream(CompressedFileStreamTask.java:114)
>       at 
> org.apache.cassandra.streaming.FileStreamTask.runMayThrow(FileStreamTask.java:91)
>       at 
> org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
> {code}
> {code:title=node2}
>  INFO 12:49:45,139 Finished streaming session to /10.8.30.13
> ERROR 12:50:18,799 Exception in thread Thread[Thread-4031,5,main]
> java.lang.RuntimeException: Last written key 
> DecoratedKey(167625858728826091814875924785363245309, 
> 6634333531356661643161636636373738353431363162353031376164386339) >= current 
> ke
> y DecoratedKey(33957321636818582219838207277782228619, 
> 696c2e636f6d200a3c42523e0a3c42523e0a5472656e7420202020202020202020202020202020422e204d697261636c652020202020202020202020202
> 020202020202020202020202020202020202020202020202020202020200a2020266e62737020266e62737020746d697261636c654073696d6d6f6e736669726d2e636f6d2c206c776f6f74656e4073696d6d6f6e736669726
> d2e636f6d203c42523e0a3c42523e0a56616e636520202020202020202020202020202020522e20416e64727573202020202020202020202020202020202020202020202020202020202020202020202020202020202020200
> a2020266e62737020266e627370207672614061622d706c632e636f6d203c42523e0a3c42523e0a5665726e6f6e202020202020202020202020202020462e20476c656e6e20202020202020202020202020202020202020202
> 020202020202020202020202020202020202020202020200a2020266e62737020266e62737020676c656e6e6c6177406c6f77636f756e7472796c61777965722e636f6d203c42523e0a3c42523e0a56696e63656e742020202
> 0202020202020202020204a2e20446573616c766f2020202020202020202020202020202020202020202020202020202020202020202020202020202020200a2020266e62737020266e6273702076646573616c766f4064657
> 3616c766f6c61776669726d2e636f6d203c42523e0a3c42523e0a56696e63656e7420202020202020202020202020204a616d65732043617274657220202020202020202020202020202020202020202020202020202020202
> 0202020202020202020200a2020202020266e62737020266e627370207663617274657240676972617264696b656573652e636f6d2c207479616d6173616b6940676972617264696b656573652e636f6d203c42523e0a0a3c4
> 2523e0a572e202020202020202020202020202020202020204a616d65732053696e676c65746f6e202020202020202020202020202020202020202020202020202020202020202020202020200a2020202020266e627370202...trunkated...324132393239413134333439413834453531394133373431)
>  writing into 
> /data/cassandra/evidence/fingerprints/evidence-fingerprints-tmp-ia-161-Data.db
>         at 
> org.apache.cassandra.io.sstable.SSTableWriter.beforeAppend(SSTableWriter.java:133)
>         at 
> org.apache.cassandra.io.sstable.SSTableWriter.appendFromStream(SSTableWriter.java:209)
>         at 
> org.apache.cassandra.streaming.IncomingStreamReader.streamIn(IncomingStreamReader.java:179)
>         at 
> org.apache.cassandra.streaming.IncomingStreamReader.read(IncomingStreamReader.java:122)
>         at 
> org.apache.cassandra.net.IncomingTcpConnection.stream(IncomingTcpConnection.java:226)
>         at 
> org.apache.cassandra.net.IncomingTcpConnection.handleStream(IncomingTcpConnection.java:166)
>         at 
> org.apache.cassandra.net.IncomingTcpConnection.run(IncomingTcpConnection.java:66)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to