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


##########
server/src/main/java/org/apache/gravitino/server/web/rest/CatalogOperations.java:
##########
@@ -187,6 +187,70 @@ public Response testConnection(
     }
   }
 
+  @GET
+  @Path("{catalog}/activate")
+  @Produces("application/vnd.gravitino.v1+json")
+  @Timed(name = "activate-catalog." + MetricNames.HTTP_PROCESS_DURATION, 
absolute = true)
+  @ResponseMetered(name = "activate-catalog", absolute = true)
+  public Response activateCatalog(
+      @PathParam("metalake") String metalake, @PathParam("catalog") String 
catalogName) {
+    LOG.info("Received activate request for catalog: {}.{}", metalake, 
catalogName);
+    try {
+      return Utils.doAs(
+          httpRequest,
+          () -> {
+            NameIdentifier ident = NameIdentifierUtil.ofCatalog(metalake, 
catalogName);
+            TreeLockUtils.doWithTreeLock(
+                NameIdentifierUtil.ofMetalake(metalake),
+                LockType.READ,

Review Comment:
   changed to `WRITE` lock



-- 
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]

Reply via email to