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

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

GitHub user agoncharuk opened a pull request:

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

    IGNITE-2396 - Fixed service deployment on cache creation.

    

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

    $ git pull https://github.com/agoncharuk/ignite ignite-2396

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

    https://github.com/apache/ignite/pull/416.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 #416
    
----
commit 30ff1588a4f0c1374d78d762cb3877611040ae3c
Author: Alexey Goncharuk <[email protected]>
Date:   2016-01-22T08:04:29Z

    IGNITE-2396 - Fixed service deployment on cache creation.

----


> Dynamic cache changes are not tracked by service processor
> ----------------------------------------------------------
>
>                 Key: IGNITE-2396
>                 URL: https://issues.apache.org/jira/browse/IGNITE-2396
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Alexey Goncharuk
>            Assignee: Alexey Goncharuk
>              Labels: community
>             Fix For: 1.6
>
>
> Currently service processor handles only discovery node join/leave/fail 
> events. Now consider the following two scenarios:
> ---------------------
>  - N nodes are started. Topology version is (N, 0)
>  - A dynamic cache is created. Topology version is (N, 1)
>  - An affinity singleton service is deployed. 
> On step (3), when assignment is calculated, service processor uses topology 
> version (N, 0) (see 
> org.apache.ignite.internal.processors.service.GridServiceProcessor.DeploymentListener#onDeployment).
>  As a result, no affinity nodes are returned for assignment and service is 
> not deployed.
> ---------------------
>  - N nodes are started. Topology version is (N, 0)
>  - An affinity singleton service is deployed. 
>  - A dynamic cache is created. Topology version is (N, 1)
> On step (3) custom discovery event is generated, but it is not handled by 
> service processor, so no reassignment logic is triggered and service is not 
> deployed.
> Proposed solution is as follows:
>  - Use a correct topology version for service deployment 
> (ctx.discovery().topologyVersionEx()).
>  - Event listener should handle custom events that trigger dynamic cache 
> start and stop.
>  - Additionally need to investigate whether reassignment logic should be in 
> any way synchronized with the partition exchange future completion. 
> org.apache.ignite.internal.processors.service.IgniteServiceDynamicCachesSelfTest
>  is added to master. Need to add it to the services test suite once the fix 
> is implemented.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to