hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hadoop QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-10584) Inconsistency between tableExists and listTables in implementation
Date Sat, 22 Feb 2014 23:32:19 GMT

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

Hadoop QA commented on HBASE-10584:

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment 
  against trunk revision .
  ATTACHMENT ID: 12630502

    {color:green}+1 @author{color}.  The patch does not contain any @author tags.

    {color:red}-1 tests included{color}.  The patch doesn't appear to include any new or modified
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    {color:green}+1 hadoop1.0{color}.  The patch compiles against the hadoop 1.0 profile.

    {color:green}+1 hadoop1.1{color}.  The patch compiles against the hadoop 1.1 profile.

    {color:green}+1 javadoc{color}.  The javadoc tool did not generate any warning messages.

    {color:green}+1 javac{color}.  The applied patch does not increase the total number of
javac compiler warnings.

    {color:green}+1 findbugs{color}.  The patch does not introduce any new Findbugs (version
1.3.9) warnings.

    {color:green}+1 release audit{color}.  The applied patch does not increase the total number
of release audit warnings.

    {color:green}+1 lineLengths{color}.  The patch does not introduce lines longer than 100

  {color:green}+1 site{color}.  The mvn site goal succeeds with this patch.

     {color:red}-1 core tests{color}.  The patch failed these unit tests:

Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/8775//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8775//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8775//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8775//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8775//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8775//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8775//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8775//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8775//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-thrift.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8775//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/8775//console

This message is automatically generated.

> Inconsistency between tableExists and listTables in implementation
> ------------------------------------------------------------------
>                 Key: HBASE-10584
>                 URL: https://issues.apache.org/jira/browse/HBASE-10584
>             Project: HBase
>          Issue Type: Bug
>          Components: Client, master
>            Reporter: Feng Honghua
>            Assignee: Feng Honghua
>         Attachments: HBASE-10584-trunk_v1.patch, HBASE-10584-trunk_v1.patch
> # HBaseAdmin.tableExists is implemented by scanning meta table
> # HBaseAdmin.listTables(and HBaseAdmin.getTableDescriptor) is implemented by talking
with HMaster which responses by querying the FSTableDescriptors, and FSTableDescriptors return
all tables by scanning all the table descriptor files in FS(cache also plays here, so most
of time it can be satisfied by cache)...
> Actually HBaseAdmin requests HMaster to check if a table exists internally when implementing
deleteTable(see below), then why does it use a different(scanning meta table) way to implementing
tableExists() for outside user to use for the same purpose?
> {code}
>   tableExists = false;
>   GetTableDescriptorsResponse htds;
>   MasterKeepAliveConnection master = connection.getKeepAliveMasterService();
>   try {
>     GetTableDescriptorsRequest req =
>     RequestConverter.buildGetTableDescriptorsRequest(tableName);
>     htds = master.getTableDescriptors(null, req);
>   } catch (ServiceException se) {
>     throw ProtobufUtil.getRemoteException(se);
>   } finally {
>     master.close();
>   }
>   tableExists = !htds.getTableSchemaList().isEmpty();
> {code}
> (Above verifying that table descriptor file is deleted can guarantee all items of this
table are deleted from meta table...)
> Since creating table descriptor files and inserting item to meta table occur in different
time without atomic semantic, this inconsistency in implementation can lead to confusing behaviors
when create-table or delete-table fails midway, (before according cleanup is done) table descriptor
file may exists while no item exists in meta table (for create-table where table descriptor
file is created before inserting item to meta table), this leads to listTables including that
table, while tableExists says no. Similar inconsistency if delete-table fails mid-way...
> Confusing behavior can happen during the process even though eventually it succeed:
> # During table creation, when a user calls listTables and then calls tableExists for
this table after the table descriptor is created but before item is inserted to meta table.
He will find the listTables includes a table but tableExists return false for that same table,
this behavior is confusing and should only acceptable during the table is being deleted...
> # Similar behavior occurs during table deletion.
> Seems the benefit of implementing tableExists this way is we can avoid talking with HMaster,
considering we talk with HMaster for listTables and getTableDescriptor, such benefit can't
offset the drawback from inconsistency.

This message was sent by Atlassian JIRA

View raw message