ziqiangliang commented on code in PR #7392:
URL: https://github.com/apache/gravitino/pull/7392#discussion_r2188896724


##########
core/src/main/java/org/apache/gravitino/storage/relational/utils/SessionUtils.java:
##########
@@ -145,4 +161,124 @@ public static void doMultipleWithCommit(Runnable... 
operations) {
       }
     }
   }
+
+  /**
+   * Creates a database operation with the given mapper and function, to be 
executed without
+   * committing. Intended for use inside a transactional block like {@link
+   * SessionUtils#doMultipleWithCommit(Operation[])}}.
+   *
+   * @param mapperClass the mapper class
+   * @param function the operation logic
+   * @param <T> the mapper type
+   * @param <R> the result type
+   * @return the wrapped operation
+   */
+  public static <T, R> Operation<T, R> callWithoutCommit(

Review Comment:
   > Where is `callWithoutCommit` used? I only noticed that it was called in 
the testing example. Is it expected?
   
   Yes, currently the callWithoutCommit method is only used in test code and 
hasn't been implemented in production code yet, mainly as a precaution to avoid 
impacting existing functionality. For future manual transaction control 
scenarios, we can use doMultipleWithCommit in combination with either 
callWithoutCommit or opWithoutCommit



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