You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "vinlee19 (via GitHub)" <gi...@apache.org> on 2025/10/21 14:33:51 UTC

[PR] [feat](paimon)Support Paimon Origin CachingCatalog Metrics in Doris System Table [doris]

vinlee19 opened a new pull request, #57207:
URL: https://github.com/apache/doris/pull/57207

   ### What problem does this PR solve?
     Currently, Apache Doris caches Paimon Catalog snapshots using Caffeine, and users can query basic cache statistics (e.g., eviction count, hit ratio) via the `catalog_meta_cache_statistics` system table. However, this does not include detailed metrics from Paimon's native CachingCatalog, which was introduced in [Apache Paimon PR #3829](https://github.com/apache/paimon/pull/3829) to expose cache statistics for compute engines like Doris. These metrics provide valuable insights into Paimon's internal caching performance, such as partition cache size, database/table cache sizes, manifest cache size, and manifest cache bytes.
   
     Without these metrics, users lack visibility into Paimon's origin catalog caching behavior, making it harder to monitor and optimize query performance in Doris-Paimon integrations.
   
   - `partition_cache_size`: Number of cached partitions.
   - `database_cache_size`: Number of cached databases.
   - `table_cache_size`: Number of cached tables.
   - `manifest_cache_bytes`: Total bytes of cached manifests.
   - `manifest_cache_size`: Number of cached manifests.
   
     These are exposed under the cache name paimon_origin_cache_catalog for Paimon catalogs. The implementation collects metrics from Paimon's CachingCatalog instance during catalog operations and registers them with Doris's internal metrics system.
   
   #### Example
   Before this PR, querying the system table for a Paimon catalog (paimon_dev_copy) only shows Caffeine snapshot cache stats:
   ```
   mysql> SELECT * FROM catalog_meta_cache_statistics WHERE CATALOG_NAME = 'paimon_dev_copy';
   +-----------------+-----------------------------+----------------------+----------------+
   | CATALOG_NAME    | CACHE_NAME                  | METRIC_NAME          | METRIC_VALUE   |
   +-----------------+-----------------------------+----------------------+----------------+
   | paimon_dev_copy | paimon_snapshot_cache       | eviction_count       | 0              |
   | paimon_dev_copy | paimon_snapshot_cache       | hit_ratio            | 0.5            |
   | paimon_dev_copy | paimon_snapshot_cache       | average_load_penalty | 2.0682061665E9 |
   | paimon_dev_copy | paimon_snapshot_cache       | estimated_size       | 1              |
   | paimon_dev_copy | paimon_snapshot_cache       | hit_count            | 4              |
   | paimon_dev_copy | paimon_snapshot_cache       | read_count           | 8              |
   +-----------------+-----------------------------+----------------------+----------------+
   ```
   After this PR, the table includes Paimon's origin cache metrics for both catalogs (paimon_dev_copy and paimon_dev):
   ```
   mysql> SELECT * FROM catalog_meta_cache_statistics;
   +-----------------+-----------------------------+----------------------+----------------+
   | CATALOG_NAME    | CACHE_NAME                  | METRIC_NAME          | METRIC_VALUE   |
   +-----------------+-----------------------------+----------------------+----------------+
   | paimon_dev_copy | paimon_snapshot_cache       | eviction_count       | 0              |
   | paimon_dev_copy | paimon_snapshot_cache       | hit_ratio            | 0.5            |
   | paimon_dev_copy | paimon_snapshot_cache       | average_load_penalty | 2.0682061665E9 |
   | paimon_dev_copy | paimon_snapshot_cache       | estimated_size       | 1              |
   | paimon_dev_copy | paimon_snapshot_cache       | hit_count            | 4              |
   | paimon_dev_copy | paimon_snapshot_cache       | read_count           | 8              |
   | paimon_dev_copy | paimon_origin_cache_catalog | partition_cache_size | 0              |
   | paimon_dev_copy | paimon_origin_cache_catalog | database_cache_size  | 0              |
   | paimon_dev_copy | paimon_origin_cache_catalog | table_cache_size     | 0              |
   | paimon_dev_copy | paimon_origin_cache_catalog | manifest_cache_bytes | 0              |
   | paimon_dev_copy | paimon_origin_cache_catalog | manifest_cache_size  | 0              |
   | paimon_dev      | paimon_snapshot_cache       | eviction_count       | 0              |
   | paimon_dev      | paimon_snapshot_cache       | hit_ratio            | 0.5            |
   | paimon_dev      | paimon_snapshot_cache       | average_load_penalty | 2.0682061665E9 |
   | paimon_dev      | paimon_snapshot_cache       | estimated_size       | 1              |
   | paimon_dev      | paimon_snapshot_cache       | hit_count            | 4              |
   | paimon_dev      | paimon_snapshot_cache       | read_count           | 8              |
   | paimon_dev      | paimon_origin_cache_catalog | partition_cache_size | 0              |
   | paimon_dev      | paimon_origin_cache_catalog | database_cache_size  | 0              |
   | paimon_dev      | paimon_origin_cache_catalog | table_cache_size     | 3              |
   | paimon_dev      | paimon_origin_cache_catalog | manifest_cache_bytes | 332680         |
   | paimon_dev      | paimon_origin_cache_catalog | manifest_cache_size  | 5              |
   +-----------------+-----------------------------+----------------------+----------------+
   ```
   Issue Number: close #xxx
   
   Related PR: #xxx
   
   Problem Summary:
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [ ] Regression test
       - [ ] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason <!-- Add your reason?  -->
   
   - Behavior changed:
       - [ ] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [ ] No.
       - [ ] Yes. <!-- Add document PR link here. eg: https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [feat](paimon)expose paimon cachingcatalog metrics in doris [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #57207: [feat](paimon)expose paimon cachingcatalog metrics in doris
URL: https://github.com/apache/doris/pull/57207


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [feat](paimon)expose paimon cachingcatalog metrics in doris [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #57207:
URL: https://github.com/apache/doris/pull/57207#issuecomment-3427206671

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 29.01 s</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
   ClickBench test result on commit c8329ee063a8980f10cbf8e5634279ad2b533a9d, data reload: false
   
   query1	0.05	0.05	0.05
   query2	0.09	0.06	0.05
   query3	0.26	0.09	0.09
   query4	1.61	0.12	0.11
   query5	0.29	0.27	0.25
   query6	1.15	0.66	0.66
   query7	0.04	0.03	0.03
   query8	0.06	0.04	0.04
   query9	0.66	0.54	0.53
   query10	0.59	0.60	0.59
   query11	0.18	0.12	0.12
   query12	0.16	0.12	0.12
   query13	0.65	0.63	0.61
   query14	1.03	1.05	1.02
   query15	0.90	0.87	0.91
   query16	0.40	0.41	0.40
   query17	1.06	1.07	1.06
   query18	0.22	0.20	0.20
   query19	1.98	1.85	1.91
   query20	0.02	0.02	0.02
   query21	15.42	0.19	0.13
   query22	5.06	0.08	0.05
   query23	15.64	0.27	0.11
   query24	3.19	0.63	0.57
   query25	0.08	0.07	0.07
   query26	0.15	0.13	0.15
   query27	0.08	0.07	0.06
   query28	4.55	1.18	0.95
   query29	12.55	4.09	3.41
   query30	0.28	0.14	0.11
   query31	2.83	0.60	0.40
   query32	3.26	0.56	0.51
   query33	3.16	3.09	3.13
   query34	16.13	5.53	4.86
   query35	4.98	4.97	4.98
   query36	0.71	0.52	0.51
   query37	0.12	0.08	0.08
   query38	0.07	0.05	0.04
   query39	0.05	0.04	0.04
   query40	0.18	0.16	0.15
   query41	0.09	0.04	0.03
   query42	0.05	0.03	0.04
   query43	0.05	0.04	0.04
   Total cold run time: 100.08 s
   Total hot run time: 29.01 s
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [feat](paimon)expose paimon cachingcatalog metrics in doris [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #57207:
URL: https://github.com/apache/doris/pull/57207#issuecomment-3428530542

   # FE Regression Coverage Report
   Increment line coverage `  94.44% (17/18)` :tada:
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/57207_c8329ee063a8980f10cbf8e5634279ad2b533a9d_merge_fe/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/57207_c8329ee063a8980f10cbf8e5634279ad2b533a9d_merge_fe/report/index.html)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [feat](paimon)Support Paimon Origin CachingCatalog Metrics in Doris System Table [doris]

Posted by "Thearas (via GitHub)" <gi...@apache.org>.
Thearas commented on PR #57207:
URL: https://github.com/apache/doris/pull/57207#issuecomment-3427016552

   
   Thank you for your contribution to Apache Doris.
   Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR).
   
   Please clearly describe your PR:
   1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
   2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
   3. What features were added. Why was this function added?
   4. Which code was refactored and why was this part of the code refactored?
   5. Which functions were optimized and what is the difference before and after the optimization?
       


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [feat](paimon)expose paimon cachingcatalog metrics in doris [doris]

Posted by "vinlee19 (via GitHub)" <gi...@apache.org>.
vinlee19 commented on PR #57207:
URL: https://github.com/apache/doris/pull/57207#issuecomment-3427025710

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [feat](paimon)expose paimon cachingcatalog metrics in doris [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #57207:
URL: https://github.com/apache/doris/pull/57207#issuecomment-4285117947

   We're closing this PR because it hasn't been updated in a while.
   This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
   If you'd like to revive this PR, please reopen it and feel free a maintainer to remove the Stale tag!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org