You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "Ivan Kelly (JIRA)" <ji...@apache.org> on 2012/10/04 19:23:47 UTC

[jira] [Created] (BOOKKEEPER-416) LedgerChecker returns underreplicated fragments for an closed ledger with no entries

Ivan Kelly created BOOKKEEPER-416:
-------------------------------------

             Summary: LedgerChecker returns underreplicated fragments for an closed ledger with no entries
                 Key: BOOKKEEPER-416
                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-416
             Project: Bookkeeper
          Issue Type: Sub-task
            Reporter: Ivan Kelly
            Assignee: Ivan Kelly
             Fix For: 4.2.0


It should return no underreplicated fragments. This causes a problem because as it can never become "fully replicated" as there are no entries to replicate, everything hangs.

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

[jira] [Commented] (BOOKKEEPER-416) LedgerChecker returns underreplicated fragments for an closed ledger with no entries

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13484275#comment-13484275 ] 

Hudson commented on BOOKKEEPER-416:
-----------------------------------

Integrated in bookkeeper-trunk #773 (See [https://builds.apache.org/job/bookkeeper-trunk/773/])
    BOOKKEEPER-416: LedgerChecker returns underreplicated fragments for an closed ledger with no entries (ivank) (Revision 1402172)

     Result = UNSTABLE
ivank : 
Files : 
* /zookeeper/bookkeeper/trunk/CHANGES.txt
* /zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerChecker.java
* /zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestLedgerChecker.java

                
> LedgerChecker returns underreplicated fragments for an closed ledger with no entries
> ------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-416
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-416
>             Project: Bookkeeper
>          Issue Type: Sub-task
>          Components: bookkeeper-auto-recovery
>            Reporter: Ivan Kelly
>            Assignee: Ivan Kelly
>             Fix For: 4.2.0
>
>         Attachments: BOOKKEEPER-416.diff, BOOKKEEPER-416.diff
>
>
> It should return no underreplicated fragments. This causes a problem because as it can never become "fully replicated" as there are no entries to replicate, everything hangs.

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

[jira] [Commented] (BOOKKEEPER-416) LedgerChecker returns underreplicated fragments for an closed ledger with no entries

Posted by "Uma Maheswara Rao G (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13484120#comment-13484120 ] 

Uma Maheswara Rao G commented on BOOKKEEPER-416:
------------------------------------------------

+1 for the patch, Thanks, Ivan for the update.
                
> LedgerChecker returns underreplicated fragments for an closed ledger with no entries
> ------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-416
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-416
>             Project: Bookkeeper
>          Issue Type: Sub-task
>          Components: bookkeeper-auto-recovery
>            Reporter: Ivan Kelly
>            Assignee: Ivan Kelly
>             Fix For: 4.2.0
>
>         Attachments: BOOKKEEPER-416.diff, BOOKKEEPER-416.diff
>
>
> It should return no underreplicated fragments. This causes a problem because as it can never become "fully replicated" as there are no entries to replicate, everything hangs.

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

[jira] [Updated] (BOOKKEEPER-416) LedgerChecker returns underreplicated fragments for an closed ledger with no entries

Posted by "Ivan Kelly (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Kelly updated BOOKKEEPER-416:
----------------------------------

    Attachment: BOOKKEEPER-416.diff

Fix is simple. If the ledger is closed and the last entry id is an INVALID_ID, it means nothing has been written, therefore don't check the segments.
                
> LedgerChecker returns underreplicated fragments for an closed ledger with no entries
> ------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-416
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-416
>             Project: Bookkeeper
>          Issue Type: Sub-task
>          Components: bookkeeper-auto-recovery
>            Reporter: Ivan Kelly
>            Assignee: Ivan Kelly
>             Fix For: 4.2.0
>
>         Attachments: BOOKKEEPER-416.diff
>
>
> It should return no underreplicated fragments. This causes a problem because as it can never become "fully replicated" as there are no entries to replicate, everything hangs.

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

[jira] [Commented] (BOOKKEEPER-416) LedgerChecker returns underreplicated fragments for an closed ledger with no entries

Posted by "Uma Maheswara Rao G (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13473982#comment-13473982 ] 

Uma Maheswara Rao G commented on BOOKKEEPER-416:
------------------------------------------------

Hi Ivan, Thanks for the patch.

We have one test testShouldNotGetAnyFragmentWithEmptyLedger, it was for open ledger. we missed this case of closed ledger.
Thanks for catching it and fixing.

{code}
       if (curEntryId != null
+            && !(lh.getLastAddConfirmed() == LedgerHandle.INVALID_ENTRY_ID && lh.getLedgerMetadata().isClosed())) {
{code}
Format required, as it is crossing more than 80 chars.

One more comment in tests is that, we need not start the Bookies again once we kill them, as we are not writing or replicating any entries in this cases right.
                
> LedgerChecker returns underreplicated fragments for an closed ledger with no entries
> ------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-416
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-416
>             Project: Bookkeeper
>          Issue Type: Sub-task
>          Components: bookkeeper-auto-recovery
>            Reporter: Ivan Kelly
>            Assignee: Ivan Kelly
>             Fix For: 4.2.0
>
>         Attachments: BOOKKEEPER-416.diff
>
>
> It should return no underreplicated fragments. This causes a problem because as it can never become "fully replicated" as there are no entries to replicate, everything hangs.

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

[jira] [Updated] (BOOKKEEPER-416) LedgerChecker returns underreplicated fragments for an closed ledger with no entries

Posted by "Ivan Kelly (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Kelly updated BOOKKEEPER-416:
----------------------------------

    Attachment: BOOKKEEPER-416.diff

New patch addresses comments. Btw, I've always taken the character limit to be 120 with bk and hedwig. I cant remember where I got think number from though.
                
> LedgerChecker returns underreplicated fragments for an closed ledger with no entries
> ------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-416
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-416
>             Project: Bookkeeper
>          Issue Type: Sub-task
>          Components: bookkeeper-auto-recovery
>            Reporter: Ivan Kelly
>            Assignee: Ivan Kelly
>             Fix For: 4.2.0
>
>         Attachments: BOOKKEEPER-416.diff, BOOKKEEPER-416.diff
>
>
> It should return no underreplicated fragments. This causes a problem because as it can never become "fully replicated" as there are no entries to replicate, everything hangs.

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