mchades commented on code in PR #6569:
URL: https://github.com/apache/gravitino/pull/6569#discussion_r1984844257


##########
core/src/main/java/org/apache/gravitino/metalake/MetalakeManager.java:
##########
@@ -253,22 +295,24 @@ public BaseMetalake alterMetalake(NameIdentifier ident, 
MetalakeChange... change
               throw new MetalakeNotInUseException(
                   "Metalake %s is not in use, please enable it first", ident);
             }
-
-            return store.update(
-                ident,
-                BaseMetalake.class,
-                EntityType.METALAKE,
-                metalake -> {
-                  BaseMetalake.Builder builder = newMetalakeBuilder(metalake);
-                  Map<String, String> newProps =
-                      metalake.properties() == null
-                          ? Maps.newHashMap()
-                          : Maps.newHashMap(metalake.properties());
-                  builder = updateEntity(builder, newProps, changes);
-
-                  return builder.build();
-                });
-
+            METALAKE_CACHE.invalidate(ident);
+            BaseMetalake baseMetalake =
+                store.update(
+                    ident,
+                    BaseMetalake.class,
+                    EntityType.METALAKE,
+                    metalake -> {
+                      BaseMetalake.Builder builder = 
newMetalakeBuilder(metalake);
+                      Map<String, String> newProps =
+                          metalake.properties() == null
+                              ? Maps.newHashMap()
+                              : Maps.newHashMap(metalake.properties());
+                      builder = updateEntity(builder, newProps, changes);
+
+                      return builder.build();
+                    });
+            METALAKE_CACHE.put(ident, 
newMetalakeWithResolvedProperties(baseMetalake));

Review Comment:
   here should use ident  of `baseMetalake`



-- 
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: commits-unsubscr...@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to