ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Kasnacheev (Jira)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-14466) Changing cache configuration once cache is created confuses PME on node join
Date Fri, 02 Apr 2021 09:08:00 GMT
Ilya Kasnacheev created IGNITE-14466:
----------------------------------------

             Summary: Changing cache configuration once cache is created confuses PME on node
join
                 Key: IGNITE-14466
                 URL: https://issues.apache.org/jira/browse/IGNITE-14466
             Project: Ignite
          Issue Type: Bug
    Affects Versions: 2.7.5
            Reporter: Ilya Kasnacheev


The following code triggers the issue:

{code:java}
inputCache = ignite.cache(inputCacheName);
CacheConfiguration configuration = inputCache.getConfiguration(CacheConfiguration.class);
outputCache = ignite.getOrCreateCache(configuration.setName("cache_" + ctx.name()));
{code}

It is possible for user code to accidentally reuse the same cache configuration instance when
creating caches (see linked example). This causes the following hard to debug NPE:

{code:java}
Mar 30, 2021 11:53:25 AM org.apache.ignite.logger.java.JavaLogger error
SEVERE: Exception in discovery notyfier worker thread.
java.lang.NullPointerException
    at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.addClientNode(GridDiscoveryManager.java:445)
    at org.apache.ignite.internal.processors.cache.ClusterCachesInfo.processCacheChangeRequests(ClusterCachesInfo.java:596)
    at org.apache.ignite.internal.processors.cache.ClusterCachesInfo.onCacheChangeRequested(ClusterCachesInfo.java:430)
    at org.apache.ignite.internal.processors.cache.GridCacheProcessor.onCustomEvent(GridCacheProcessor.java:3827)
    at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$4.onDiscovery0(GridDiscoveryManager.java:697)
    at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$4.lambda$onDiscovery$0(GridDiscoveryManager.java:604)
    at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryMessageNotifierWorker.body0(GridDiscoveryManager.java:2667)
    at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryMessageNotifierWorker.body(GridDiscoveryManager.java:2705)
    at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
    at java.lang.Thread.run(Thread.java:748)
{code}


We should, maybe, clone a cache configuration before putting it to our internal data structures?
Or better, serialize-deserialize as all of the remaining nodes in the cluster do.



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

Mime
View raw message