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

Andrew Purtell commented on HBASE-19024:
----------------------------------------

Region is the public interface, HRegion is the private implementation. I think 
public constants should go in Region. 

This comment in HRegion needs to be removed:
{code}
         // sync the WAL edit (SYNC and FSYNC treated the same for now)
{code}

v6 patch applies for me.

Tests look good.  However, it looks like we don't test the new functionality? 
We should have a unit that verifies this works. Anyway, there are two ways I'd 
like to see this done. First, parameterize a test such that we run it once with 
hbase.wal.hsync = false, then again with hbase.wal.hsync = true. Pick one of 
the WAL tests. For an example of how to do this, see how TestSecureWALReplay 
extends TestWALReplay. It would also be good to have an end to end test where 
we set Durability.FSYNC_WAL on a Put and with Mockito.spy verify that HRegion 
does the right thing regardless of the setting of hbase.wal.hsync. 

> provide a configurable option to hsync WAL edits to the disk for better 
> durability
> ----------------------------------------------------------------------------------
>
>                 Key: HBASE-19024
>                 URL: https://issues.apache.org/jira/browse/HBASE-19024
>             Project: HBase
>          Issue Type: Improvement
>          Components: wal
>         Environment: 
>            Reporter: Vikas Vishwakarma
>            Assignee: Harshal Jain
>            Priority: Major
>         Attachments: branch-1.branch-1.patch, branch-1.v1.branch-1.patch, 
> master.patch, master.v2.patch, master.v3.patch, master.v5.patch, 
> master.v5.patch, master.v6.patch
>
>
> At present we do not have an option to hsync WAL edits to the disk for better 
> durability. In our local tests we see 10-15% latency impact of using hsync 
> instead of hflush which is not very high.  
> We should have a configurable option to hysnc WAL edits instead of just 
> sync/hflush which will call the corresponding API on the hadoop side. 
> Currently HBase handles both SYNC_WAL and FSYNC_WAL as the same calling 
> FSDataOutputStream sync/hflush on the hadoop side. This can be modified to 
> let FSYNC_WAL call hsync on the hadoop side instead of sync/hflush. We can 
> keep the default value to sync as the current behavior and hsync can be 
> enabled based on explicit configuration.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to