sergeyuttsel commented on code in PR #1503:
URL: https://github.com/apache/ignite-3/pull/1503#discussion_r1066963853


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -981,7 +989,7 @@ private CompletableFuture<Void> 
processTxFinishAction(TxFinishReplicaRequest req
      * @param commit True is the transaction is committed, false otherwise.
      * @return Future to wait of the finish.
      */
-    private CompletableFuture<Object> 
finishTransaction(List<ReplicationGroupId> aggregatedGroupIds, UUID txId, 
boolean commit) {
+    private CompletableFuture<Object> 
finishTransaction(List<ReplicationGroupId> aggregatedGroupIds, UUID txId, 
boolean commit) {//

Review Comment:
   Yes, fixed.



##########
modules/table/src/test/java/org/apache/ignite/internal/table/TxAbstractTest.java:
##########
@@ -121,10 +122,29 @@ public abstract class TxAbstractTest extends 
IgniteAbstractTest {
     public abstract void before() throws Exception;
 
     @Test
-    public void testDeleteUpsertCommit() throws TransactionException {
-        deleteUpsert().commit();
+    public void testCommitRollbackSameTxNotThrows() throws 
TransactionException {

Review Comment:
   fixed



##########
modules/table/src/test/java/org/apache/ignite/internal/table/TxAbstractTest.java:
##########
@@ -121,10 +122,29 @@ public abstract class TxAbstractTest extends 
IgniteAbstractTest {
     public abstract void before() throws Exception;
 
     @Test
-    public void testDeleteUpsertCommit() throws TransactionException {
-        deleteUpsert().commit();
+    public void testCommitRollbackSameTxNotThrows() throws 
TransactionException {
+        InternalTransaction tx = (InternalTransaction) 
igniteTransactions.begin();
 
-        assertEquals(200., accounts.recordView().get(null, 
makeKey(1)).doubleValue("balance"));
+        accounts.recordView().upsert(tx, makeValue(1, 100.));
+
+        tx.commit();
+
+        assertDoesNotThrow(tx::rollback, "Unexpected exception was thrown.");
+        assertDoesNotThrow(tx::commit, "Unexpected exception was thrown.");
+        assertDoesNotThrow(tx::rollback, "Unexpected exception was thrown.");
+    }
+
+    @Test
+    public void testRollbackCommitSameTxNotThrows() throws 
TransactionException {

Review Comment:
   fixed



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