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

[email protected] commented on BOOKKEEPER-50:
---------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2642/
-----------------------------------------------------------

(Updated 2011-11-04 09:42:25.648660)


Review request for bookkeeper.


Changes
-------

attach a new patch according to Ivan's suggestions.

1) add javadoc in FileInfo to describe format of index file
2) fixed typos
3) distinguish empty master key (length is zero) from null master key. it 
supports storing zero-length master key.
4) I renamed _read to readData. since we have write in FileInfo, read is much 
suitable; also we don't need to change FileInfo.read in other files.


Summary
-------

save master key in header part of ledger index file.

so we can load master key when opening an existed ledger index file to avoid 
that master key is null.


This addresses bug BOOKKEEPER-50.
    http://issues.apache.org/jira/browse/BOOKKEEPER-50


Diffs (updated)
-----

  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java
 1197114 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/FileInfo.java
 1197114 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BaseTestCase.java
 1197114 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieReadAfterBookieRestartTest.java
 PRE-CREATION 

Diff: https://reviews.apache.org/r/2642/diff


Testing
-------


Thanks,

Sijie


                
> 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
>            Assignee: Sijie Guo
>             Fix For: 4.0.0
>
>         Attachments: BookieReadAfterBookieRestartTest.java, 
> bookkeeper-50.patch, bookkeeper-50.patch, bookkeeper-50.patch_v2
>
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to