ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Magda <dma...@gridgain.com>
Subject Re: Cache entries getting cleared
Date Wed, 10 Feb 2016 05:47:36 GMT
I've not noted that the cache was cleared when some of the server nodes 
left the topology.

Was the cache data inserted from all the nodes or from specific nodes 
only (including the crashed one)?

--
Denis

On 2/9/2016 6:32 PM, Syed Moizuddin wrote:
> Thanks Denis, I will refer the docs.
> I had peerClassLoadingEnabled set to*true,*in my config. Also the 
> cache creation happened from a node in client mode, which exit after 
> cache creation. I was able to run queries in Zeppelin till one of the 
> server crashed. Is this scenario also covered?
> Regards,
> Moiz
>
> On Tue, Feb 9, 2016 at 8:09 PM, Denis Magda <dmagda@gridgain.com 
> <mailto:dmagda@gridgain.com>> wrote:
>
>     Hi Moiz,
>
>     This happens due to several reasons:
>     - you're using peer-class-loading feature [1] that allows to load
>     a class definition from remote nodes if a class is missed locally.
>     - in your case a remote node loads Model class from the node that
>     created TEST cache and has its class locally;
>     - when the node that started the cache leaves the cluster this
>     cache is undeployed because DeploymentMode.SHARED mode is used.
>     Please refer to the description of this and other nodes for more
>     details.
>
>     To workaround this situation you can switch to Ignite 1.5.0.final
>     that uses binary objects format [2] for which peer-class-loading
>     is not needed at the cache level and thus the undeployment will
>     not happen.
>
>     If you don't need the peer-class-loading for the rest of
>     functionality (Ignite Compute, scan queries filters, etc.) then I
>     would suggest you turning off it at all by removing
>
>          <property  name="peerClassLoadingEnabled"  value="true"/>
>
>     from your config.
>
>     [1] https://apacheignite.readme.io/docs/zero-deployment
>     [2] https://apacheignite.readme.io/docs/binary-marshaller
>
>     --
>     Denis
>
>
>     On 2/9/2016 9:17 AM, Syed Moizuddin wrote:
>>     Hi,
>>
>>     I have a ignite cluster with cache TEST created as follows:
>>
>>     try (Ignite ignite = Ignition.start("config/example-ignite.xml"));) {
>>          System.out.println(">>> Cache data streamer example started.");
>>          CacheConfiguration<Long, Model> cacheConfiguration =new CacheConfiguration<>(CACHE_NAME);
>>          cacheConfiguration.setCacheMode(CacheMode.PARTITIONED);// Default. cacheConfiguration.setIndexedTypes(Long.class,
Model.class);
>>          cacheConfiguration.setBackups(1);
>>     ...
>>
>>     When one of the node crashes, the cache is cleared and I see the
>>     following log on the running nodes.
>>
>>     [13:12:02] Topology snapshot [ver=48, servers=12, clients=2,
>>     CPUs=136, heap=54.0GB]
>>     [13:23:43] Topology snapshot [ver=49, servers=11, clients=2,
>>     CPUs=136, heap=50.0GB]
>>     [13:25:58] Cleared all cache entries for undeployed class loader
>>     [cacheName=TEST, undeployCnt=1079679, swapUndeployCnt=0,
>>     clsLdr=o.a.i.i.managers.deployment.GridDeploymentClassLoader]
>>     [13:25:58]   ^-- Cache auto-undeployment happens in SHARED
>>     deployment mode (to turn off, switch to CONTINUOUS mode)
>>
>>     Could someone help me explain(or point to doc) what happened how
>>     to avoid the cache getting cleared.
>>
>>     Regards,
>>     Moiz
>
>


Mime
View raw message