You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "Sijie Guo (Created) (JIRA)" <ji...@apache.org> on 2012/02/16 08:10:59 UTC

[jira] [Created] (BOOKKEEPER-174) Bookie can't start when replaying entries whose ledger were deleted and garbage collected.

Bookie can't start when replaying entries whose ledger were deleted and garbage collected.
------------------------------------------------------------------------------------------

                 Key: BOOKKEEPER-174
                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-174
             Project: Bookkeeper
          Issue Type: Bug
          Components: bookkeeper-server
    Affects Versions: 4.0.0
            Reporter: Sijie Guo
            Assignee: Sijie Guo
             Fix For: 4.1.0


if a journal contains entries which the ledgers they belongs to has been deleted and garbage collected, replaying such journal would encounter NoSuchLedgerException. And the bookie can't start.

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

        

[jira] [Updated] (BOOKKEEPER-174) Bookie can't start when replaying entries whose ledger were deleted and garbage collected.

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

Sijie Guo updated BOOKKEEPER-174:
---------------------------------

    Attachment: BOOKKEEPER-174.diff_v2

attach a new patch.
                
> Bookie can't start when replaying entries whose ledger were deleted and garbage collected.
> ------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-174
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-174
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.0.0
>            Reporter: Sijie Guo
>            Assignee: Sijie Guo
>             Fix For: 4.1.0
>
>         Attachments: BOOKKEEPER-174.diff, BOOKKEEPER-174.diff_v2
>
>
> if a journal contains entries which the ledgers they belongs to has been deleted and garbage collected, replaying such journal would encounter NoSuchLedgerException. And the bookie can't start.

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

        

[jira] [Commented] (BOOKKEEPER-174) Bookie can't start when replaying entries whose ledger were deleted and garbage collected.

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

Ivan Kelly commented on BOOKKEEPER-174:
---------------------------------------

Fix looks good. I have a few cosmetic comments. 
a) isDebugEnabled isn't actually required here, since we use slf4j. We can just use the {} formatting mechanism. For example:
{code}
if (LOG.isDebugEnabled()) {
  LOG.debug("Skip replaying entries of ledger " + ledgerId + " since it was deleted.");
}
{code}
Can be written as 
{code}
LOG.debug("Skip replaying entries of ledger {} since it was deleted.", ledgerId);
{code}
Which is much neater.

b) I think you should add the tests into BookieJournalTest rather than creating a new suite.
                
> Bookie can't start when replaying entries whose ledger were deleted and garbage collected.
> ------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-174
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-174
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.0.0
>            Reporter: Sijie Guo
>            Assignee: Sijie Guo
>             Fix For: 4.1.0
>
>         Attachments: BOOKKEEPER-174.diff
>
>
> if a journal contains entries which the ledgers they belongs to has been deleted and garbage collected, replaying such journal would encounter NoSuchLedgerException. And the bookie can't start.

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

        

[jira] [Commented] (BOOKKEEPER-174) Bookie can't start when replaying entries whose ledger were deleted and garbage collected.

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

Hudson commented on BOOKKEEPER-174:
-----------------------------------

Integrated in bookkeeper-trunk #365 (See [https://builds.apache.org/job/bookkeeper-trunk/365/])
    BOOKKEEPER-174: Bookie can't start when replaying entries whose ledger were deleted and garbage collected. (sijie via ivank) (Revision 1245411)

     Result = ABORTED
ivank : 
Files : 
* /zookeeper/bookkeeper/trunk/CHANGES.txt
* /zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java
* /zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieJournalRollingTest.java

                
> Bookie can't start when replaying entries whose ledger were deleted and garbage collected.
> ------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-174
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-174
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.0.0
>            Reporter: Sijie Guo
>            Assignee: Ivan Kelly
>             Fix For: 4.1.0
>
>         Attachments: BOOKKEEPER-174.diff, BOOKKEEPER-174.diff_v2, BOOKKEEPER-174.diff_v3
>
>
> if a journal contains entries which the ledgers they belongs to has been deleted and garbage collected, replaying such journal would encounter NoSuchLedgerException. And the bookie can't start.

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

        

[jira] [Updated] (BOOKKEEPER-174) Bookie can't start when replaying entries whose ledger were deleted and garbage collected.

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

Sijie Guo updated BOOKKEEPER-174:
---------------------------------

    Attachment: BOOKKEEPER-174.diff_v3

after discussion with Ivan, the case that adding to the ledger throw NoLedgerException and ledgerManager.ledgerExists() returns true should not happen. so it is safe to skip entry when found NoLedgerException. So I remove the ledgerExists related staff in the new patch.
                
> Bookie can't start when replaying entries whose ledger were deleted and garbage collected.
> ------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-174
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-174
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.0.0
>            Reporter: Sijie Guo
>            Assignee: Sijie Guo
>             Fix For: 4.1.0
>
>         Attachments: BOOKKEEPER-174.diff, BOOKKEEPER-174.diff_v2, BOOKKEEPER-174.diff_v3
>
>
> if a journal contains entries which the ledgers they belongs to has been deleted and garbage collected, replaying such journal would encounter NoSuchLedgerException. And the bookie can't start.

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

        

[jira] [Updated] (BOOKKEEPER-174) Bookie can't start when replaying entries whose ledger were deleted and garbage collected.

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

Sijie Guo updated BOOKKEEPER-174:
---------------------------------

    Attachment: BOOKKEEPER-174.diff

attach a patch to fix this issue. the idea is when encountering NoLedgerException on replaying journals, we need to check whether the ledger is still existed or not. if the ledger has been removed, we just skip replaying the entry.
                
> Bookie can't start when replaying entries whose ledger were deleted and garbage collected.
> ------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-174
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-174
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.0.0
>            Reporter: Sijie Guo
>            Assignee: Sijie Guo
>             Fix For: 4.1.0
>
>         Attachments: BOOKKEEPER-174.diff
>
>
> if a journal contains entries which the ledgers they belongs to has been deleted and garbage collected, replaying such journal would encounter NoSuchLedgerException. And the bookie can't start.

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

        

[jira] [Commented] (BOOKKEEPER-174) Bookie can't start when replaying entries whose ledger were deleted and garbage collected.

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

Sijie Guo commented on BOOKKEEPER-174:
--------------------------------------

the new test case is based on BaseTestCase while BookieJournalTest is not. since the test case is related to journal rolling so I prefer to add in BookieJournalRollingTest instead in BookieJournalTest.
                
> Bookie can't start when replaying entries whose ledger were deleted and garbage collected.
> ------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-174
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-174
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.0.0
>            Reporter: Sijie Guo
>            Assignee: Sijie Guo
>             Fix For: 4.1.0
>
>         Attachments: BOOKKEEPER-174.diff
>
>
> if a journal contains entries which the ledgers they belongs to has been deleted and garbage collected, replaying such journal would encounter NoSuchLedgerException. And the bookie can't start.

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