pithecuse527 commented on code in PR #13834:
URL: https://github.com/apache/gravitino/pull/13834#discussion_r4430211657
##########
core/src/main/java/org/apache/gravitino/hook/MetalakeHookDispatcher.java:
##########
@@ -105,7 +105,11 @@ public boolean dropMetalake(NameIdentifier ident, boolean
force)
throws NonEmptyEntityException, MetalakeInUseException {
// Child catalog/schema/fileset write-through secrets are cleaned when
MetalakeManager
// force-drops catalogs via CatalogManager.dropCatalog →
FilesetCatalogOperations.dropSchema.
- return dispatcher.dropMetalake(ident, force);
+ boolean dropped = dispatcher.dropMetalake(ident, force);
+ if (dropped) {
Review Comment:
> Was the guard deliberate (keeping the hook a no-op when this node changed
nothing)? If so, leaving it as is seems fine to me.
i only considered the case where this node performs the drop, not the case
where a peer drops it concurrently.
it seems we can remove the guard so both `dropMetalake` overloads now always
evict, and a false from a lost concurrent drop no longer leaves stale entries
--
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]