yuqi1129 commented on code in PR #9162:
URL: https://github.com/apache/gravitino/pull/9162#discussion_r2558858327
##########
core/src/main/java/org/apache/gravitino/cache/ReverseIndexCache.java:
##########
@@ -57,20 +78,28 @@ public ReverseIndexCache() {
GenericEntity.class,
ReverseIndexRules.GENERIC_METADATA_OBJECT_REVERSE_RULE);
}
- public boolean remove(EntityCacheKey key) {
- return reverseIndex.remove(key.toString());
- }
-
public Iterable<List<EntityCacheKey>> getValuesForKeysStartingWith(String
keyPrefix) {
return reverseIndex.getValuesForKeysStartingWith(keyPrefix);
}
- public Iterable<CharSequence> getKeysStartingWith(String keyPrefix) {
- return reverseIndex.getKeysStartingWith(keyPrefix);
- }
+ public boolean remove(EntityCacheKey key) {
Review Comment:
All adding and removing operations will be guarded by `segmentedLock` in
`CaffeineEntityCache`, so there is no need to add extra 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]