You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by wetnose <mo...@mail.ru> on 2016/09/19 17:35:13 UTC

@CacheLocalStore: toplogy changing strategy

Hi,

We have no global DB behind the grid, and we use @CacheLocalStore annotation
in our Store implementation. But after some tests we've discovered that we
cannot change the cluster tolopogy arbitrarily without data loss. It is
because Ignite knows nothing about the storage contents.

Here is an example (see readme.txt)
https://dl.dropboxusercontent.com/u/46370629/localstore-example.zip

We've tried to create a "protocol" of topology changing in order to avoid
problems with synchronization of local stores.

* We must completely disable evictions
* We should not join a node to the cluster until the loadCache operation is
completed
* We should fix the topology (using the TopologyValidator) when completely
stopping the cluster
* We should restore the fixed topology (using the TopologyValidator) when
starting the cluster
* A node can leave a topology at any time. And it can be joined back, but
its store should be cleared before (it is because it can contain already
deleted entries)

The protocol is quite difficult and I want to find a way to simplify it. I'm
sure that Ignite already manages some of issues that we try to solve with
the protocol.

How to use Ignite with local stores correctly? Are there some set of simple
rules that we should follow to avoid data loss?



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/CacheLocalStore-toplogy-changing-strategy-tp7832.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: @CacheLocalStore: toplogy changing strategy

Posted by wetnose <mo...@mail.ru>.
Hi,

Thanks for the reply! I've already extracted the Local Recoverable Store
classes from the GridGain core library, decompiled them and tried to use in
my example. The works absolutely in the same way.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/CacheLocalStore-toplogy-changing-strategy-tp7832p8152.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: @CacheLocalStore: toplogy changing strategy

Posted by vdpyatkov <vl...@gmail.com>.
Hi,

Yes, you are right. In your case, data does not load from persistent store
before obtain this from cache.
If you are invoke wn.ignite.test.Get between these phases:

8. Start both nodes

> Run Get Client: it gets 10 records from MyCache

 9. Run Node3

You get expected behavior.

You can particle solve the issue, if subscribe to topology change event
EVT_NODE_JOINED[1] and loaded entries using affinity.

Or you can do preloading whole store when node started.

Also GridGain enterprice contains Local Recoverable Store[2] as one of
features.

[1]:  https://apacheignite.readme.io/docs/events
[2]: https://gridgain.readme.io/docs/local-recoverable-store



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/CacheLocalStore-toplogy-changing-strategy-tp7832p8151.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.