You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by wangsan <wq...@gmail.com> on 2018/10/19 11:32:28 UTC

npe: Failed to reinitialize local partition

when a c++ node with cache(c++ defined) join the java server node(persistence
true).
it will throw this exception,When I clear server persistence home then
restart.the exception won't throw
Why?

o.a.i.i.p.c.d.d.p.GridDhtPartitionsExchangeFuture  - Failed to reinitialize
local partitions (preloading will be stopped): GridDhtPartitionExchangeId
[topVer=AffinityTopologyVersion [topVer=5, minorTopVer=0],
discoEvt=DiscoveryEvent [evtNode=ZookeeperClusterNode
[id=4279e27d-0091-47cf-a165-c8b769240aa8, addrs=[172.17.0.1, 10.153.106.14,
0:0:0:0:0:0:0:1%lo, 127.0.0.1], order=5, loc=false, client=true], topVer=5,
nodeId8=56841f60, msg=Node joined: ZookeeperClusterNode
[id=4279e27d-0091-47cf-a165-c8b769240aa8, addrs=[172.17.0.1, 10.153.106.14,
0:0:0:0:0:0:0:1%lo, 127.0.0.1], order=5, loc=false, client=true],
type=NODE_JOINED, tstamp=1539937359544], nodeId=4279e27d, evt=NODE_JOINED]
java.lang.NullPointerException: null
        at
org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager$11.apply(GridCacheDatabaseSharedManager.java:1243)
        at
org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager$11.apply(GridCacheDatabaseSharedManager.java:1239)
        at
org.apache.ignite.internal.util.future.GridFutureAdapter.notifyListener(GridFutureAdapter.java:383)
        at
org.apache.ignite.internal.util.future.GridFutureAdapter.listen(GridFutureAdapter.java:353)
        at
org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.rebuildIndexesIfNeeded(GridCacheDatabaseSharedManager.java:1239)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onDone(GridDhtPartitionsExchangeFuture.java:1711)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onDone(GridDhtPartitionsExchangeFuture.java:126)
        at
org.apache.ignite.internal.util.future.GridFutureAdapter.onDone(GridFutureAdapter.java:451)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:729)
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419)
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299)
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
        at java.lang.Thread.run(Thread.java:745)



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: npe: Failed to reinitialize local partition

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

You can track it on developers list. Should be any day now.

Regards,
-- 
Ilya Kasnacheev


пн, 29 окт. 2018 г. в 6:53, wangsan <wq...@gmail.com>:

> Hi:
>     I run the test in v2.5 (with npe patch) , The in_memory cache backups
> will be 0 when reconnect. When I use v2.7 ,It's ok!
>     When  v2.7 release will be released?
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: npe: Failed to reinitialize local partition

Posted by wangsan <wq...@gmail.com>.
Hi:
    I run the test in v2.5 (with npe patch) , The in_memory cache backups
will be 0 when reconnect. When I use v2.7 ,It's ok!
    When  v2.7 release will be released?





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: npe: Failed to reinitialize local partition

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

Sorry, I was looking at file in a wrong location. Now I can see your test.
I have ran it on master and the result is:


----------------- wait for client reconnect
persisted backups ->1
inmemory backups ->2

If this is the correct result, I think you should expect the correct
behaviour in 2.7 release.

Regards,
-- 
Ilya Kasnacheev


чт, 25 окт. 2018 г. в 19:32, Ilya Kasnacheev <il...@gmail.com>:

> Hello!
>
> What is the cache template here, and where is it defined?
>
> I don't see any changes to the test. Can you modify it so that it will
> display your case?
>
> Regard,
> --
> Ilya Kasnacheev
>
>
> чт, 25 окт. 2018 г. в 5:31, wangsan <wq...@gmail.com>:
>
>> IgniteTwoRegionsRebuildIndexTest.java
>> <
>> http://apache-ignite-users.70518.x6.nabble.com/file/t1807/IgniteTwoRegionsRebuildIndexTest.java>
>>
>>
>>
>> The file is the test case.
>> I use getOrCreateCache with name. But the cache template I have beed
>> defined
>> before.When reconnect ,It looks like the cache template not work.
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>

Re: npe: Failed to reinitialize local partition

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

What is the cache template here, and where is it defined?

I don't see any changes to the test. Can you modify it so that it will
display your case?

Regard,
-- 
Ilya Kasnacheev


чт, 25 окт. 2018 г. в 5:31, wangsan <wq...@gmail.com>:

> IgniteTwoRegionsRebuildIndexTest.java
> <
> http://apache-ignite-users.70518.x6.nabble.com/file/t1807/IgniteTwoRegionsRebuildIndexTest.java>
>
>
>
> The file is the test case.
> I use getOrCreateCache with name. But the cache template I have beed
> defined
> before.When reconnect ,It looks like the cache template not work.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: npe: Failed to reinitialize local partition

Posted by wangsan <wq...@gmail.com>.
IgniteTwoRegionsRebuildIndexTest.java
<http://apache-ignite-users.70518.x6.nabble.com/file/t1807/IgniteTwoRegionsRebuildIndexTest.java>  


The file is the test case.
I use getOrCreateCache with name. But the cache template I have beed defined
before.When reconnect ,It looks like the cache template not work.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: npe: Failed to reinitialize local partition

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

Can you make a simple reproducer of that problem?

I have tried to reproduce it but could not observe the backup number
changing. Instead, on 2.7 I observe correct number and on 2.6- I observe
NPE since cache2a does not exist in the grid.

Note that if you run ignite.getOrCreateCache("cache2a") then of course the
cache will be created with zero backups (default configuration). Avoid
doing that.

Regards,
-- 
Ilya Kasnacheev


вт, 23 окт. 2018 г. в 11:53, wangsan <wq...@gmail.com>:

> Tks!
> I applyed the patch from the issue.And the NPE was fixed.
> But another problems happen:
>
> As the issue says:
> Steps to reproduce:
> Ignite server
>
> region1 (with persistence)
> region2 (without persistence)
> client
>
> cache1a from region1 – with custom affinity
> cache2a fom region2 – with custom affinity  !!! set backups=2(diff from the
> issule)
>
> 1. Populate data in both cache1a and cache2a.
> 2. Restart ignite server. It knows about cache1a from the persistent store.
> It doesn’t know about cache2a.
> 3. Don't restart client.Wait for the client to reconnect. Then the cache2a
> basckup will be 0 not 2!
>
> It looks like client reconnect did not carry cacheconfiguration(backups=2)
> but just use cacheName
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: npe: Failed to reinitialize local partition

Posted by wangsan <wq...@gmail.com>.
Tks!
I applyed the patch from the issue.And the NPE was fixed.
But another problems happen:

As the issue says:
Steps to reproduce:
Ignite server

region1 (with persistence)
region2 (without persistence)
client

cache1a from region1 – with custom affinity
cache2a fom region2 – with custom affinity  !!! set backups=2(diff from the
issule)

1. Populate data in both cache1a and cache2a.
2. Restart ignite server. It knows about cache1a from the persistent store.
It doesn’t know about cache2a.
3. Don't restart client.Wait for the client to reconnect. Then the cache2a
basckup will be 0 not 2!

It looks like client reconnect did not carry cacheconfiguration(backups=2)
but just use cacheName





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: npe: Failed to reinitialize local partition

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

I'm not very familiar with the area of Persistence FS layout, but I imagine
this might be caused by the bug we are discussing.

Regards,
-- 
Ilya Kasnacheev


пт, 19 окт. 2018 г. в 18:00, wangsan <wq...@gmail.com>:

> Thanks!
> The ticket description is especially like my scene. I will apply the patch!
>
> I have a little confused about the persistence file.
> If I have a default region without persistence. and cache2a use default
> region. the db file(directory) won't be created.
>
> But if I have
>
> region1 (with persistence)
> region2 (without persistence)
>
> cache1a from region1
> cache2a fom region2
>
> cache2a  use region2 without persistence.Why cache2a still have db
> file(directory) in file system?
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: npe: Failed to reinitialize local partition

Posted by wangsan <wq...@gmail.com>.
Thanks!
The ticket description is especially like my scene. I will apply the patch!

I have a little confused about the persistence file. 
If I have a default region without persistence. and cache2a use default
region. the db file(directory) won't be created.

But if I have

region1 (with persistence)   
region2 (without persistence)

cache1a from region1
cache2a fom region2 

cache2a  use region2 without persistence.Why cache2a still have db
file(directory) in file system?




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: npe: Failed to reinitialize local partition

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

Looks exactly like a known issue:
https://issues.apache.org/jira/browse/IGNITE-9425

It will be fixed in 2.7 which is due real soon. You could also try nightly
builds to see if it would help.

Or you could try to work-around this problem based on the description from
ticket (same cache configurations on all nodes, I guess).

Regards,
-- 
Ilya Kasnacheev


пт, 19 окт. 2018 г. в 14:32, wangsan <wq...@gmail.com>:

> when a c++ node with cache(c++ defined) join the java server
> node(persistence
> true).
> it will throw this exception,When I clear server persistence home then
> restart.the exception won't throw
> Why?
>
> o.a.i.i.p.c.d.d.p.GridDhtPartitionsExchangeFuture  - Failed to reinitialize
> local partitions (preloading will be stopped): GridDhtPartitionExchangeId
> [topVer=AffinityTopologyVersion [topVer=5, minorTopVer=0],
> discoEvt=DiscoveryEvent [evtNode=ZookeeperClusterNode
> [id=4279e27d-0091-47cf-a165-c8b769240aa8, addrs=[172.17.0.1, 10.153.106.14,
> 0:0:0:0:0:0:0:1%lo, 127.0.0.1], order=5, loc=false, client=true], topVer=5,
> nodeId8=56841f60, msg=Node joined: ZookeeperClusterNode
> [id=4279e27d-0091-47cf-a165-c8b769240aa8, addrs=[172.17.0.1, 10.153.106.14,
> 0:0:0:0:0:0:0:1%lo, 127.0.0.1], order=5, loc=false, client=true],
> type=NODE_JOINED, tstamp=1539937359544], nodeId=4279e27d, evt=NODE_JOINED]
> java.lang.NullPointerException: null
>         at
>
> org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager$11.apply(GridCacheDatabaseSharedManager.java:1243)
>         at
>
> org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager$11.apply(GridCacheDatabaseSharedManager.java:1239)
>         at
>
> org.apache.ignite.internal.util.future.GridFutureAdapter.notifyListener(GridFutureAdapter.java:383)
>         at
>
> org.apache.ignite.internal.util.future.GridFutureAdapter.listen(GridFutureAdapter.java:353)
>         at
>
> org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.rebuildIndexesIfNeeded(GridCacheDatabaseSharedManager.java:1239)
>         at
>
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onDone(GridDhtPartitionsExchangeFuture.java:1711)
>         at
>
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onDone(GridDhtPartitionsExchangeFuture.java:126)
>         at
>
> org.apache.ignite.internal.util.future.GridFutureAdapter.onDone(GridFutureAdapter.java:451)
>         at
>
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:729)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299)
>         at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>         at java.lang.Thread.run(Thread.java:745)
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>