Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

Fix misleading success log when schema drop returns false (#10722)

Lukas Simek035320575161
diff --git a/server/src/main/java/org/apache/gravitino/server/web/rest/SchemaOperations.java b/server/src/main/java/org/apache/gravitino/server/web/rest/SchemaOperations.java
index 4eede74191..bbacfdf9f5 100644
--- a/server/src/main/java/org/apache/gravitino/server/web/rest/SchemaOperations.java
+++ b/server/src/main/java/org/apache/gravitino/server/web/rest/SchemaOperations.java
@@ -230,11 +230,14 @@ public class SchemaOperations {
() -> {
NameIdentifier ident = NameIdentifierUtil.ofSchema(metalake, catalog, schema);
boolean dropped = dispatcher.dropSchema(ident, cascade);
- if (!dropped) {
+
+ if (dropped) {
+ LOG.info("Schema dropped: {}.{}.{}", metalake, catalog, schema);
+ } else {
LOG.warn("Fail to drop schema {} under namespace {}", schema, ident.namespace());
}
+
Response response = Utils.ok(new DropResponse(dropped));
- LOG.info("Schema dropped: {}.{}.{}", metalake, catalog, schema);
return response;
});
} catch (Exception e) {