sanpwc commented on code in PR #6413:
URL: https://github.com/apache/ignite-3/pull/6413#discussion_r2287285187


##########
modules/api/src/main/java/org/apache/ignite/tx/IgniteTransactions.java:
##########
@@ -257,26 +267,9 @@ default <T> T runInTransaction(Function<Transaction, T> 
clo) throws TransactionE
      * @throws TransactionException If a transaction can't be finished 
successfully.
      */
     default <T> T runInTransaction(Function<Transaction, T> clo, @Nullable 
TransactionOptions options) throws TransactionException {
-        Objects.requireNonNull(clo);
-
-        Transaction tx = begin(options);
-
-        try {
-            T ret = clo.apply(tx);
-
-            tx.commit();
-
-            return ret;
-        } catch (Throwable t) {
-            // TODO FIXME https://issues.apache.org/jira/browse/IGNITE-17838 
Implement auto retries
-            try {
-                tx.rollback(); // Try rolling back on user exception.
-            } catch (Exception e) {
-                t.addSuppressed(e);
-            }
-
-            throw t;
-        }
+        long startTimestamp = System.currentTimeMillis();
+        long initialTimeout = options == null ? 
TimeUnit.SECONDS.toMillis(DEFAULT_RW_TX_TIMEOUT_SECONDS) : 
options.timeoutMillis();

Review Comment:
   options are nullable



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to