zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-3039) TxnLogToolkit uses Scanner badly
Date Thu, 10 May 2018 21:08:00 GMT

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

Hudson commented on ZOOKEEPER-3039:
-----------------------------------

FAILURE: Integrated in Jenkins build ZooKeeper-trunk #19 (See [https://builds.apache.org/job/ZooKeeper-trunk/19/])
ZOOKEEPER-3039: TxnLogToolkit uses Scanner badly (phunt: rev 2fa315b7d0ed65828479fcdcc9e76ca8552fba4a)
* (edit) src/java/test/org/apache/zookeeper/server/persistence/TxnLogToolkitTest.java
* (edit) src/java/main/org/apache/zookeeper/server/persistence/TxnLogToolkit.java


> TxnLogToolkit uses Scanner badly
> --------------------------------
>
>                 Key: ZOOKEEPER-3039
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3039
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.5.4, 3.6.0, 3.4.13
>            Reporter: Andor Molnar
>            Assignee: Andor Molnar
>            Priority: Major
>             Fix For: 3.5.4, 3.6.0, 3.4.13
>
>
> If more than 1 CRC error is found in the Txn log file, TxnLogToolkit fails to get an
answer for the second one, because it has already closed the Scanner which was probably closed
the input stream also, so exception is thrown:
> {noformat}
> ZooKeeper Transactional Log File with dbid 0 txnlog format version 2
> CRC ERROR - 4/5/18 5:16:05 AM PDT session 0x16295bafcc40000 cxid 0x1 zxid 0x100000002
closeSession null
> Would you like to fix it (Yes/No/Abort) ? y
> CRC ERROR - 4/5/18 5:17:34 AM PDT session 0x26295bafcc90000 cxid 0x0 zxid 0x200000001
closeSession null
> Would you like to fix it (Yes/No/Abort) ? Exception in thread "main" java.util.NoSuchElementException
> at java.util.Scanner.throwFor(Scanner.java:862)
> at java.util.Scanner.next(Scanner.java:1371)
> at org.apache.zookeeper.server.persistence.TxnLogToolkit.askForFix(TxnLogToolkit.java:208)
> at org.apache.zookeeper.server.persistence.TxnLogToolkit.dump(TxnLogToolkit.java:175)
> at org.apache.zookeeper.server.persistence.TxnLogToolkit.main(TxnLogToolkit.java:101){noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message