jerryshao commented on code in PR #11074:
URL: https://github.com/apache/gravitino/pull/11074#discussion_r3246581117
##########
core/src/main/java/org/apache/gravitino/storage/relational/RelationalEntityStore.java:
##########
@@ -327,6 +327,26 @@ public void insertRelation(
cache.invalidate(dstIdentifier, dstType, relType);
}
+ @Override
+ public void batchInsertRelations(
+ Type relType,
+ List<NameIdentifier> srcIdentifiers,
+ Entity.EntityType srcType,
+ NameIdentifier dstIdentifier,
+ Entity.EntityType dstType,
+ boolean override)
+ throws IOException {
+ if (srcIdentifiers == null || srcIdentifiers.isEmpty()) {
+ return;
+ }
+ backend.batchInsertRelations(
+ relType, srcIdentifiers, srcType, dstIdentifier, dstType, override);
+ for (NameIdentifier ident : srcIdentifiers) {
+ cache.invalidate(ident, srcType, relType);
+ }
+ cache.invalidate(dstIdentifier, dstType, relType);
+ }
Review Comment:
Why do we need to add this?
--
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]