dimas-b commented on code in PR #3073:
URL: https://github.com/apache/polaris/pull/3073#discussion_r2543827519


##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java:
##########
@@ -1553,9 +1554,20 @@ public void doCommit(TableMetadata base, TableMetadata 
metadata) {
         updateTableLike(tableIdentifier, entity);
       }
 
-      polarisEventListener.onAfterCommitTable(
-          new IcebergRestCatalogEvents.AfterCommitTableEvent(
-              catalogName, tableIdentifier, base, metadata));
+      if (getMetaStoreManager() instanceof 
TransactionWorkspaceMetaStoreManager) {

Review Comment:
   This `if` + `instanceof` looks concerning to me. I do believe the whole 
events design can and should be done in a way that processing logic does not 
require knowing specific types of pluggable components.
   
   `TransactionalWorkspaceMetaStoreManager` in itself has API design [concerns 
from my POV](https://lists.apache.org/thread/rf5orxs815zs4h64p4rwp03q3pbgxb5r), 
so I believe this area of the code needs refactoring in general, so adding 
logic that depends on specific types is both risky and complicates future 
refactoring.



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