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

Alexandr Kuramshin commented on IGNITE-5889:
--------------------------------------------

[~v.pyatkov],

Actually you won't get an error upon {{getOrCreateCaches}} invocation with two 
identical cache configurations (as in your test).

Because {{getOrCreateCaches}} internally calls {{dynamicStartCaches}} with 
{{failIfExists == false}}.

But where is two bugs:

1. Starting unnecessary client cache inside {{prepareCacheChangeRequest}} after 
checking that {{desc != null && failIfExists == false && nearCfg == null}}.

2. Calling {{clientCachesToStart}} before the server cache was actually started.

The second bug was fixed in https://issues.apache.org/jira/browse/IGNITE-5763

The first may be fixed in this ticket context.

> Exception message confused when double cache configuration by some mistake.
> ---------------------------------------------------------------------------
>
>                 Key: IGNITE-5889
>                 URL: https://issues.apache.org/jira/browse/IGNITE-5889
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Vladislav Pyatkov
>         Attachments: DoubledCacheConfigurationTest.java
>
>
> {noformat}
> javax.cache.CacheException: Failed to start client cache (a cache with the 
> given name is not started): cache1
>       at 
> org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager.clientCachesToStart(CacheAffinitySharedManager.java:378)
>       at 
> org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager.processClientCacheStartRequests(CacheAffinitySharedManager.java:411)
>       at 
> org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager.processClientCachesChanges(CacheAffinitySharedManager.java:603)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.processCustomExchangeTask(GridCacheProcessor.java:410)
>       at 
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.processCustomTask(GridCachePartitionExchangeManager.java:1789)
>       at 
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1878)
>       at 
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>       at java.lang.Thread.run(Thread.java:745)
> {noformat}
> Message like:
> _Given cache doubled configured: cache1_
> will be more clear



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to