[
https://issues.apache.org/jira/browse/IMPALA-14617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18044030#comment-18044030
]
Quanlong Huang commented on IMPALA-14617:
-----------------------------------------
I think this is a known bug tracked inĀ IMPALA-12103. From the impalad logs, the
invalidate command just try to bring up the table, not including the db:
{noformat}
I20251207 03:03:19.095866 2963656 Frontend.java:2432]
c34f00c5ac7fa9f5:769351f900000000] Analyzing query: invalidate metadata
test_catalog_restart_3b16a7b9.x db: default
...
I20251207 03:03:19.109735 2964127 ImpaladCatalog.java:227]
c34f00c5ac7fa9f5:769351f900000000] Adding:
TABLE:test_catalog_restart_3b16a7b9.x version: 2186 size: 85{noformat}
Then the following query failed:
{noformat}
I20251207 03:03:19.119632 2963656 Frontend.java:2432]
7a4bb82a09ee3f84:09b239b300000000] Analyzing query: show tables in
test_catalog_restart_3b16a7b9 db: default
...
I20251207 03:03:19.122205 2963656 jni-util.cc:321]
7a4bb82a09ee3f84:09b239b300000000] org.apache.impala.common.AnalysisException:
Database does not exist: test_catalog_restart_3b16a7b9
at org.apache.impala.analysis.Analyzer.getDb(Analyzer.java:4113)
at org.apache.impala.analysis.Analyzer.getDb(Analyzer.java:4100)
at org.apache.impala.analysis.Analyzer.getDb(Analyzer.java:4067)
at org.apache.impala.analysis.Analyzer.getDb(Analyzer.java:4059)
at
org.apache.impala.analysis.ShowTablesOrViewsStmt.analyze(ShowTablesOrViewsStmt.java:85)
at
org.apache.impala.analysis.AnalysisContext$AnalysisDriverImpl.analyze(AnalysisContext.java:576)
at
org.apache.impala.analysis.AnalysisContext.analyzeAndAuthorize(AnalysisContext.java:496)
at
org.apache.impala.service.Frontend.doCreateExecRequest(Frontend.java:2973)
at
org.apache.impala.service.Frontend.getTExecRequest(Frontend.java:2540)
at
org.apache.impala.service.Frontend.getTExecRequestWithFallback(Frontend.java:2408)
at
org.apache.impala.service.Frontend.createExecRequest(Frontend.java:2097)
at
org.apache.impala.service.JniFrontend.createExecRequest(JniFrontend.java:176){noformat}
The db exists in catalogd side when the invalidate command executed. So
catalogd thought impalad also has it and just returns the table in the DDL
response. In catalogd logs, the db was added by a CREATE_DATABASE event at
03:03:17.409158:
{noformat}
I20251207 03:03:17.409158 2963502 MetastoreEvents.java:865] EventId: 64339
EventType: CREATE_DATABASE Target: test_catalog_restart_3b16a7b9. Successfully
added database test_catalog_restart_3b16a7b9{noformat}
Catalogd also propagates its update before the INVALIDATE command arrives.
{noformat}
I20251207 03:03:18.145212 2963148 catalog-server.cc:1614] Collected update:
1:DATABASE:test_catalog_restart_3b16a7b9, version=2181, original size=233,
compressed size=180
I20251207 03:03:19.097798 2963887 JniUtil.java:167]
c34f00c5ac7fa9f5:769351f900000000] resetMetadata request: INVALIDATE TABLE
test_catalog_restart_3b16a7b9.x issued by jenkins{noformat}
However, the update of the db arrives late in impalad side. It's later than the
INVALIDATE command finished. In impalad logs:
{noformat}
I20251207 03:03:19.846482 2963577 ImpaladCatalog.java:227] Adding:
DATABASE:test_catalog_restart_3b16a7b9 version: 2181 size: 233{noformat}
So this is exactly the bug tracked in IMPALA-12103.
> TestMetadataReplicas.test_catalog_restart failing
> -------------------------------------------------
>
> Key: IMPALA-14617
> URL: https://issues.apache.org/jira/browse/IMPALA-14617
> Project: IMPALA
> Issue Type: Bug
> Reporter: Surya Hebbar
> Assignee: Riza Suminto
> Priority: Major
>
> h3. Error Message
> {code}
> AssertionError: Unexpected exception: Query 7a4bb82a09ee3f84:09b239b300000000
> failed: AnalysisException: Database does not exist:
> test_catalog_restart_3b16a7b9 assert False
> {code}
> h3. Stacktrace
> {code}
> custom_cluster/test_metadata_replicas.py:80: in test_catalog_restart
> assert False, "Unexpected exception: " + str(e)
> E AssertionError: Unexpected exception: Query
> 7a4bb82a09ee3f84:09b239b300000000 failed:
> E AnalysisException: Database does not exist:
> test_catalog_restart_3b16a7b9
> E
> E
> E assert False
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]