yuqi1129 commented on code in PR #12006:
URL: https://github.com/apache/gravitino/pull/12006#discussion_r3670709054


##########
core/src/main/java/org/apache/gravitino/storage/relational/RelationalEntityStore.java:
##########
@@ -400,8 +318,13 @@ public void insertRelation(
       boolean override)
       throws IOException {
     backend.insertRelation(relType, srcIdentifier, srcType, dstIdentifier, 
dstType, override);
-    cache.invalidate(srcIdentifier, srcType, relType);
-    cache.invalidate(dstIdentifier, dstType, relType);
+    // Defensive: relation results are not cached, and no currently cached 
entity type embeds
+    // relation-derived data (the only types that do — USER/GROUP/ROLE — are 
excluded from the
+    // cache), so these invalidations are a no-op today. They are kept so that 
if a cached type ever
+    // starts materializing this relation, its stale single-entity entry is 
dropped on a relation
+    // write.

Review Comment:
   Yeah, you are right, and I will change it. 



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