Skip to content

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

[#10628] fix(server): Only log success message when dropFunction actually drops (#10632)

Sachin Ranjalkar7b4cf0eae6d1
diff --git a/server/src/main/java/org/apache/gravitino/server/web/rest/FunctionOperations.java b/server/src/main/java/org/apache/gravitino/server/web/rest/FunctionOperations.java
index da59cc238c..b4b6c4c7a8 100644
--- a/server/src/main/java/org/apache/gravitino/server/web/rest/FunctionOperations.java
+++ b/server/src/main/java/org/apache/gravitino/server/web/rest/FunctionOperations.java
@@ -245,9 +245,10 @@ public class FunctionOperations {
boolean dropped = dispatcher.dropFunction(ident);
if (!dropped) {
LOG.warn("Cannot find to be dropped function {} under schema {}", function, schema);
+ } else {
+ LOG.info("Function dropped: {}.{}.{}.{}", metalake, catalog, schema, function);
}
Response response = Utils.ok(new DropResponse(dropped));
- LOG.info("Function dropped: {}.{}.{}.{}", metalake, catalog, schema, function);
return response;
});
} catch (Exception e) {