You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Quanlong Huang (Jira)" <ji...@apache.org> on 2023/09/26 05:39:00 UTC

[jira] [Resolved] (IMPALA-11409) Skip UpdateCatalogMetrics if another thead is on-going in it

     [ https://issues.apache.org/jira/browse/IMPALA-11409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Quanlong Huang resolved IMPALA-11409.
-------------------------------------
    Resolution: Won't Do

Won't do this since after IMPALA-8675, the call on UpdateCatalogMetrics won't trigger external RPCs so is pretty lightweight now.

> Skip UpdateCatalogMetrics if another thead is on-going in it
> ------------------------------------------------------------
>
>                 Key: IMPALA-11409
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11409
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Backend
>            Reporter: Quanlong Huang
>            Assignee: Quanlong Huang
>            Priority: Critical
>         Attachments: jstack-1.txt
>
>
> Impala coordinator tracks local metrics of the catalog, e.g. number of dbs/tables. When use_local_catalog is enabled, it also tracks the cache metrics, e.g. cache hit/miss count/rate.
> These metrics are updated at the end of each statement, even for simple statements like "USE <db>", "SET var=xxx", "SELECT 1". The catalog update thread will also update the metrics in the end.
> [https://github.com/apache/impala/blob/bb610dee09a8069bb993b4c668f7e481c1774b70/be/src/service/impala-server.cc#L1272]
> [https://github.com/apache/impala/blob/bb610dee09a8069bb993b4c668f7e481c1774b70/be/src/service/impala-server.cc#L2065]
> These metrics are global metrics of the local catalog cache. They are not specifit to a single statement. It's a waste to update the metrics concurrently.
> [https://github.com/apache/impala/blob/bb610dee09a8069bb993b4c668f7e481c1774b70/be/src/service/impala-server.cc#L1526-L1559]
> We've seen "hanging issues" that all statements, including the catalog update thread, are slowly executing the UpdateCatalogMetrics() function. See details in the attached jstack dump.
> Indeed, if one thread is running the UpdateCatalogMetrics() function, the other threads can skip it and move forward.



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