hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Kellerman (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-810) Prevent temporary deadlocks when, during a scan with write operations, the region splits
Date Wed, 20 Aug 2008 22:24:44 GMT

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

Jim Kellerman commented on HBASE-810:
-------------------------------------

Ok, now I see the problem (duh!). HRegion.close acquires the splitsAndCloses write lock preventing
further updates. But then it waits until all the scanners exit. But the process doing the
scanning also wants to do updates, so it is blocked on the splitsAndCloses write lock. Thus
all the scanners cannot exit so close is blocked, and the process cannot do updates so it
is blocked.

I will post a new lock sequence diagram that indicates the changes needed. All changes will
be marked with RED.

> Prevent temporary deadlocks when, during a scan with write operations, the region splits
> ----------------------------------------------------------------------------------------
>
>                 Key: HBASE-810
>                 URL: https://issues.apache.org/jira/browse/HBASE-810
>             Project: Hadoop HBase
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Jean-Daniel Cryans
>            Priority: Blocker
>             Fix For: 0.2.1, 0.3.0
>
>         Attachments: lock-sequencing.jpg, locking-compatibility.jpg
>
>
> HBASE-804 was not about the good problem, this one is. Anyone that iterates through the
results of a scanner and that rewrites data back into the row at each iteration will hit a
UnknownScannerException if a split occurs. See the stack in the referred jira. Timeline :
> Split occurs, acquires a write lock and waits for scanners to finish
> The scanner in the custom code iterates and writes data until the write is blocked by
the lock
> deadlock
> The scanner timeouts thus the region splits but the USE will be thrown when next() is
called
> Inside a Map, the task will simply be retried when the first one fails. Elsewhere, it
becomes more complicated.

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


Mime
View raw message