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

Jay Zhuang edited comment on CASSANDRA-14066 at 11/22/17 12:12 AM:
-------------------------------------------------------------------

It's a real issue with 
[{{CommitLogReplayer.replayFiles()}}|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java#L145].
 For the CDC data, it's handling the wrong file (the right one + 1, and in the 
wrong list: 
[{{CommitLogReplayer.java:151}}|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java#L151]).

Sometimes, it's causing the following exception:
{noformat}
java.lang.ArrayIndexOutOfBoundsException: 4
at 
org.apache.cassandra.db.commitlog.CommitLogReplayer.replayFiles(CommittLogReplayer.java:155)
at 
org.apache.cassandra.db.commitlog.CDCCTestReplayer.examineCommitLog(CDCTestReplayer.java:48)
at 
org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDDCTest.testReplayLogic(CommitLogSegmentManagerCDCTest.java:318)
{noformat}

Here is the fix, please review (it's only impacting trunk, 3.11 branch is fine):
| Branch | uTest |
| [14066-trunk|https://github.com/cooldoger/cassandra/tree/14066-trunk] | 
[!https://circleci.com/gh/cooldoger/cassandra/tree/14066-trunk.svg?style=svg!|https://circleci.com/gh/cooldoger/cassandra/tree/14066-trunk]
 |


was (Author: jay.zhuang):
It's a real issue with 
[{{CommitLogReplayer.replayFiles()}}|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java#L145].
 For the CDC data, it's handling the wrong file (the right one + 1, and in the 
wrong list: 
[{{CommitLogReplayer.java:151}}|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java#L151]).

Sometimes, it's causing the following exception:
{noformat}
java.lang.ArrayIndexOutOfBoundsException: 4
at 
org.apache.cassandra.db.commitlog.CommitLogReplayer.replayFiles(CommittLogReplayer.java:155)
at 
org.apache.cassandra.db.commitlog.CDCCTestReplayer.examineCommitLog(CDCTestReplayer.java:48)
at 
org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDDCTest.testReplayLogic(CommitLogSegmentManagerCDCTest.java:318)
{noformat}

Here is the fix, please review:
| Branch | uTest |
| [14066-trunk|https://github.com/cooldoger/cassandra/tree/14066-trunk] | 
[!https://circleci.com/gh/cooldoger/cassandra/tree/14066-trunk.svg?style=svg!|https://circleci.com/gh/cooldoger/cassandra/tree/14066-trunk]
 |

> unittest failed: CommitLogSegmentManagerCDCTest.testReplayLogic
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-14066
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14066
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Testing
>            Reporter: Jay Zhuang
>            Assignee: Jay Zhuang
>
> To reproduce:
> {noformat}
> $ ant test-cdc -Dtest.name=CommitLogSegmentManagerCDCTest
> {noformat}
> Error:
> {noformat}
>     [junit] Testcase: 
> testReplayLogic(org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDCTest)-cdc:
>     FAILED
>     [junit] Missing old CDCIndexData in new set after replay: 
> CommitLog-7-1511301220821_cdc.idx,3497190
>     [junit] List of CDCIndexData in new set of indexes after replay:
>     [junit]    CommitLog-7-1511301220822_cdc.idx,3509214
>     [junit]    CommitLog-7-1511301220823_cdc.idx,100
>     [junit]
>     [junit] junit.framework.AssertionFailedError: Missing old CDCIndexData in 
> new set after replay: CommitLog-7-1511301220821_cdc.idx,3497190
>     [junit] List of CDCIndexData in new set of indexes after replay:
>     [junit]    CommitLog-7-1511301220822_cdc.idx,3509214
>     [junit]    CommitLog-7-1511301220823_cdc.idx,100
>     [junit]
>     [junit]     at 
> org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDCTest.testReplayLogic(CommitLogSegmentManagerCDCTest.java:345)
>     [junit]
>     [junit]
>     [junit] Test 
> org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDCTest FAILED
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to