You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Kannan Muthukkaruppan (JIRA)" <ji...@apache.org> on 2012/10/19 00:24:03 UTC

[jira] [Created] (HBASE-7011) log rolling and cache flushing should be able to proceed in parallel

Kannan Muthukkaruppan created HBASE-7011:
--------------------------------------------

             Summary: log rolling and cache flushing should be able to proceed in parallel
                 Key: HBASE-7011
                 URL: https://issues.apache.org/jira/browse/HBASE-7011
             Project: HBase
          Issue Type: Improvement
            Reporter: Kannan Muthukkaruppan


Today, during a memstore flush (snapshot of memstore + flushing to disk), log rolling cannot happen. This seems like a bad design, and an unnecessary restriction. 

Possible reasons cited for this in code are:
(i) maintenance of the lastSeqWritten map.
(ii) writing a "completed-cache-flush" marker into the same log before the roll.

It seems that we can implement a new design for (i) to avoid holding the lock for the entire duration of the flush. And the motivation for (ii) is not even clear. We should reason this out, and make sure we can relax the restriction. [See related discussion in HBASE-6980.]


--
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] (HBASE-7011) log rolling and cache flushing should be able to proceed in parallel

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

Kannan Muthukkaruppan commented on HBASE-7011:
----------------------------------------------

Stack: Yes, that was one of the questions I posed in HBASE-6980, and decided to fork off the issue into this JIRA. Todd's theory is this flush marker is a write to the HLog just to ensure the RS has not been fenced off by master (because master thought this RS was dead).

Todd wrote: <<< If I remember correctly, there is a reason for the flush marker: it ensures that the RS hasn't been fenced on HDFS – i.e that it hasn't lost its connection to ZK and already had its log splitting started. The reason this is important is that, otherwise, it could move on to delete old log segments, which would potentially break the log split process.>>>

My response: <<< If RS zk expires, and master initiates recovery/log splitting, then the first step is to rename the log directory from .logs/rs to .logs/rs-splitting. And then the lease recovery is done on the individual files within the directory. Because of the directory name, any attempt by the old RS to delete any old log files (in the old path) should fail. Therefore, still not seeing the value of writing the flush marker.>>>


                
> log rolling and cache flushing should be able to proceed in parallel
> --------------------------------------------------------------------
>
>                 Key: HBASE-7011
>                 URL: https://issues.apache.org/jira/browse/HBASE-7011
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Kannan Muthukkaruppan
>            Assignee: Kannan Muthukkaruppan
>
> Today, during a memstore flush (snapshot of memstore + flushing to disk), log rolling cannot happen. This seems like a bad design, and an unnecessary restriction. 
> Possible reasons cited for this in code are:
> (i) maintenance of the lastSeqWritten map.
> (ii) writing a "completed-cache-flush" marker into the same log before the roll.
> It seems that we can implement a new design for (i) to avoid holding the lock for the entire duration of the flush. And the motivation for (ii) is not even clear. We should reason this out, and make sure we can relax the restriction. [See related discussion in HBASE-6980.]

--
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] (HBASE-7011) log rolling and cache flushing should be able to proceed in parallel

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

Kannan Muthukkaruppan updated HBASE-7011:
-----------------------------------------

    Assignee: Kannan Muthukkaruppan
    
> log rolling and cache flushing should be able to proceed in parallel
> --------------------------------------------------------------------
>
>                 Key: HBASE-7011
>                 URL: https://issues.apache.org/jira/browse/HBASE-7011
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Kannan Muthukkaruppan
>            Assignee: Kannan Muthukkaruppan
>
> Today, during a memstore flush (snapshot of memstore + flushing to disk), log rolling cannot happen. This seems like a bad design, and an unnecessary restriction. 
> Possible reasons cited for this in code are:
> (i) maintenance of the lastSeqWritten map.
> (ii) writing a "completed-cache-flush" marker into the same log before the roll.
> It seems that we can implement a new design for (i) to avoid holding the lock for the entire duration of the flush. And the motivation for (ii) is not even clear. We should reason this out, and make sure we can relax the restriction. [See related discussion in HBASE-6980.]

--
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] (HBASE-7011) log rolling and cache flushing should be able to proceed in parallel

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

stack commented on HBASE-7011:
------------------------------

I like Todd's reasoning.  Not sure that the original intent.  It looks like we've been writing special bytes on flush completion to the WAL since first check in (See 'HADOOP-1045.  Add contrib/hbase, a BigTable-like online database.'  Look in HLog#completeCacheFlush).  It looks like the intent was other than what Todd described going by comments at head of the class and the described intent as never implemented.  Grep CACHEFLUSH.

Your recounting of how things works now sounds good.   You say the zombie RS 'should fail' when the dir is renamed under it.  I haven't looked but if we don't already, sounds like we should add a test that proves it.

Good on you Kannan.
                
> log rolling and cache flushing should be able to proceed in parallel
> --------------------------------------------------------------------
>
>                 Key: HBASE-7011
>                 URL: https://issues.apache.org/jira/browse/HBASE-7011
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Kannan Muthukkaruppan
>            Assignee: Kannan Muthukkaruppan
>
> Today, during a memstore flush (snapshot of memstore + flushing to disk), log rolling cannot happen. This seems like a bad design, and an unnecessary restriction. 
> Possible reasons cited for this in code are:
> (i) maintenance of the lastSeqWritten map.
> (ii) writing a "completed-cache-flush" marker into the same log before the roll.
> It seems that we can implement a new design for (i) to avoid holding the lock for the entire duration of the flush. And the motivation for (ii) is not even clear. We should reason this out, and make sure we can relax the restriction. [See related discussion in HBASE-6980.]

--
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] (HBASE-7011) log rolling and cache flushing should be able to proceed in parallel

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

stack commented on HBASE-7011:
------------------------------

Is the special COMPLETE_CACHE_FLUSH edit even used anywhere?
                
> log rolling and cache flushing should be able to proceed in parallel
> --------------------------------------------------------------------
>
>                 Key: HBASE-7011
>                 URL: https://issues.apache.org/jira/browse/HBASE-7011
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Kannan Muthukkaruppan
>            Assignee: Kannan Muthukkaruppan
>
> Today, during a memstore flush (snapshot of memstore + flushing to disk), log rolling cannot happen. This seems like a bad design, and an unnecessary restriction. 
> Possible reasons cited for this in code are:
> (i) maintenance of the lastSeqWritten map.
> (ii) writing a "completed-cache-flush" marker into the same log before the roll.
> It seems that we can implement a new design for (i) to avoid holding the lock for the entire duration of the flush. And the motivation for (ii) is not even clear. We should reason this out, and make sure we can relax the restriction. [See related discussion in HBASE-6980.]

--
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] (HBASE-7011) log rolling and cache flushing should be able to proceed in parallel

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

stack commented on HBASE-7011:
------------------------------

Pardon, I meant to say, I see us writing it but I do not see us taking special action when ever we come across it reading.
                
> log rolling and cache flushing should be able to proceed in parallel
> --------------------------------------------------------------------
>
>                 Key: HBASE-7011
>                 URL: https://issues.apache.org/jira/browse/HBASE-7011
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Kannan Muthukkaruppan
>            Assignee: Kannan Muthukkaruppan
>
> Today, during a memstore flush (snapshot of memstore + flushing to disk), log rolling cannot happen. This seems like a bad design, and an unnecessary restriction. 
> Possible reasons cited for this in code are:
> (i) maintenance of the lastSeqWritten map.
> (ii) writing a "completed-cache-flush" marker into the same log before the roll.
> It seems that we can implement a new design for (i) to avoid holding the lock for the entire duration of the flush. And the motivation for (ii) is not even clear. We should reason this out, and make sure we can relax the restriction. [See related discussion in HBASE-6980.]

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