Skip to content

branch-4.0: [refactor](paimon) Per-catalog Paimon metadata cache with two-level table+snapshot structure #60478#60741

Open
suxiaogang223 wants to merge 2 commits intoapache:branch-4.0from
suxiaogang223:pick-60478-branch-4.0
Open

branch-4.0: [refactor](paimon) Per-catalog Paimon metadata cache with two-level table+snapshot structure #60478#60741
suxiaogang223 wants to merge 2 commits intoapache:branch-4.0from
suxiaogang223:pick-60478-branch-4.0

Conversation

@suxiaogang223
Copy link
Contributor

…able+snapshot structure (apache#60478)

Refactor Paimon metadata cache from a single global instance to
per-catalog instances,
introduce a two-level Table+Snapshot cache structure, and unify TTL
resolution logic
across Iceberg/Paimon/Schema caches.

The previous design shared a single `PaimonMetadataCache` instance and a
single global
`snapshotCache` across all Paimon catalogs. This caused:
- Different catalogs could not independently configure cache TTL.
- Cache keys had to carry `catalogId` for isolation; invalidation
required scanning all
  keys and filtering.
- `PaimonExternalTable` eagerly fetched the `Table` object at
construction time, incurring
  remote calls even when the table was never subsequently accessed.

(cherry picked from commit 2c85148)
@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See 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?

@suxiaogang223
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 19.30% (55/285) 🎉
Increment coverage report
Complete coverage report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants