[
https://issues.apache.org/jira/browse/KYLIN-6035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17928318#comment-17928318
]
Guoliang Sun commented on KYLIN-6035:
-------------------------------------
h3. Dev Design
The issue lies in how to retrieve the project list on the query node and expose
it so that Prometheus can fetch the relevant information and display it.
Originally, the logic only existed on the `job/all` node, which is correct
because `xx_job_count` is designed to display the build task list, and build
tasks can only run on the `job/all` node. This logic remains unchanged.
h3. New Logic
Enable fetching the project list on all nodes to display it in the ops plan.
Add a new tag, assign values to it, and handle the JSON configuration file
provided by the ops plan.
During testing, it was discovered that the Prometheus metric information for
deleted projects on the query node was not being updated correctly. Debugging
revealed that the deletion logic in
`MetricsRegistry.deletePrometheusProjectMetrics` had been removed, as it was
previously deemed unnecessary.
There are two places where metric information is deleted:
1. ProjectDropListener: Captures the project deletion action and performs
related deletion operations.
2. MetricsConfig#registerMetrics: A scheduled thread runs every 1 minute to
decide whether to add or delete metric information for a project.
However, `ProjectDropListener` only works on the EpochOwner node, where it
listens for deletion actions and performs deletions. As a result, the metric
information on the query node is not updated after a project is deleted. Other
non-EpochOwner nodes likely have similar issues. You can confirm this logic by
filtering "redirecting to" in `kylin.log` to see which node the project
deletion was redirected to.
The fix involves restoring the deletion logic in
`MetricsConfig#registerMetrics`, which has been verified to work correctly.
> Kylin query node: ops plan cannot display the project list
> ----------------------------------------------------------
>
> Key: KYLIN-6035
> URL: https://issues.apache.org/jira/browse/KYLIN-6035
> Project: Kylin
> Issue Type: Bug
> Affects Versions: 5.0.0
> Reporter: Guoliang Sun
> Priority: Major
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)