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

Jiannan Wang commented on BOOKKEEPER-596:
-----------------------------------------

Thanks fangmin's new patch, here are two comments:
   * I would suggest add more documentation about the LedgerRange constructor.
   * The "throw new NoSuchElementException()" in next() method seems 
unnecessary since there will be a hasNext() call before invoking next() in 
general case. If you really want to consider this corner situation then the 
condition check "if (!hasMoreElement) {" should be "if (!hasNext()) {" since we 
need to wait for the openCursor callback or the cursor is null which causes a 
NPE.

Personally, I would prefer Sijie's change which removes the LedgerRange 
constructor implementation dependency.
                
> Ledgers are gc'ed by mistake in MSLedgerManagerFactory.
> -------------------------------------------------------
>
>                 Key: BOOKKEEPER-596
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-596
>             Project: Bookkeeper
>          Issue Type: Bug
>    Affects Versions: 4.2.0, 4.2.1
>            Reporter: Sijie Guo
>            Assignee: Sijie Guo
>            Priority: Blocker
>             Fix For: 4.3.0
>
>         Attachments: BOOKKEEPER-596.patch, BOOKKEEPER-596.patch, 
> BOOKKEEPER-596.patch
>
>
> details: 
> https://issues.apache.org/jira/browse/BOOKKEEPER-590?focusedCommentId=13616397&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13616397

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