AtomicReference issue with different userVersions

classic Classic list List threaded Threaded
5 messages Options
Niels Ejrnæs Niels Ejrnæs
Reply | Threaded
Open this post in threaded view
|

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: [hidden email]

web: 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

 

ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

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 <[hidden email]>:

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: [hidden email]

web: 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

 

Niels Ejrnæs Niels Ejrnæs
Reply | Threaded
Open this post in threaded view
|

RE: AtomicReference issue with different userVersions

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 <[hidden email]>
Sent: 8. august 2019 15:54
To: [hidden email]
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 <[hidden email]>:

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

 


ignite-playground.tar.gz (4K) Download Attachment
ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

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


пт, 9 авг. 2019 г. в 18:20, Niels Ejrnæs <[hidden email]>:

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 <[hidden email]>
Sent: 8. august 2019 15:54
To: [hidden email]
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 <[hidden email]>:

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

 

Niels Ejrnæs Niels Ejrnæs
Reply | Threaded
Open this post in threaded view
|

RE: AtomicReference issue with different userVersions

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 <[hidden email]>
Sent: 9. august 2019 18:54
To: [hidden email]
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