hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (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 Sat, 20 May 2017 18:35:04 GMT

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

stack commented on HBASE-18066:
-------------------------------

bq. ... but I do not know the history of this method so let's wait for a while.

We have getClosestRowBefore because we did not have a reverse Scan. We have to reverse Scan
as part of 'normal' operation because we made a mistake doing the schema for hbase;meta*.

* hbase:meta is made with keys that are the regioninfo serialized. The regioninfo name includes
the startrow of the region so in hbase:meta keys are sorted first by table and then by region
startkeys.  Scans run in the sort direction which means when looking for the region that hosts
a key we scan hbase:meta and have to keep going until we hit a key that is greater than the
one we are looking for. This key will be in a region-too-far; i.e. the start row of region
that follows the one we want. So, the Scan has gone to far and we need to back up to find
the region that hosts the key we are looking for. If the hbase:meta were made of keys that
had table name and region end key, then when we found a key that was beyond the one we were
looking for, the Scan would be in the region hosting that wanted key; no need to back up.

We should have been smarter and realized our mistake sooner. It would have saved a bunch of
hackery like getRowClosestOrBefore.

> 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)`
option.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message