jerryshao commented on code in PR #9205:
URL: https://github.com/apache/gravitino/pull/9205#discussion_r2562863626


##########
core/src/main/java/org/apache/gravitino/cache/ReverseIndexCache.java:
##########
@@ -41,18 +41,21 @@
  * efficiently store and retrieve relationships between entities based on 
their keys.
  */
 public class ReverseIndexCache {
-  private RadixTree<List<EntityCacheKey>> reverseIndex;
+  private final RadixTree<List<EntityCacheKey>> reverseIndex;
   /** Registers a reverse index processor for a specific entity class. */
-  private final Map<Class<? extends Entity>, ReverseIndexRule> 
reverseIndexRules = new HashMap<>();
+  private final Map<Class<? extends Entity>, List<ReverseIndexRule>> 
reverseIndexRules =

Review Comment:
   You can use Guava's `MultiMap` to simplify the code here.



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