You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Niels Ejrnæs <Ni...@enghouse.com> on 2019/08/08 13:44:13 UTC
AtomicReference issue with different userVersions
Hey all,
Am I wrong in assuming I can do this directly when running a client with a different userVersion?
IgniteAtomicLong atomicLong = ignite.atomicLong("long", 0, false);
I get this Exception when running DeploymentMode CONTINUOUS and trying to access either AtomicReferences or AtomicLongs.
Exception in thread "clientNode" class org.apache.ignite.IgniteException: Failed to start continuous query.
at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:1026)
at org.apache.ignite.internal.IgniteKernal.atomicLong(IgniteKernal.java:3719)
at org.apache.ignite.internal.IgniteKernal.atomicLong(IgniteKernal.java:3705)
at nee.ContinuousDeploymentTest$ClientNode.run(ContinuousDeploymentTest.java:74)
at java.lang.Thread.run(Unknown Source)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to start continuous query.
at org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager.executeQuery0(CacheContinuousQueryManager.java:761)
at org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager.executeInternalQuery(CacheContinuousQueryManager.java:597)
at org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.startQuery(DataStructuresProcessor.java:218)
at org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.getAtomic(DataStructuresProcessor.java:547)
at org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.atomicLong(DataStructuresProcessor.java:463)
at org.apache.ignite.internal.IgniteKernal.atomicLong(IgniteKernal.java:3716)
... 3 more
Caused by: class org.apache.ignite.internal.IgniteDeploymentCheckedException: Failed to obtain deployment for class: org.apache.ignite.configuration.CacheConfiguration$IgniteAllNodesPredicate
at org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.processStartRequest(GridContinuousProcessor.java:1357)
at org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.access$400(GridContinuousProcessor.java:111)
at org.apache.ignite.internal.processors.continuous.GridContinuousProcessor$2.onCustomEvent(GridContinuousProcessor.java:203)
at org.apache.ignite.internal.processors.continuous.GridContinuousProcessor$2.onCustomEvent(GridContinuousProcessor.java:194)
at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$4.onDiscovery0(GridDiscoveryManager.java:727)
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)
... 1 more
PS:
It works if I fetch it via an IgniteCallable, but don't know if this is the intended way.
IgniteAtomicLong remoteAtomicLong = ignite.compute().call(() -> { return ignite.atomicLong("long", 0, false); });
Best regards
Niels Elkjær Ejrnæs
Software Developer R&D
[cid:image006.png@01CFD272.B971A050]
M: +45 2971 9570 I E: niels.ejrnaes@enghouse.com<ma...@enghouse.com>
web: www.enghousenetworks.com<http://www.enghousenetworks.com/>
Enghouse is listed on the Toronto Stock Exchange (TSX:ESL)
Office: +45 7025 1411
Address: Lautrupvang 12
DK-27 50 Ballerup, Denmark
Re: AtomicReference issue with different userVersions
Posted by tanshuai <de...@126.com>.
This is related to the user version. I suspect the user versions of the
server node and the client node are different. You can add <property
name="peerClassLoadingLocalClassPathExclude"
value="org.apache.ignite.configuration.CacheConfiguration$IgniteAllNodesPredicate"/>
as a workaround.
However, I don't understand what the StartRoutineDiscoveryMessageV2 is used
for. Why the StartRequestDataV2 message is sent. Can anybody help explain?
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: AtomicReference issue with different userVersions
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
Tricky exception message leading to usability issues is a bug all right.
Especially if it is possible to check for this case earlier and give a
proper warning/not face the issue.
Regards,
--
Ilya Kasnacheev
пт, 11 июн. 2021 г. в 10:59, tanshuai <de...@126.com>:
> I don't think we should treat it as a bug. But it does introduce tricky
> exceptions under certain circumstances.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: AtomicReference issue with different userVersions
Posted by tanshuai <de...@126.com>.
I don't think we should treat it as a bug. But it does introduce tricky
exceptions under certain circumstances.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: AtomicReference issue with different userVersions
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
Is this a bug which needs to be addressed? If so, can you file a ticket
against Ignite JIRA?
Thanks,
--
Ilya Kasnacheev
ср, 9 июн. 2021 г. в 11:19, tanshuai <de...@126.com>:
> <
> http://apache-ignite-users.70518.x6.nabble.com/file/t3172/20210609161010.jpg>
>
>
> I may have found the root cause.
>
> The invocation chain should be something like the one below.
>
> org.apache.ignite.internal.managers.deployment.GridDeploymentManager#deploy
> org.apache.ignite.internal.util.IgniteUtils#detectClassLoader
> org.apache.ignite.internal.util.GridClassLoaderCache#classLoader
> org.apache.ignite.internal.util.GridClassLoaderCache#detectClassLoader
>
> And you must have used Thread.currentThread().setContextClassLoader()
> somewhere in you app before the
>
> org.apache.ignite.internal.processors.continuous.GridContinuousProcessor#processStartRequestV2
> method is invoked.
>
> There is user version under the thread context classloader, which is
> different from the one in the StartRoutineDiscoveryMessageV2.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: AtomicReference issue with different userVersions
Posted by tanshuai <de...@126.com>.
<http://apache-ignite-users.70518.x6.nabble.com/file/t3172/20210609161010.jpg>
I may have found the root cause.
The invocation chain should be something like the one below.
org.apache.ignite.internal.managers.deployment.GridDeploymentManager#deploy
org.apache.ignite.internal.util.IgniteUtils#detectClassLoader
org.apache.ignite.internal.util.GridClassLoaderCache#classLoader
org.apache.ignite.internal.util.GridClassLoaderCache#detectClassLoader
And you must have used Thread.currentThread().setContextClassLoader()
somewhere in you app before the
org.apache.ignite.internal.processors.continuous.GridContinuousProcessor#processStartRequestV2
method is invoked.
There is user version under the thread context classloader, which is
different from the one in the StartRoutineDiscoveryMessageV2.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
RE: AtomicReference issue with different userVersions
Posted by Niels Ejrnæs <Ni...@enghouse.com>.
Hey
I've created https://issues.apache.org/jira/browse/IGNITE-12058 for tracking this.
Best regards
Niels Elkjær Ejrnæs
Software Developer R&D
From: Ilya Kasnacheev <il...@gmail.com>
Sent: 9. august 2019 18:54
To: user@ignite.apache.org
Subject: Re: AtomicReference issue with different userVersions
Hello!
This looks like a bug to me. Can you file a ticket against Apache Ignite JIRA?
Otherwise, I recommend returning data structures by their name from compute, as a workaround.
Regards,
--
Ilya Kasnacheev
Re: AtomicReference issue with different userVersions
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
This looks like a bug to me. Can you file a ticket against Apache Ignite
JIRA?
Otherwise, I recommend returning data structures by their name from
compute, as a workaround.
Regards,
--
Ilya Kasnacheev
пт, 9 авг. 2019 г. в 18:20, Niels Ejrnæs <Ni...@enghouse.com>:
> Hello Ilya :)
>
>
>
> Here it is. It contains two projects server-node and client-node. I'm
> gonna have to rephrase what works and what doesn't. Now I can't even return
> the AtomicLong/Reference objects through the compute task. I have to unpack
> them first.
>
>
>
> Run the main for ServerNode to start the server node.
>
> Then you can run the ClientNode main to see the Exceptions I get.
>
>
>
> *Best regards*
>
> *Niels Elkjær Ejrnæs*
>
>
>
> *From:* Ilya Kasnacheev <il...@gmail.com>
> *Sent:* 8. august 2019 15:54
> *To:* user@ignite.apache.org
> *Subject:* Re: AtomicReference issue with different userVersions
>
>
>
> Hello!
>
>
>
> Can you throw together a small reproducer project for this behavior?
>
>
>
> Regards,
>
> --
>
> Ilya Kasnacheev
>
>
>
>
>
> чт, 8 авг. 2019 г. в 16:44, Niels Ejrnæs <Ni...@enghouse.com>:
>
> Hey all,
>
>
>
> Am I wrong in assuming I can do this directly when running a client with a
> different userVersion?
>
> IgniteAtomicLong atomicLong = ignite.atomicLong("long", 0, *false*);
>
>
>
> I get this Exception when running DeploymentMode CONTINUOUS and trying to
> access either AtomicReferences or AtomicLongs.
>
>
>
> Exception in thread "clientNode" class *org.apache.ignite.IgniteException*:
> Failed to start continuous query.
>
> at org.apache.ignite.internal.util.IgniteUtils.convertException(
> *IgniteUtils.java:1026*)
>
> at org.apache.ignite.internal.IgniteKernal.atomicLong(
> *IgniteKernal.java:3719*)
>
> at org.apache.ignite.internal.IgniteKernal.atomicLong(
> *IgniteKernal.java:3705*)
>
> at nee.ContinuousDeploymentTest$ClientNode.run(
> *ContinuousDeploymentTest.java:74*)
>
> at java.lang.Thread.run(Unknown Source)
>
> Caused by: class *org.apache.ignite.IgniteCheckedException*: Failed to
> start continuous query.
>
> at
> org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager.executeQuery0(
> *CacheContinuousQueryManager.java:761*)
>
> at
> org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager.executeInternalQuery(
> *CacheContinuousQueryManager.java:597*)
>
> at
> org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.startQuery(
> *DataStructuresProcessor.java:218*)
>
> at
> org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.getAtomic(
> *DataStructuresProcessor.java:547*)
>
> at
> org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.atomicLong(
> *DataStructuresProcessor.java:463*)
>
> at org.apache.ignite.internal.IgniteKernal.atomicLong(
> *IgniteKernal.java:3716*)
>
> ... 3 more
>
> Caused by: class
> *org.apache.ignite.internal.IgniteDeploymentCheckedException*: Failed to
> obtain deployment for class:
> org.apache.ignite.configuration.CacheConfiguration$IgniteAllNodesPredicate
>
> at
> org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.processStartRequest(
> *GridContinuousProcessor.java:1357*)
>
> at
> org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.access$400(
> *GridContinuousProcessor.java:111*)
>
> at
> org.apache.ignite.internal.processors.continuous.GridContinuousProcessor$2.onCustomEvent(
> *GridContinuousProcessor.java:203*)
>
> at
> org.apache.ignite.internal.processors.continuous.GridContinuousProcessor$2.onCustomEvent(
> *GridContinuousProcessor.java:194*)
>
> at
> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$4.onDiscovery0(
> *GridDiscoveryManager.java:727*)
>
> 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*)
>
> ... 1 more
>
>
>
> PS:
>
> It works if I fetch it via an IgniteCallable, but don't know if this is
> the intended way.
>
> IgniteAtomicLong *remoteAtomicLong* = ignite.compute().call(() -> {
> *return* ignite.atomicLong("long", 0, *false*); });
>
>
>
>
>
> *Best regards*
>
> *Niels Elkjær Ejrnæs*
>
> *Software Developer R&D*
>
>
>
>
RE: AtomicReference issue with different userVersions
Posted by Niels Ejrnæs <Ni...@enghouse.com>.
Hello Ilya :)
Here it is. It contains two projects server-node and client-node. I'm gonna have to rephrase what works and what doesn't. Now I can't even return the AtomicLong/Reference objects through the compute task. I have to unpack them first.
Run the main for ServerNode to start the server node.
Then you can run the ClientNode main to see the Exceptions I get.
Best regards
Niels Elkjær Ejrnæs
From: Ilya Kasnacheev <il...@gmail.com>
Sent: 8. august 2019 15:54
To: user@ignite.apache.org
Subject: Re: AtomicReference issue with different userVersions
Hello!
Can you throw together a small reproducer project for this behavior?
Regards,
--
Ilya Kasnacheev
чт, 8 авг. 2019 г. в 16:44, Niels Ejrnæs <Ni...@enghouse.com>>:
Hey all,
Am I wrong in assuming I can do this directly when running a client with a different userVersion?
IgniteAtomicLong atomicLong = ignite.atomicLong("long", 0, false);
I get this Exception when running DeploymentMode CONTINUOUS and trying to access either AtomicReferences or AtomicLongs.
Exception in thread "clientNode" class org.apache.ignite.IgniteException: Failed to start continuous query.
at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:1026)
at org.apache.ignite.internal.IgniteKernal.atomicLong(IgniteKernal.java:3719)
at org.apache.ignite.internal.IgniteKernal.atomicLong(IgniteKernal.java:3705)
at nee.ContinuousDeploymentTest$ClientNode.run(ContinuousDeploymentTest.java:74)
at java.lang.Thread.run(Unknown Source)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to start continuous query.
at org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager.executeQuery0(CacheContinuousQueryManager.java:761)
at org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager.executeInternalQuery(CacheContinuousQueryManager.java:597)
at org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.startQuery(DataStructuresProcessor.java:218)
at org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.getAtomic(DataStructuresProcessor.java:547)
at org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.atomicLong(DataStructuresProcessor.java:463)
at org.apache.ignite.internal.IgniteKernal.atomicLong(IgniteKernal.java:3716)
... 3 more
Caused by: class org.apache.ignite.internal.IgniteDeploymentCheckedException: Failed to obtain deployment for class: org.apache.ignite.configuration.CacheConfiguration$IgniteAllNodesPredicate
at org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.processStartRequest(GridContinuousProcessor.java:1357)
at org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.access$400(GridContinuousProcessor.java:111)
at org.apache.ignite.internal.processors.continuous.GridContinuousProcessor$2.onCustomEvent(GridContinuousProcessor.java:203)
at org.apache.ignite.internal.processors.continuous.GridContinuousProcessor$2.onCustomEvent(GridContinuousProcessor.java:194)
at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$4.onDiscovery0(GridDiscoveryManager.java:727)
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)
... 1 more
PS:
It works if I fetch it via an IgniteCallable, but don't know if this is the intended way.
IgniteAtomicLong remoteAtomicLong = ignite.compute().call(() -> { return ignite.atomicLong("long", 0, false); });
Best regards
Niels Elkjær Ejrnæs
Software Developer R&D
Re: AtomicReference issue with different userVersions
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
Can you throw together a small reproducer project for this behavior?
Regards,
--
Ilya Kasnacheev
чт, 8 авг. 2019 г. в 16:44, Niels Ejrnæs <Ni...@enghouse.com>:
> Hey all,
>
>
>
> Am I wrong in assuming I can do this directly when running a client with a
> different userVersion?
>
> IgniteAtomicLong atomicLong = ignite.atomicLong("long", 0, *false*);
>
>
>
> I get this Exception when running DeploymentMode CONTINUOUS and trying to
> access either AtomicReferences or AtomicLongs.
>
>
>
> Exception in thread "clientNode" class *org.apache.ignite.IgniteException*:
> Failed to start continuous query.
>
> at org.apache.ignite.internal.util.IgniteUtils.convertException(
> *IgniteUtils.java:1026*)
>
> at org.apache.ignite.internal.IgniteKernal.atomicLong(
> *IgniteKernal.java:3719*)
>
> at org.apache.ignite.internal.IgniteKernal.atomicLong(
> *IgniteKernal.java:3705*)
>
> at nee.ContinuousDeploymentTest$ClientNode.run(
> *ContinuousDeploymentTest.java:74*)
>
> at java.lang.Thread.run(Unknown Source)
>
> Caused by: class *org.apache.ignite.IgniteCheckedException*: Failed to
> start continuous query.
>
> at
> org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager.executeQuery0(
> *CacheContinuousQueryManager.java:761*)
>
> at
> org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager.executeInternalQuery(
> *CacheContinuousQueryManager.java:597*)
>
> at
> org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.startQuery(
> *DataStructuresProcessor.java:218*)
>
> at
> org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.getAtomic(
> *DataStructuresProcessor.java:547*)
>
> at
> org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.atomicLong(
> *DataStructuresProcessor.java:463*)
>
> at org.apache.ignite.internal.IgniteKernal.atomicLong(
> *IgniteKernal.java:3716*)
>
> ... 3 more
>
> Caused by: class
> *org.apache.ignite.internal.IgniteDeploymentCheckedException*: Failed to
> obtain deployment for class:
> org.apache.ignite.configuration.CacheConfiguration$IgniteAllNodesPredicate
>
> at
> org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.processStartRequest(
> *GridContinuousProcessor.java:1357*)
>
> at
> org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.access$400(
> *GridContinuousProcessor.java:111*)
>
> at
> org.apache.ignite.internal.processors.continuous.GridContinuousProcessor$2.onCustomEvent(
> *GridContinuousProcessor.java:203*)
>
> at
> org.apache.ignite.internal.processors.continuous.GridContinuousProcessor$2.onCustomEvent(
> *GridContinuousProcessor.java:194*)
>
> at
> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$4.onDiscovery0(
> *GridDiscoveryManager.java:727*)
>
> 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*)
>
> ... 1 more
>
>
>
> PS:
>
> It works if I fetch it via an IgniteCallable, but don't know if this is
> the intended way.
>
> IgniteAtomicLong *remoteAtomicLong* = ignite.compute().call(() -> {
> *return* ignite.atomicLong("long", 0, *false*); });
>
>
>
>
>
> *Best regards*
>
> *Niels Elkjær Ejrnæs*
>
> *Software Developer R&D*
>
>
>
> [image: cid:image006.png@01CFD272.B971A050]
>
>
>
> M: +45 2971 9570 I E: niels.ejrnaes@enghouse.com
>
> web: *www.enghousenetworks.com <http://www.enghousenetworks.com/>*
>
>
>
> Enghouse is listed on the Toronto Stock Exchange (TSX:ESL)
>
>
>
> Office: +45 7025 1411
> Address: Lautrupvang 12
>
> DK-27 50 Ballerup, Denmark
>
>
>