Re: Why GridCacheEvictionManager always use cfg.getEvictionPolicy/cfg.getEvictionPolicyFactory even there is NearEvictionPolicy configured?

2018-07-06 Thread Dmitry Pavlov
Hi,

Is this question related to some contribution? If not, probably user@ list
is better place to ask, even if question is advanced. Community members
monitors user list, so even advanced question can find asnwer there.

Dev@ list is intended for discussions related to particular contributions,
PRs, tickests, test failures, proposed changes, development infra, etc.

Sincerely,
Dmitriy Pavlov

чт, 5 июл. 2018 г. в 7:21, kcheng.mvp :

> As the method
> *org.apache.ignite.internal.processors.cache.GridCacheAdapter#isNear*
> always
> returns false, it will make the near cache eviction policy don't take
> effect. Here is the code from
>
> *org.apache.ignite.internal.processors.cache.GridCacheEvictionManager#start0*.
> is this an expected behavior ?
> ==
> CacheConfiguration cfg = cctx.config();
>
> if (cctx.isNear()) {
> plc =
> (cfg.getNearConfiguration().getNearEvictionPolicyFactory()
> != null) ?
>
>
> (EvictionPolicy)cfg.getNearConfiguration().getNearEvictionPolicyFactory().create()
> :
> cfg.getNearConfiguration().getNearEvictionPolicy();
> }
> else if (cfg.getEvictionPolicyFactory() != null)
> plc = (EvictionPolicy)cfg.getEvictionPolicyFactory().create();
> else
> plc = cfg.getEvictionPolicy();
>
> plcEnabled = plc != null;
>
> filter = cfg.getEvictionFilter();
> ==
>
>
>
> --
> Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/
>


Why GridCacheEvictionManager always use cfg.getEvictionPolicy/cfg.getEvictionPolicyFactory even there is NearEvictionPolicy configured?

2018-07-04 Thread kcheng.mvp
As the method
*org.apache.ignite.internal.processors.cache.GridCacheAdapter#isNear* always
returns false, it will make the near cache eviction policy don't take
effect. Here is the code from
*org.apache.ignite.internal.processors.cache.GridCacheEvictionManager#start0*.
is this an expected behavior ? 
==
CacheConfiguration cfg = cctx.config();

if (cctx.isNear()) {
plc = (cfg.getNearConfiguration().getNearEvictionPolicyFactory()
!= null) ?
   
(EvictionPolicy)cfg.getNearConfiguration().getNearEvictionPolicyFactory().create()
:
cfg.getNearConfiguration().getNearEvictionPolicy();
}
else if (cfg.getEvictionPolicyFactory() != null)
plc = (EvictionPolicy)cfg.getEvictionPolicyFactory().create();
else
plc = cfg.getEvictionPolicy();

plcEnabled = plc != null;

filter = cfg.getEvictionFilter();
==



--
Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/