alex-plekhanov commented on code in PR #11176:
URL: https://github.com/apache/ignite/pull/11176#discussion_r1495364646


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java:
##########
@@ -3653,6 +3654,52 @@ public void awaitLastFut() {
         }
     }
 
+    /**
+     * Replaces previous async operation future on transaction suspend.
+     */
+    public @Nullable FutureHolder suspendLastFut() {
+        FutureHolder holder = lastFut.get();
+
+        IgniteInternalFuture fut = holder.future();
+
+        if (fut != null && !fut.isDone()) {
+            lastFut.set(new FutureHolder());

Review Comment:
   Fixed



##########
modules/core/src/test/java/org/apache/ignite/internal/client/thin/BlockingTxOpsTest.java:
##########
@@ -0,0 +1,298 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.client.thin;
+
+import java.util.TreeSet;
+import java.util.concurrent.ThreadLocalRandom;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.client.ClientCache;
+import org.apache.ignite.client.ClientCacheConfiguration;
+import org.apache.ignite.client.ClientTransaction;
+import org.apache.ignite.client.IgniteClient;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.testframework.GridTestUtils;
+import org.junit.Test;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static 
org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
+import static 
org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
+
+/**
+ * Thin client blocking transactional operations tests.
+ */
+public class BlockingTxOpsTest extends AbstractThinClientTest {

Review Comment:
   But testBlockingOps tests both this cases.
   It runs with poolSize = 1, so every async request is processed by the same 
thread and async operations chained in one future.
   Also, using of explicit and implicit transactions concurrent transactions 
lead to merge of async futures.  



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