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

ASF GitHub Bot commented on IGNITE-10228:
-----------------------------------------

GitHub user voropava reopened a pull request:

    https://github.com/apache/ignite/pull/5377

    IGNITE-10228 Start multiple caches in parallel may lead to the fact that 
some of the caches won't be registered.

    …suboptimal batch splitting in U.doInParallel().

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gridgain/apache-ignite ignite-10228

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ignite/pull/5377.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #5377
    
----
commit 3a146d54ca6eef07a90fafc1ac4ce6f0deeda5a6
Author: Pavel Voronkin <pvoronkin@...>
Date:   2018-08-14T18:20:50Z

    IGNITE-10028 Fixed race on addCacheContext/removeCacheContext, fixed 
suboptimal batch splitting in U.doInParallel().

commit 8c93ced97960a85fd4d2a24e1fdefaa3e75bebda
Author: Pavel Voronkin <pvoronkin@...>
Date:   2018-08-14T18:20:50Z

    IGNITE-10028 Review fixes.

----


> Start multiple caches in parallel may lead to the fact that some of the 
> caches won't be registered.
> ---------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-10228
>                 URL: https://issues.apache.org/jira/browse/IGNITE-10228
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>    Affects Versions: 2.6
>            Reporter: Vyacheslav Koptilin
>            Assignee: Pavel Voronkin
>            Priority: Major
>         Attachments: CacheStartingParallelTest.java
>
>
> It looks like the root cause of the issue is that 
> {{CacheGroupContext.addCacheContext()}} (which is called in parallel) does 
> not use a lock/semaphore in order to synchronize {{caches}} updates.
>  
> {code:java}
> private void addCacheContext(GridCacheContext cctx) {
>     ArrayList<GridCacheContext> caches = new ArrayList<>(this.caches);
>     boolean add = caches.add(cctx);
>     ...
>     this.caches = caches;
> }
> {code}
>  
> The possible workaround is to disable parallel start of caches by setting the 
> {{IGNITE_ALLOW_START_CACHES_IN_PARALLEL}} property to {{false}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to