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

ASF subversion and git services commented on IMPALA-9441:
---------------------------------------------------------

Commit 00d0b0dda1e215d8e91ff52688fe6654bee52282 in impala's branch 
refs/heads/master from stiga-huang
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=00d0b0dda ]

IMPALA-9441,IMPALA-13170: Ops listing dbs/tables should handle db not exists

We have some operations listing the dbs/tables in the following steps:
  1. Get the db list
  2. Do something on the db which could fail if the db no longer exists
For instance, when authorization is enabled, SHOW DATABASES would need a
step-2 to get the owner of each db. This is fine in the legacy catalog
mode since the whole Db object is cached in the coordinator side.
However, in the local catalog mode, the msDb could be missing in the
local cache. Coordinator then triggers a getPartialCatalogObject RPC to
load it from catalogd. If the db no longer exists in catalogd, such step
will fail.

The same in GetTables HS2 requests when listing all tables in all dbs.
In step-2 we list the table names for a db. Though it exists when we get
the db list, it could be dropped when we start listing the table names
in it.

This patch adds codes to handle the exceptions due to db no longer
exists. Also improves GetSchemas to not list the table names to get rid
of the same issue.

Tests:
 - Add e2e tests

Change-Id: I2bd40d33859feca2bbd2e5f1158f3894a91c2929
Reviewed-on: http://gerrit.cloudera.org:8080/21546
Reviewed-by: Yida Wu <wydbaggio...@gmail.com>
Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>


> TestHS2.test_get_schemas is flaky in local catalog mode
> -------------------------------------------------------
>
>                 Key: IMPALA-9441
>                 URL: https://issues.apache.org/jira/browse/IMPALA-9441
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Catalog
>            Reporter: Sahil Takiar
>            Assignee: Quanlong Huang
>            Priority: Critical
>
> Saw this once on a ubuntu-16.04-dockerised-tests job:
> {code:java}
> Error Message
> hs2/hs2_test_suite.py:63: in add_session     lambda: fn(self)) 
> hs2/hs2_test_suite.py:44: in add_session_helper     fn() 
> hs2/hs2_test_suite.py:63: in <lambda>     lambda: fn(self)) 
> hs2/test_hs2.py:423: in test_get_schemas     
> TestHS2.check_response(get_schemas_resp) hs2/hs2_test_suite.py:131: in 
> check_response     assert response.status.statusCode == expected_status_code 
> E   assert 3 == 0 E    +  where 3 = 3 E    +    where 3 = 
> TStatus(errorCode=None, errorMessage="DatabaseNotFoundException: Database 
> 'test_compute_stats_impala_2201_e794b8f' not found\n", sqlState='HY000', 
> infoMessages=None, statusCode=3).statusCode E    +      where 
> TStatus(errorCode=None, errorMessage="DatabaseNotFoundException: Database 
> 'test_compute_stats_impala_2201_e794b8f' not found\n", sqlState='HY000', 
> infoMessages=None, statusCode=3) = TStatus(errorCode=None, 
> errorMessage="DatabaseNotFoundException: Database 
> 'test_compute_stats_impala_2201_e794b8f' not found\n", sqlState='HY000', 
> infoMessages=None, statusCode=3) E    +        where TStatus(errorCode=None, 
> errorMessage="DatabaseNotFoundException: Database 
> 'test_compute_stats_impala_2201_e794b8f' not found\n", sqlState='HY000', 
> infoMessages=None, statusCode=3) = 
> TGetSchemasResp(status=TStatus(errorCode=None, 
> errorMessage="DatabaseNotFoundException: Database 
> 'test_compute_stats_i...nHandle(hasResultSet=False, modifiedRowCount=None, 
> operationType=3, operationId=THandleIdentifier(secret='', guid=''))).status
> Stacktrace
> hs2/hs2_test_suite.py:63: in add_session
>     lambda: fn(self))
> hs2/hs2_test_suite.py:44: in add_session_helper
>     fn()
> hs2/hs2_test_suite.py:63: in <lambda>
>     lambda: fn(self))
> hs2/test_hs2.py:423: in test_get_schemas
>     TestHS2.check_response(get_schemas_resp)
> hs2/hs2_test_suite.py:131: in check_response
>     assert response.status.statusCode == expected_status_code
> E   assert 3 == 0
> E    +  where 3 = 3
> E    +    where 3 = TStatus(errorCode=None, 
> errorMessage="DatabaseNotFoundException: Database 
> 'test_compute_stats_impala_2201_e794b8f' not found\n", sqlState='HY000', 
> infoMessages=None, statusCode=3).statusCode
> E    +      where TStatus(errorCode=None, 
> errorMessage="DatabaseNotFoundException: Database 
> 'test_compute_stats_impala_2201_e794b8f' not found\n", sqlState='HY000', 
> infoMessages=None, statusCode=3) = TStatus(errorCode=None, 
> errorMessage="DatabaseNotFoundException: Database 
> 'test_compute_stats_impala_2201_e794b8f' not found\n", sqlState='HY000', 
> infoMessages=None, statusCode=3)
> E    +        where TStatus(errorCode=None, 
> errorMessage="DatabaseNotFoundException: Database 
> 'test_compute_stats_impala_2201_e794b8f' not found\n", sqlState='HY000', 
> infoMessages=None, statusCode=3) = 
> TGetSchemasResp(status=TStatus(errorCode=None, 
> errorMessage="DatabaseNotFoundException: Database 
> 'test_compute_stats_i...nHandle(hasResultSet=False, modifiedRowCount=None, 
> operationType=3, operationId=THandleIdentifier(secret='', guid=''))).status 
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org

Reply via email to