yuqi1129 commented on code in PR #10740:
URL: https://github.com/apache/gravitino/pull/10740#discussion_r3193637889
##########
core/src/main/java/org/apache/gravitino/catalog/CatalogManager.java:
##########
@@ -806,8 +809,11 @@ public boolean dropCatalog(NameIdentifier ident, boolean
force)
}
// Finally, delete the catalog entity as well as all its
sub-entities from the store.
+ // Invalidate after store.delete() to prevent a background thread
from repopulating
+ // the cache with stale data between invalidate and delete.
+ boolean deleted = store.delete(ident, EntityType.CATALOG, true);
catalogCache.invalidate(ident);
Review Comment:
This seems to break the rule that we should clean the cache before modifying
the database, and this policy is quite common in the Redis & MySQL pair, so I'm
not very sure whether this change is acceptable or not.
@mchades Would you like to take a look
--
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]