Roshan1299 opened a new pull request, #10677:
URL: https://github.com/apache/gravitino/pull/10677

   <!--
   1. Title: [#<issue>] <type>(<scope>): <subject>
      Examples:
        - "[#123] feat(operator): Support xxx"
        - "[#233] fix: Check null before access result in xxx"
        - "[MINOR] refactor: Fix typo in variable name"
        - "[MINOR] docs: Fix typo in README"
        - "[#255] test: Fix flaky test NameOfTheTest"
      Reference: https://www.conventionalcommits.org/en/v1.0.0/
   2. If the PR is unfinished, please mark this PR as draft.
   -->
   
   ### What changes were proposed in this pull request?
   
   Propagated the exception from `store.put(tableEntity)` in 
`TableOperationDispatcher.createTable()` instead of swallowing it. Updated the 
existing test to verify the exception is thrown.
   
   ### Why are the changes needed?
   
   Previously, if `store.put(tableEntity, true)` failed, the exception was 
logged but swallowed, and the method returned a successful response without the 
persisted entity. This left Gravitino in an inconsistent state, the table 
existed in the external catalog but had no corresponding metadata in the entity 
store. Clients received a false success response.
   
   Fix: #10630 
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. `createTable` now throws a `RuntimeException` instead of returning a 
partial success when metadata persistence fails.
   
   ### How was this patch tested?
   
   Updated the existing test `testCreateAndListTables` in 
`TestTableOperationDispatcher` to assert that a `RuntimeException` is thrown 
when `entityStore.put` fails, instead of expecting a successful return.
   


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