Re: NullPointerException on ScanQuery

2016-12-20 Thread Alper Tekinalp
Hi Val. Do you have an idea what is causing the NPE in the first place? As Andrey says the exception is caused because of different topology versions cluster nodes. > What is null? > Node is null in the following code in

Re: NullPointerException on ScanQuery

2016-12-20 Thread Valentin Kulichenko
Hi Andrey, Do you have an idea what is causing the NPE in the first place? What is null? I didn't quite get it from the thread. -Val On Tue, Dec 20, 2016 at 2:14 AM, Andrey Gura wrote: > Hi, > > As I wrote already I don't see any race for stable topology. Problems > are

Re: NullPointerException on ScanQuery

2016-12-20 Thread Andrey Gura
Hi, As I wrote already I don't see any race for stable topology. Problems are possible on unstable topology. You can try wait for topology version will be the same on all nodes in cluster and avoid this race. Unfortunately I can't see your code except of example that has some drawbacks mentioned

Re: NullPointerException on ScanQuery

2016-12-20 Thread Alper Tekinalp
Hi all. Is there any comment on this? -- Alper Tekinalp Software Developer Evam Streaming Analytics Atatürk Mah. Turgut Özal Bulv. Gardenya 5 Plaza K:6 Ataşehir 34758 İSTANBUL Tel: +90 216 455 01 53 Fax: +90 216 455 01 54 www.evam.com.tr

Re: NullPointerException on ScanQuery

2016-12-12 Thread Alper Tekinalp
> > Hi, > Hi Andrey. First of all thanks for your responces. First of all you have races in your code. For example your start two > threads and destroy caches before thread is finished and it leads to > cache closed error. It is of course reasonable to get "cache closed" errors in that case

Re: NullPointerException on ScanQuery

2016-12-12 Thread Andrey Gura
Hi, I've looked at your code. First of all you have races in your code. For example your start two threads and destroy caches before thread is finished and it leads to cache closed error. Moreover, you stops application before any thread finished and it leads to topology changing and NPE. The

Re: NullPointerException on ScanQuery

2016-12-12 Thread Alper Tekinalp
Hi Andrey. Did you able to look to the code? Regards. On Thu, Dec 8, 2016 at 10:05 AM, Alper Tekinalp wrote: > Hi. > > Could you please share your reproducer example? > > > I added classes to repoduce the error. It also throws cache closed errors > I am ok with it. But others.

Re: NullPointerException on ScanQuery

2016-12-07 Thread Alper Tekinalp
Hi all. It seems one method uses affinity: cctx.affinity().primaryPartitions(n.id(), topologyVersion()); other uses topology API. cctx.topology().owners(part, topVer) Are these two fully consistent? On Tue, Dec 6, 2016 at 4:58 PM, Alper Tekinalp wrote: > Hi all. > > We

NullPointerException on ScanQuery

2016-12-06 Thread Alper Tekinalp
Hi all. We have 2 servers and a cache X. On both servers a method is running reqularly and run a ScanQurey on that cache. We get partitions for that query via ignite.affinity(cacheName).primaryPartitions(ignite.cluster().localNode()) and run the query on each partitions. When cache has been