adnanhemani commented on code in PR #2480:
URL: https://github.com/apache/polaris/pull/2480#discussion_r2331558418


##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergRestCatalogEventServiceDelegator.java:
##########
@@ -273,10 +477,21 @@ public Response replaceView(
       CommitViewRequest commitViewRequest,
       RealmContext realmContext,
       SecurityContext securityContext) {
-    return delegate.replaceView(
-        prefix, namespace, view, commitViewRequest, realmContext, 
securityContext);
+    String catalogName = prefixParser.prefixToCatalogName(realmContext, 
prefix);
+    polarisEventListener.onBeforeReplaceView(
+        new BeforeReplaceViewEvent(catalogName, namespace, view, 
commitViewRequest));
+    Response resp =
+        delegate.replaceView(
+            prefix, namespace, view, commitViewRequest, realmContext, 
securityContext);
+    polarisEventListener.onAfterReplaceView(
+        new AfterReplaceViewEvent(
+            catalogName, namespace, view, (LoadViewResponse) 
resp.getEntity()));
+    return resp;
   }
 
+  /**
+   * Table Committed Events are already instrumented at a more granular level 
than the API itself.
+   */

Review Comment:
   On second thought, you are correct - the Table Committed events are 
triggered even for non-transactional events. Let me add this.



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