zstan commented on a change in pull request #9579:
URL: https://github.com/apache/ignite/pull/9579#discussion_r757246511



##########
File path: 
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDestroyCacheTest.java
##########
@@ -191,4 +211,53 @@ private void 
doTestDestroyCacheOperationNotBlockingCheckpointTest(boolean loc) t
 
         fut.get();
     }
+
+    /**
+     * Tests correctness of concurrent cache destroy and implicit tx`s.
+     */
+    @Test
+    public void cacheDestroyWithConcImplicitTx() throws Exception {
+        final IgniteEx crd = (IgniteEx)startGridsMultiThreaded(3);
+
+        crd.cluster().state(ClusterState.ACTIVE);
+
+        crd.createCache(new CacheConfiguration(DEFAULT_CACHE_NAME)
+            
.setBackups(1).setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL).setGroupName("test"));
+
+        crd.createCache(new CacheConfiguration(DEFAULT_CACHE_NAME + "_1")
+            
.setBackups(1).setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL).setGroupName("test"));
+
+        Set<Integer> pkeys = new TreeSet<>();
+        try (final IgniteDataStreamer<Object, Object> streamer = 
crd.dataStreamer(DEFAULT_CACHE_NAME)) {
+            for (int i = 0; i < 100; i++) {
+                streamer.addData(i, i);
+
+                if 
(crd.affinity(DEFAULT_CACHE_NAME).isPrimary(crd.localNode(), i))
+                    pkeys.add(i);
+            }
+        }
+
+        TestRecordingCommunicationSpi spi = 
TestRecordingCommunicationSpi.spi(crd);
+
+        spi.blockMessages(GridDhtTxPrepareRequest.class, 
getTestIgniteInstanceName(1));
+
+        for (Integer pkey : pkeys)
+            crd.cache(DEFAULT_CACHE_NAME).removeAsync(pkey);

Review comment:
       got it, 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to