You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "stack (JIRA)" <ji...@apache.org> on 2010/10/05 23:10:32 UTC

[jira] Created: (HBASE-3084) Address review comments raised post commit of hbase-2437, "Refactor HLog splitLog"

Address review comments raised post commit of hbase-2437, "Refactor HLog splitLog"
----------------------------------------------------------------------------------

                 Key: HBASE-3084
                 URL: https://issues.apache.org/jira/browse/HBASE-3084
             Project: HBase
          Issue Type: Bug
            Reporter: stack


Nicolas reviewed hbase-2437 after it had been committed and raised some issues that need addressing:

See https://issues.apache.org/jira/browse/HBASE-2437?focusedCommentId=12881937&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12881937

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-3084) HLog splitLog : Properly Handle User Interrupts

Posted by "Nicolas Spiegelberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918272#action_12918272 ] 

Nicolas Spiegelberg commented on HBASE-3084:
--------------------------------------------

My opinion: FSUtils.recoverFileLease() should throw an InterruptedIOException if it catches a user interrupt.  There are multiple sections of HBase code that ignore interrupts (*sadness*) but this area is pretty critical since it can lead to data loss if handled incorrectly.

> HLog splitLog : Properly Handle User Interrupts
> -----------------------------------------------
>
>                 Key: HBASE-3084
>                 URL: https://issues.apache.org/jira/browse/HBASE-3084
>             Project: HBase
>          Issue Type: Bug
>          Components: io, master
>    Affects Versions: 0.89.20100924, 0.90.0, 0.92.0
>            Reporter: stack
>
> Nicolas reviewed HBASE-2437 after it had been committed and raised some issues that need addressing.  The main issue is that splitLog will ignore user interrupts (aka: InterruptException).  Currently, data loss can occur (with 'skip.errors' == true) if a user calls 'kill <master-pid>" during splits because the code will consider the interrupted file completely split.  If the master receives an interrupt during splitLog, it needs to abort splitting, delete all partially-complete split files, and exit gracefully.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-3084) HLog splitLog : Properly Handle User Interrupts

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

Nicolas Spiegelberg updated HBASE-3084:
---------------------------------------

          Component/s: master
                       io
          Description: Nicolas reviewed HBASE-2437 after it had been committed and raised some issues that need addressing.  The main issue is that splitLog will ignore user interrupts (aka: InterruptException).  Currently, data loss can occur (with 'skip.errors' == true) if a user calls 'kill <master-pid>" during splits because the code will consider the interrupted file completely split.  If the master receives an interrupt during splitLog, it needs to abort splitting, delete all partially-complete split files, and exit gracefully.    (was: Nicolas reviewed hbase-2437 after it had been committed and raised some issues that need addressing:

See https://issues.apache.org/jira/browse/HBASE-2437?focusedCommentId=12881937&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12881937)
    Affects Version/s: 0.92.0
                       0.90.0
                       0.89.20100924
              Summary: HLog splitLog : Properly Handle User Interrupts  (was: Address review comments raised post commit of hbase-2437, "Refactor HLog splitLog")

> HLog splitLog : Properly Handle User Interrupts
> -----------------------------------------------
>
>                 Key: HBASE-3084
>                 URL: https://issues.apache.org/jira/browse/HBASE-3084
>             Project: HBase
>          Issue Type: Bug
>          Components: io, master
>    Affects Versions: 0.89.20100924, 0.90.0, 0.92.0
>            Reporter: stack
>
> Nicolas reviewed HBASE-2437 after it had been committed and raised some issues that need addressing.  The main issue is that splitLog will ignore user interrupts (aka: InterruptException).  Currently, data loss can occur (with 'skip.errors' == true) if a user calls 'kill <master-pid>" during splits because the code will consider the interrupted file completely split.  If the master receives an interrupt during splitLog, it needs to abort splitting, delete all partially-complete split files, and exit gracefully.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-3084) Address review comments raised post commit of hbase-2437, "Refactor HLog splitLog"

Posted by "Nicolas Spiegelberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918255#action_12918255 ] 

Nicolas Spiegelberg commented on HBASE-3084:
--------------------------------------------

My Comments

1. FSUtils.recoverFileLease() - does the InterruptedException handler need to set Thread.currentThread().interrupt()? What about users actually trying to kill the master?
2. parseHLog() - the comment says that len==0 can still happen with append support? At least for 0.20, that's only if the file wasn't closed. However, we just did that immediately before in recoverFileLease. don't mind the code, but comment should change or be clarified
3. writeEditsBatchToRegions() - same thing with InterruptedException. maybe want to have something higher up the call stack notice isInterrupted() and display a Log.info() message. At the very least, we definitely don't want to delete the log directory in splitLog() if the user interrupts these threads and skipErrors==true
4. archiveLogs() - by default, we are archiving successfully split logs ala 'processedLogs'? I'm not sure we want to do that by default. I think people are mainly interested in problematic logs that couldn't survive the transition. Having this as an optional toggle is okay, but a naive user wouldn't know he has these trash items.


> Address review comments raised post commit of hbase-2437, "Refactor HLog splitLog"
> ----------------------------------------------------------------------------------
>
>                 Key: HBASE-3084
>                 URL: https://issues.apache.org/jira/browse/HBASE-3084
>             Project: HBase
>          Issue Type: Bug
>            Reporter: stack
>
> Nicolas reviewed hbase-2437 after it had been committed and raised some issues that need addressing:
> See https://issues.apache.org/jira/browse/HBASE-2437?focusedCommentId=12881937&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12881937

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HBASE-3084) HLog splitLog : Properly Handle User Interrupts

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

Nicolas Spiegelberg reassigned HBASE-3084:
------------------------------------------

    Assignee: Hairong Kuang

Hairong volunteered to take a look at this issue

> HLog splitLog : Properly Handle User Interrupts
> -----------------------------------------------
>
>                 Key: HBASE-3084
>                 URL: https://issues.apache.org/jira/browse/HBASE-3084
>             Project: HBase
>          Issue Type: Bug
>          Components: io, master
>    Affects Versions: 0.89.20100924, 0.90.0, 0.92.0
>            Reporter: stack
>            Assignee: Hairong Kuang
>
> Nicolas reviewed HBASE-2437 after it had been committed and raised some issues that need addressing.  The main issue is that splitLog will ignore user interrupts (aka: InterruptException).  Currently, data loss can occur (with 'skip.errors' == true) if a user calls 'kill <master-pid>" during splits because the code will consider the interrupted file completely split.  If the master receives an interrupt during splitLog, it needs to abort splitting, delete all partially-complete split files, and exit gracefully.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.