ziqiangliang commented on issue #7378:
URL: https://github.com/apache/gravitino/issues/7378#issuecomment-2976586901

   > I have reviewed your design and have the following points to share.
   > 
   > How do you handle the case if users call `callWithoutCommit` without 
wrapping it in `doWithCommit`? Currently, it seems that all `callWithoutCommit` 
are wrapped in `doWithCommit`, though some users may mistakenly use it 
separately. When will the session be closed if it is used alone?
   
   `callWithoutCommit()` just creates an operation descriptor — it doesn’t 
actually run anything by itself. The real execution (and connection usage) only 
happens when the operation is passed into `doMultipleWithCommit()`.
   
   Also, we intentionally made `Operation#execute()` package-private to prevent 
users from calling it directly outside the transaction framework. This way, we 
avoid connection leaks and hanging transactions right from the API level.


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