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-3904) HConnection.isTableAvailable returns true even with not all regions available.
Date Fri, 20 May 2011 17:41:47 GMT

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

stack commented on HBASE-3904:
------------------------------

bq. From what I read in the isTableAvailable function, the Metascanvisitor ensures that if
there is at least one region not assigned, then the function will return false.

That and at least one region must be assigned (where 'assigned' is a non-null server column
which is a far from definitive test of assignedness).

bq. This isn't enough since the createTable function in master assigns one region after another.
(Refer to HMAster.createTable(final HRegionInfo [] newRegions, boolean sync))

Yes, it adds regions one at at time to .META. but then uses the bulk assign engine (this was
a recent addition by Ted -- do you have this?)

bq. Hence there might be a case when all regions are indeed fully assigned in META but it
is just that the master is yet to populate META with the rest of the regions.

Is this so?  We add the regions to .META. before we assign.  On add to .META. they will have
an empty server field so isTableAssigned should be returning false. 

I wonder if this check inside in HBaseAdmin#isTableAssigned is 'off':

{code}
              if (value == null) {
                available.set(false);
                return false;
              }
{code}

Maybe the value is 'empty', zero-length byte array.  We should check for that?  Perhaps this
is why you got "...inconsistent responses from isTableAvailable."

bq. Therefor for isTableAvailable to work correctly with createTable(splitkeys), the master
will have to populate all the regions in meta first before assigning them.

Unless I'm reading it wrong, this is what it *is* doing.   Something else is up (maybe the
above check?).





> HConnection.isTableAvailable returns true even with not all regions available.
> ------------------------------------------------------------------------------
>
>                 Key: HBASE-3904
>                 URL: https://issues.apache.org/jira/browse/HBASE-3904
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>            Reporter: Vidhyashankar Venkataraman
>            Priority: Minor
>
> This function as per the java doc is supposed to return true iff "all the regions in
the table are available". But if the table is still being created this function may return
inconsistent results (For example, when a table with a large number of split keys is created).


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message