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-13254) EnableTableHandler#prepare would not throw TableNotFoundException during recovery
Date Tue, 17 Mar 2015 00:26:38 GMT

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

Hadoop QA commented on HBASE-13254:

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment 
  against master branch at commit dc03942ed1f2839332782995fdae5032e67fe1e7.
  ATTACHMENT ID: 12704902

    {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 hadoop versions{color}. The patch compiles with all supported hadoop versions
(2.4.1 2.5.2 2.6.0)

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

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

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

    {color:green}+1 checkstyle{color}.  The applied patch does not increase the total number
of checkstyle errors

    {color:green}+1 findbugs{color}.  The patch does not introduce any new Findbugs (version
2.0.3) 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:green}+1 core tests{color}.  The patch passed unit tests in .

Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/13273//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13273//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13273//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13273//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13273//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13273//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13273//artifact/patchprocess/newPatchFindbugsWarningshbase-rest.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13273//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13273//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13273//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13273//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13273//artifact/patchprocess/newPatchFindbugsWarningshbase-annotations.html
Checkstyle Errors: https://builds.apache.org/job/PreCommit-HBASE-Build/13273//artifact/patchprocess/checkstyle-aggregate.html

  Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/13273//console

This message is automatically generated.

> EnableTableHandler#prepare would not throw TableNotFoundException during recovery
> ---------------------------------------------------------------------------------
>                 Key: HBASE-13254
>                 URL: https://issues.apache.org/jira/browse/HBASE-13254
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Stephen Yuan Jiang
>            Assignee: Stephen Yuan Jiang
>            Priority: Minor
>         Attachments: HBASE-13254.v1-master.patch
> During recovery, when EnableTableHandler#prepare() is called, If the table does not exist,
it marks the table as deleted and does NOT throw TableNotFoundException.  The result is that
the table lock is released and the caller has no knowledge that the table not exist or already
deleted, it would continue the next step.
> {code}
>   public EnableTableHandler prepare()
>       throws TableNotFoundException, TableNotDisabledException, IOException {
>    ...
>     try {
>       // Check if table exists
>       if (!MetaTableAccessor.tableExists(this.server.getConnection(), tableName)) {
>         // retainAssignment is true only during recovery.  In normal case it is false
>         if (!this.skipTableStateCheck) {
>           throw new TableNotFoundException(tableName);
>         }
>          this.assignmentManager.getTableStateManager().setDeletedTable(tableName);
>       }
>    ...
>   }
> {code}
> However,look at the recovery code that calls the EnableTableHandler#prepare function,
AssignmentManager#recoverTableInEnablingState() expects TableNotFoundException so that it
can skip the table.
> {code}
>   private void recoverTableInEnablingState()
>           throws KeeperException, IOException {
>     Set<TableName> enablingTables = tableStateManager.
>             getTablesInStates(TableState.State.ENABLING);
>     if (enablingTables.size() != 0) {
>       for (TableName tableName : enablingTables) {
>         // Recover by calling EnableTableHandler
>         LOG.info("The table " + tableName
>             + " is in ENABLING state.  Hence recovering by moving the table"
>             + " to ENABLED state.");
>         // enableTable in sync way during master startup,
>         // no need to invoke coprocessor
>         EnableTableHandler eth = new EnableTableHandler(this.server, tableName,
>           this, tableLockManager, true);
>         try {
>           eth.prepare();
>         } catch (TableNotFoundException e) {
>           LOG.warn("Table " + tableName + " not found in hbase:meta to recover.");
>           continue;
>         }
>         eth.process();
>       }
>     }
>   }
> {code}
> The proposed fix is always throw TableNotFoundException in EnableTableHandler#prepare
if the table does not exist.
> note: this bug only applies to master, a regression from HBASE-7767.  Branch-1 has the
correct logic, after setting table state, it would throw the exception.

This message was sent by Atlassian JIRA

View raw message