anilkumgopalap commented on code in PR #14862:
URL: https://github.com/apache/gravitino/pull/14862#discussion_r4567538317
##########
catalogs/catalog-lakehouse-generic/src/main/java/org/apache/gravitino/catalog/lakehouse/generic/GenericCatalogOperations.java:
##########
@@ -464,11 +548,29 @@ private boolean dropOrPurgeTable(NameIdentifier ident,
boolean purge, Schema sch
ident,
context.tableProperties().get(Table.PROPERTY_LOCATION),
tableLocationProvider.name());
+ if (tablesWithRetainedData != null) {
+ tablesWithRetainedData.add(ident);
+ }
}
return dropped;
}
+ private void unprovisionSchemaLocation(
+ TableLocationProvider provider, SchemaLocationContext context) {
+ try {
+ ((SupportsSchemaLocations) provider).unprovisionSchemaLocation(context);
+ } catch (Exception e) {
Review Comment:
It collects the external tables the cascade dropped rather than purged.
Their data is still under the schema location, and the list is passed to
unprovisionSchemaLocation so the provider doesn't release storage that still
holds data.
--
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]