yuqi1129 opened a new issue, #12018: URL: https://github.com/apache/gravitino/issues/12018
### Describe the subtask Once relation data is removed from the cache (#11961), the cache holds only single-entity entries. Not every entity is safe to keep, though: some entities carry a load-bearing pointer that actually lives elsewhere and would return a wrong value on another node if the cached copy went stale. This subtask restricts what the cache stores to the entities that are safe to serve from a per-node copy, and removes the remaining silent-staleness sources found in the per-alter audit in the design doc. The cache should keep only self-contained metadata objects whose fields are all their own, so cross-node invalidation stays a precise one-to-one drop with no reverse lookups. Model, model version, and function each hold a load-bearing pointer (the model version URI / latest version, or the function implementation) and must not be cached; they read straight from the `EntityStore`. The metalake on/off (in-use) flag must also be read straight from the DB rather than from the cache, so a metalake that was disabled on one node is never served as enabled on another node that still holds a stale copy. This subtask should: - Add an entity-type allowlist to the cache write path: cache only metalake, catalog, schema, table, topic, view, and fileset. - Skip caching for model, model version, and function; route their reads to the `EntityStore`. - Read the metalake in-use flag directly from the DB on the guard check, not from the cache. - Add unit tests for the allowlist and for the in-use guard. This keeps every cached entity self-contained and safe to serve per node, which is a prerequisite for the cross-node invalidation work tracked in #11737. ### Parent issue https://github.com/apache/gravitino/issues/11737 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
