hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prakash Khemani (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-2957) Release row lock when waiting for wal-sync
Date Wed, 08 Sep 2010 17:07:33 GMT

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

Prakash Khemani commented on HBASE-2957:

Yes, delayed syncs should almost always work. The problem is that they don't guarantee consistency.
What I am arguing is that we can get consistency and the delayed syncs like performance at
the same time.

I also discussed this offline with Jonathan a little bit. Let me try one more time.

Today, by default, HBase operates in "writers wait for sync" mode. This is good because it
guarantees both durability and consistency. It is bad because it can be slow.

Deferred syncs neither guarantee durability nor consistency.

By consistency I mean the following - if A is the cause of B, and if B is present in the logs
then A must also be present in the logs.

If we can have HBase operate in "readers wait for sync" mode then we don't guarantee durability
but we still guarantee consistency. And the performance should be similar to that of deferred


> Release row lock when waiting for wal-sync
> ------------------------------------------
>                 Key: HBASE-2957
>                 URL: https://issues.apache.org/jira/browse/HBASE-2957
>             Project: HBase
>          Issue Type: Improvement
>          Components: regionserver, wal
>    Affects Versions: 0.20.0
>            Reporter: Prakash Khemani
> Is there a reason to hold on to the row-lock while waiting for the WAL-sync to be completed
by the logSyncer thread?
> I think data consistency will be guaranteed even if the following happens (a) the row
lock is held while the row is updated in memory (b) the row lock is released after queuing
the KV record for WAL-syncing (c) the log-sync system guarantees that the log records for
any given row are synced in order (d) the HBase client only receives a success notification
after the sync completes (no change from the current state)
> I think this should be a huge win. For my use case, and I am sure for others,  the handler
thread spends the bulk of its row-lock critical section  time waiting for sync to complete.
> Even if the log-sync system cannot guarantee the orderly completion of sync records,
the "Don't hold row lock while waiting for sync" option should be available to HBase clients
on a per request basis.

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

View raw message