You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ilya Kasnacheev (JIRA)" <ji...@apache.org> on 2018/04/12 13:49:00 UTC
[jira] [Assigned] (IGNITE-7547) Failing to deploy service created
by Proxy.newProxyInstance() on multiple nodes
[ https://issues.apache.org/jira/browse/IGNITE-7547?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ilya Kasnacheev reassigned IGNITE-7547:
---------------------------------------
Assignee: (was: Ilya Kasnacheev)
> Failing to deploy service created by Proxy.newProxyInstance() on multiple nodes
> -------------------------------------------------------------------------------
>
> Key: IGNITE-7547
> URL: https://issues.apache.org/jira/browse/IGNITE-7547
> Project: Ignite
> Issue Type: Bug
> Components: compute
> Affects Versions: 2.4
> Reporter: Ilya Kasnacheev
> Priority: Major
>
> When a new node comes with a service which is already defined in the cluster (by name), the following check is made:
> deployed.configuration().equalsIgnoreNodeFilter(newCfg)
> It checks for several parameters, including Service's class.equals().
> If a normal class is used, it will work. However, sometimes Service implementation is created with java.lang.reflect.Proxy.newProxyInstance().
> This method creates new classes on demand. They will have names like $ProxyNN, where NN is ordinal which cannot be depended on. On different nodes the ordering of proxies will be different. This means that equality for these classes cannot be dependent on.
> And indeed it causes problems, as follows
> {code:java}
> Caused by: class org.apache.ignite.IgniteCheckedException: Failed to deploy service (service already exists with different configuration) [deployed=LazyServiceConfiguration [srvcClsName=com.sun.proxy.$Proxy0, svcCls=, nodeFilterCls=], new=LazyServiceConfiguration [srvcClsName=com.sun.proxy.$Proxy1, svcCls=$Proxy1, nodeFilterCls=]]
> at org.apache.ignite.internal.processors.service.GridServiceProcessor.writeServiceToCache(GridServiceProcessor.java:689)
> at org.apache.ignite.internal.processors.service.GridServiceProcessor.deployAll(GridServiceProcessor.java:590){code}
> My proposal follows: we should check that both classes respond to Proxy.isProxyClass() before comparing classes. If they are, consider them equal. I don't think we can check more.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)