You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Lars Hofhansl (JIRA)" <ji...@apache.org> on 2013/12/01 06:02:36 UTC

[jira] [Updated] (HBASE-10060) Unsynchronized scanning

     [ https://issues.apache.org/jira/browse/HBASE-10060?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Hofhansl updated HBASE-10060:
----------------------------------

    Attachment: 10060-trunk.txt

Sample trunk patch. Please have a look (not too dissimilar to one of the attempts on HBASE-10015, but deals with the compactions/flushes as well).

Uses RegionScannerImpl as lock delegate when available, otherwise the called must hold a lock on the StoreScanner instance.

This notably makes the code a bit more error prone, and it breaks the abstraction of StoreScanner a bit.

Maybe the lock delegation could be abstracted a bit nicer.


> Unsynchronized scanning
> -----------------------
>
>                 Key: HBASE-10060
>                 URL: https://issues.apache.org/jira/browse/HBASE-10060
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>         Attachments: 10060-trunk.txt
>
>
> HBASE-10015 has some lengthy discussion. The solution there ended up replacing synchronized with ReentrantLock, which - somewhat surprisingly - yielded a non-trivial improvement for tall tables.
> The goal should be to avoid locking in StoreScanner at all. StoreScanner is only accessed by a single thread *except* when we have a concurrent flush or a compaction, which is rare (we'd acquire and release the lock millions of times per second, and compact/flush a few time an hour at the most).



--
This message was sent by Atlassian JIRA
(v6.1#6144)