babumahesh commented on issue #10763:
URL: https://github.com/apache/gravitino/issues/10763#issuecomment-4238880383

     @mchades
                                                                                
                                                                                
                                                               
   Agreed regarding the API behavior change concern, where users might receive 
an exception instead of a schema object in these cases.
                                                                                
                                                                                
                                                               
   However,  When schema creation succeeds in the external catalog (ex: 
Hive/Iceberg) but fails to persist in Gravitino's internal store, subsequent 
table creation operations will fail immediately. This happens because:          
      
                     
     1. The createTable() API has an @AuthorizationExpression check that 
validates the Schema entity from Gravitino's entity store                       
                                                                      
     2. This authorization check fails because the schema doesn't exist in the 
entity store (only in the external catalog), so loadSchema(identifier) from 
TableOperationDispatcher never gets called
     3. Therefore, the auto-import mechanism that could reload the schema from 
the external catalog is never triggered   
                                                                                
                                                                                
                                                            
   Result: Users get a successful schema creation response, but all subsequent 
operations on that schema fail with authorization errors like:  
```RuntimeException: failed to load entity from entity store: catalog.schema``` 
                                                                                
                                                               
                                                                                
                                                                                
                                                               
   This creates a confusing user experience where the schema appears to be 
created successfully but is immediately unusable.  
   
   Let me know your thoughts on this case. 


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