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

   ### What would you like to be improved?
   
   After the global entity cache, `CatalogManager` still maintains its own 
local catalog cache for catalog entities and their corresponding class loaders.
   
   In a multi-node deployment, catalog changes on one server may not invalidate 
the `CatalogManager` cache on peer servers immediately. This can leave peer 
nodes using stale catalog entities or stale catalog class loaders until local 
cache eviction happens.
   
   ### How should we improve?
   
   Use the existing `entity_change_log` mechanism to invalidate the 
`CatalogManager` catalog cache across server instances and provide eventual 
consistency.
   
   Suggested behavior:
   
   - When catalog-related change log records are consumed on a peer node, 
invalidate the corresponding `CatalogManager` cache entry.
   - Reload the catalog and class loader on the next access.
   - Preserve the current eventual consistency model. The stale window should 
be bounded by the entity change polling interval, which appears to be around 3 
seconds by default.
   - Handle catalog alter, rename, and drop cases carefully, including 
invalidating both old and new identifiers when needed.
   - Add tests for multi-node style cache invalidation behavior.


-- 
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