zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ZOOKEEPER-3039) TxnLogToolkit uses Scanner badly
Date Fri, 11 May 2018 01:59:00 GMT

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

ASF GitHub Bot updated ZOOKEEPER-3039:
--------------------------------------
    Labels: pull-request-available  (was: )

> 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
>              Labels: pull-request-available
>             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