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

xulei commented on BOOKKEEPER-50:
---------------------------------

I mean that in Bookie.java:195
                    // XXX we net to make sure we set the master keys 
appropriately!
                    LedgerDescriptor handle = getHandle(ledgerId, false);
the second param is false, so in getHandle() function, if there is no ledger 
descriptor according to the ledgerId in legders, it will create a ledger 
descriptor which masterkey is null.

> NullPointException at LedgerDescriptor#cmpMasterKey
> ---------------------------------------------------
>
>                 Key: BOOKKEEPER-50
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-50
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 3.4.0
>            Reporter: xulei
>         Attachments: bookkeeper-50.patch
>
>
> the LedgerDescriptor will be created when it is missed in LedgerCache. 
> NullPointException will be thrown out in the following case:
> 1. The ledger descriptor is created and cached to LedgerCache because of a 
> readEntry operation in bookie. The ledger descriptor was created without 
> setting master key (we don't know master key in a read request)
> 2. An addEntry is sent after 1 . since the ledger descriptor has been cached, 
> so addEntry will use it to compare master key. then NullPointException is 
> thrown out.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to