rameshreddy-adutla opened a new pull request, #10213:
URL: https://github.com/apache/gravitino/pull/10213

   ### What changes were proposed in this pull request?
   
   `TopicOperationDispatcher#internalCreateTopic` previously caught `store.put` 
failures and returned a successful `Topic` result with only a log warning. This 
left the catalog and metadata store inconsistent — the topic exists in the 
catalog but Gravitino's metadata was not persisted, causing later operations to 
behave incorrectly.
   
   The fix rethrows the `store.put` exception as a `RuntimeException` instead 
of swallowing it.
   
   ### Why are the changes needed?
   
   When `store.put` fails, the method currently returns a successful result, 
silently dropping the persistence error. This creates an inconsistent state 
where:
   - The topic exists in the underlying catalog
   - Gravitino's metadata store has no record of it
   - Subsequent operations (load, alter, drop) will fail with confusing errors
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. The external API is unchanged. Topic creation that previously appeared 
to succeed (but was actually partially broken) will now correctly report 
failure.
   
   ### How was this patch tested?
   
   Added unit test `testCreateTopicShouldFailWhenStorePutFails` (as suggested 
in #10167) that:
   1. Creates a schema
   2. Mocks `entityStore.put()` to throw `IOException`
   3. Asserts that `createTopic` throws `RuntimeException`
   
   Closes #10167


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