Lalant commented on code in PR #7482:
URL: https://github.com/apache/ignite-3/pull/7482#discussion_r2797098639
##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/InternalTransaction.java:
##########
@@ -164,6 +164,15 @@ default boolean remote() {
*/
CompletableFuture<Void> rollbackTimeoutExceededAsync();
+ /**
+ * Rolls back the transaction due to a non-user exception and records the
abort reason.
+ * A rollback of a completed or ending transaction has no effect and
always succeeds when the transaction is completed.
+ *
+ * @param throwable Abort reason.
+ * @return The future.
+ */
+ CompletableFuture<Void> rollbackWithExceptionAsync(Throwable throwable);
Review Comment:
Done
##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/IgniteAbstractTransactionImpl.java:
##########
@@ -164,4 +169,20 @@ public long getTimeout() {
public boolean isRolledBackWithTimeoutExceeded() {
return timeoutExceeded;
}
+
+ @Override
+ public CompletableFuture<Void> rollbackWithExceptionAsync(Throwable
throwable) {
+ return rollbackAsync().whenComplete((v, t) -> {
Review Comment:
Done
--
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]