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

Ivan Kelly commented on BOOKKEEPER-346:
---------------------------------------

Theres a logic error in the patch (and in my suggested solution). It causes 
CompationTest to fail.
{code}
if (!index.isFile()
   || !index.getName().endsWith(".idx")
   || !index.getName().endsWith(".rloc")) {
   continue;
}
{code}
should be 
{code}
if (!index.isFile()
   || (!index.getName().endsWith(".idx")
       && !index.getName().endsWith(".rloc"))) {
   continue;
}
{code}

Also, cutting the code at 80 chars is causing the code to be harder to read. 
Generally, for Java I use 120 as the character limit, as with java you've 
usually lost 8 characters (class and method indent) before you can write any 
code. HDFS does use 80, but their indent level is 2. 120 has been the defacto 
standard for BK/hedwig, though I can find anywhere that it's written down.
                
> Detect IOExceptions in LedgerCache and bookie should look at next ledger 
> dir(if any)
> ------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-346
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-346
>             Project: Bookkeeper
>          Issue Type: Sub-task
>          Components: bookkeeper-server
>    Affects Versions: 4.1.0
>            Reporter: Rakesh R
>            Assignee: Vinay
>             Fix For: 4.2.0
>
>         Attachments: BOOKKEEPER-346.patch, BOOKKEEPER-346.patch, 
> BOOKKEEPER-346.patch, BOOKKEEPER-346.patch, BOOKKEEPER-346.patch, 
> BOOKKEEPER-346.patch, BOOKKEEPER-346.patch, BOOKKEEPER-346.patch
>
>
> This jira to detect IOExceptions in "LedgerCache" to iterate over all the 
> configured ledger(s).

--
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