hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng Hu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-18066) Get with closest_row_before on "hbase:meta" can return empty Cell during region merge/split
Date Fri, 19 May 2017 15:40:05 GMT

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

Zheng Hu commented on HBASE-18066:

bq.  so it is possible that we delete the row between step 1 and step 2 so you get a strange
empty result.

[~Apache9],  not delete the row, I mean.  Assume that there are two threads: Thread-1 is doing
a Put and Thread-2 is doing a Get with closestRowBefore.  If following steps are met  , then
we'll get a NONE key-value returned. 

1. Thread-1 get a new mvcc.writeNumber ; 
2. Thread-1 apply put to memstore  ; 
3. Thread-2  try to  get the closest row key,  and the closest rowkey we get is the rowkey
we put in step-2 ;    # This is  the key. 
4. Thread-2  use the row key to get the final value. Thread-2 cannot see the  value because
Thread-1 does not commit the transaction yet.  So we get a NONE key-value return. 
5. Thread-1  commit the transaction & mvcc.readPoint increase. 

> Get with closest_row_before on "hbase:meta" can return empty Cell during region merge/split
> -------------------------------------------------------------------------------------------
>                 Key: HBASE-18066
>                 URL: https://issues.apache.org/jira/browse/HBASE-18066
>             Project: HBase
>          Issue Type: Bug
>          Components: hbase, regionserver
>    Affects Versions: 1.3.1
>         Environment: Linux (16.04.2), MacOS 10.11.6.
> Standalone and distributed HBase setup.
>            Reporter: Andrey Elenskiy
>         Attachments: TestGetWithClosestRowBeforeWhenSplit.java
> During region split/merge there's a brief period of time where doing a "Get" with "closest_row_before=true"
on "hbase:meta" may return empty "GetResponse.result.cell" field even though parent, splitA
and splitB regions are all in "hbase:meta". Both gohbase (https://github.com/tsuna/gohbase)
and AsyncHBase (https://github.com/OpenTSDB/asynchbase) interprets this as "TableDoesNotExist",
which is returned to the client.
> Here's a gist that reproduces this problem: https://gist.github.com/Timoha/c7a236b768be9220e85e53e1ca53bf96.
Note that you have to use older HTable client (I used 1.2.4) as current versions ignore `Get.setClosestRowBefore(bool)`

This message was sent by Atlassian JIRA

View raw message