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

Sijie Guo commented on BOOKKEEPER-847:
--------------------------------------

[~rakeshr] I just took at the code

{code}
int deadBookieIndex = ensemble.indexOf(oldBookie);
        ensemble.remove(deadBookieIndex);
        ensemble.add(deadBookieIndex, newBookie);
{code}

this is definitely a bug. indexOf would return -1 ( 
http://docs.oracle.com/javase/7/docs/api/java/util/List.html#indexOf(java.lang.Object)
 )



> ArrayIndexOutOfBoundsException in LedgerFragmentReplicator::updateEnsembleInfo
> ------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-847
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-847
>             Project: Bookkeeper
>          Issue Type: Bug
>            Reporter: Jia Zhai
>            Assignee: Jia Zhai
>
> ArrayIndexOutOfBoundsException in 
> LedgerFragmentReplicator::updateEnsembleInfo, because update ensemble info 
> might happen after re-read ledger metadata, so the ensemble might already 
> change. if ensemble is already changed, skip replacing the bookie doesn't 
> exist.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to