apache / apache/gravitino

[EPIC] Organize cache in used Gravitino

Open
#10,252 2 comments 0 reactions 0 assignees View on GitHub
improvement
Dominant language
Java
Stars
3.2k
Forks
935
Avg merge
1d 16h
Merged PRs (30d)
298

Description

### What would you like to be improved?

Gravitino has used caffeine cache several points, such as
- Cache for catalog wrapper, see: https://github.com/apache/gravitino/blob/f87777fa3dcf1dfecb4aca7a4066b0ab9c65b6f3/core/src/main/java/org/apache/gravitino/catalog/CatalogManager.java#L302-L317
- Caceh for entity: see: https://github.com/apache/gravitino/blob/34609990967051ef8da2da23548c0cd83fc10733/core/src/main/java/org/apache/gravitino/cache/CaffeineEntityCache.java#L61-L62
- Cache in FilesetCatalogOperations:
https://github.com/apache/gravitino/blob/daf5f26f66e33ec42d6dca1e40407dff36d4db2a/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogOperations.java#L148-L152
- Cache in IcebergCatalogWrapperManager
https://github.com/apache/gravitino/blob/fc39c771722140752539878e1748da65caa2ac1b/iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/IcebergCatalogWrapperManager.java#L43-L47

- Cache in JcasbinAuthorizer

https://github.com/apache/gravitino/blob/fc39c771722140752539878e1748da65caa2ac1b/server-common/src/main/java/org/apache/gravitino/server/authorization/jcasbin/JcasbinAuthorizer.java#L83-L88

### How should we improve?

We need to manage them in a unfied way as we plan to deploy Gravitino in a distributed environment.

Contributor guide

Open the contributing guide

Research direction

Start by inventorying the cache implementations mentioned in CatalogManager.java, CaffeineEntityCache.java, FilesetCatalogOperations.java, IcebergCatalogWrapperManager.java, and JcasbinAuthorizer.java. Read how each cache is created and used, then determine the unified management requirements for distributed deployment. Done means the cache usage across these entry points follows an agreed unified approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.