mirror of
https://github.com/apache/impala.git
synced 2025-12-19 09:58:28 -05:00
JniFrontend.getDbs() returns the thrift representation of all the dbs. This might trigger multiple getPartialCatalogObject requests to catalogd and could fail in InconsistentMetadataFetchException, e.g. if a db is removed after coordinator fetching the db name list and before coordinator fetching the msDb of that db. This patch fixes the issue by retrying the above steps when hitting InconsistentMetadataFetchException, similar to what other methods in Frontend do. Adds getThriftDbs() in Frontend to directly return the thrift db list so JniFrontend can use it directly and the retry can be added inside Frontend.java. TestAuthorization.test_local_catalog_show_dbs_with_transient_db is an existing test to verify a similar problem. Running this test with authorization disabled can reproduce the current bug. So this patch extracts the test code into TestLocalCatalogRetries._run_show_dbs_with_transient_db() and share it in both authz enabled and disabled tests. Tests - Ran TestLocalCatalogRetries.test_show_dbs_retry 60 times. Without the fix, it fails in about a dozen times. Change-Id: Ib337f88a2ac0f35142417f6cee51d30497f12845 Reviewed-on: http://gerrit.cloudera.org:8080/23402 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
0 lines
0 B
Python
0 lines
0 B
Python
The file is empty.