yuqi1129 opened a new issue, #11961:
URL: https://github.com/apache/gravitino/issues/11961

   ### Describe the subtask
   
   Simplify the `EntityCache` interface and the default `CaffeineEntityCache` 
implementation by removing relation-list caching from `CaffeineEntityCache`.
   
   Currently `CaffeineEntityCache` stores both single-entity entries and 
relation query results. To keep relation data consistent, it introduces 
relation keys, prefix indexes, reverse indexes, and bidirectional invalidation 
logic. This makes both reads and writes hard to reason about, and makes it 
nearly impossible for users to implement another `EntityStore`-compatible 
storage/cache path based on the current interfaces.
   
   There are still a small number of APIs that directly depend on relation 
operations, so this change must also validate the runtime impact before it can 
be merged. In particular, after removing relation data from the cache, we need 
to verify that the affected APIs do not suffer a significant performance 
regression in real workloads or representative benchmarks.
   
   This subtask should:
   
   - Keep the default cache focused on single-entity lookup entries.
   - Remove relation data storage from `CaffeineEntityCache`.
   - Simplify or remove relation-specific cache APIs and indexes that are no 
longer needed by the default implementation.
   - Let relation/list operations fall back to `EntityStore` unless a future 
cache implementation explicitly supports them.
   - Update related tests and benchmarks to match the simplified behavior.
   - Identify the remaining APIs that directly use relation operations and 
validate their performance after relation cache removal.
   
   The goal is to make the cache SPI easier to implement and maintain, and to 
unblock the broader multi-node entity cache 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]

Reply via email to