[ 
https://issues.apache.org/jira/browse/IGNITE-14044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17330456#comment-17330456
 ] 

Pavel Pereslegin edited comment on IGNITE-14044 at 4/27/21, 4:43 PM:
---------------------------------------------------------------------

[~slava.koptilin],
 could you take a look at this patch?


was (Author: xtern):
[~slava.koptilin],
could you take a look at this patch?

> Cache with node filter is not destroyed properly on the filtered node.
> ----------------------------------------------------------------------
>
>                 Key: IGNITE-14044
>                 URL: https://issues.apache.org/jira/browse/IGNITE-14044
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 2.10
>            Reporter: Pavel Pereslegin
>            Assignee: Pavel Pereslegin
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Steps to reproduce the problem:
>  # Start 2 nodes
>  # Create a cache with node filter (filter second node)
>  # Destroy cache
>  # Restart nodes
> Expected: cache was destroyed on both nodes.
>  Actual: cache was destroyed only on one node, the second node cannot join 
> the cluster with the following error:
> {noformat}
> Caused by: class org.apache.ignite.spi.IgniteSpiException: Joining node has 
> caches with data which are not presented on cluster, it could mean that they 
> were already destroyed, to add the node to cluster - remove directories with 
> the caches[cache1]
>       at 
> org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.checkFailedError(TcpDiscoverySpi.java:2052)
>       at 
> org.apache.ignite.spi.discovery.tcp.ServerImpl.joinTopology(ServerImpl.java:1197)
>       at 
> org.apache.ignite.spi.discovery.tcp.ServerImpl.spiStart(ServerImpl.java:472)
>       at 
> org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.spiStart(TcpDiscoverySpi.java:2154)
>       at 
> org.apache.ignite.internal.managers.GridManagerAdapter.startSpi(GridManagerAdapter.java:278)
>       ... 23 more
> {noformat}
> Reproducer
> {code:java}
> public class IgnitePdsDestroyCacheWithNodeFilterTest extends 
> GridCommonAbstractTest {
>     @Override protected IgniteConfiguration getConfiguration(String 
> igniteInstanceName) throws Exception {
>         return super.getConfiguration(igniteInstanceName)
>             .setConsistentId(igniteInstanceName)
>             .setDataStorageConfiguration(new DataStorageConfiguration()
>             .setDefaultDataRegionConfiguration(new DataRegionConfiguration()
>                 .setPersistenceEnabled(true)));
>     }
>     @Test
>     public void testDestroyCacheWithNodeFilter() throws Exception {
>         cleanPersistenceDir();
>         Ignite ignite = startGrids(2);
>         ignite.cluster().state(ClusterState.ACTIVE);
>         UUID nodeId0 = ignite.cluster().localNode().id();
>         CacheConfiguration<Object, Object> cfg1 = new 
> CacheConfiguration<>("cache1")
>             .setCacheMode(CacheMode.REPLICATED)
>             .setNodeFilter(n -> nodeId0.equals(n.id()));
>         IgniteCache<?, ?> cache1 = ignite.createCache(cfg1);
>         cache1.destroy();
>         forceCheckpoint();
>         awaitPartitionMapExchange();
>         stopAllGrids();
>         ignite = startGrids(2); // failing here
>         ignite.cluster().state(ClusterState.ACTIVE);
>     }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to