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


##########
core/src/main/java/org/apache/gravitino/utils/MetadataObjectUtil.java:
##########
@@ -302,6 +302,13 @@ public static void checkMetadataObject(String metalake, 
MetadataObject object) {
         check(env.internalViewDispatcher().viewExists(identifier), 
exceptionToThrowSupplier);
         break;
 
+      case SEMANTIC_MODEL:
+        NameIdentifierUtil.checkSemanticModel(identifier);
+        check(
+            env.semanticModelDispatcher().semanticModelExists(identifier),

Review Comment:
   [P2] `checkMetadataObject` is an infrastructure existence check, and every 
sibling metadata type routes it through an internal dispatcher that preserves 
normalization while skipping hook and event side effects. This branch instead 
calls the public Semantic Model chain (`Normalize -> Hook -> Operation`), and 
#12595 is expected to add an outer event dispatcher, so owner, grant, tag, or 
policy validation could start running user-operation hooks or emitting Semantic 
Model events. Please add an `internalSemanticModelDispatcher` (`Normalize -> 
Operation`), keep the public chain separate, use the internal dispatcher here, 
and assert both chains in `TestGravitinoEnvMetadataComponents`.



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