You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "steve.hostettler@gmail.com" <st...@gmail.com> on 2018/09/04 09:04:43 UTC
Questions about getAllInternal(...)
Hello,
in the case of local caches without eviction policy. I have the following
questions:
1) I would to understand why, in the method, getAllInternal the method
entryEx(cacheKey); uses the topology in the case of a local cache.
Furthermore, it calls the method map.putEntryIfObsoleteOrAbsent. But the
entry cannot be obsolete or absent because it is a local cache.
2) Similarly, why is there a touch on the key : ctx.evicts().touch(entry,
ctx.affinity().affinityTopologyVersion()); when the evicting policy is null
(never evict)? This puts locks even when the context is lock=false.
Thanks a lot for shedding some light on this.
Steve
--
Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/
Re: Questions about getAllInternal(...)
Posted by "steve.hostettler@gmail.com" <st...@gmail.com>.
Hello Alexey,
Thanks for the answer. It does help but I can't help thinking that the sort
of one size fits all approach would have important performance consequences
on simple use cases (read only local or replicated caches).
Wouldn't be useful to have the option for a on heap non serialized cache
(local or replicated) ?
Steve
--
Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/
Re: Questions about getAllInternal(...)
Posted by Alexey Goncharuk <al...@gmail.com>.
Hello Steve,
A cache entry becomes obsolete once the on-heap object is no longer locked
and is not used by any thread. Since we moved to off-heap-first model in
Ignite 2.0, we must clean on-heap entries as soon as possible to keep the
heap small. Thus both of the places you pointed out.
Hope this helps,
--AG
вт, 4 сент. 2018 г. в 12:04, steve.hostettler@gmail.com <
steve.hostettler@gmail.com>:
> Hello,
>
> in the case of local caches without eviction policy. I have the following
> questions:
>
> 1) I would to understand why, in the method, getAllInternal the method
> entryEx(cacheKey); uses the topology in the case of a local cache.
> Furthermore, it calls the method map.putEntryIfObsoleteOrAbsent. But the
> entry cannot be obsolete or absent because it is a local cache.
>
>
> 2) Similarly, why is there a touch on the key : ctx.evicts().touch(entry,
> ctx.affinity().affinityTopologyVersion()); when the evicting policy is null
> (never evict)? This puts locks even when the context is lock=false.
>
>
> Thanks a lot for shedding some light on this.
>
> Steve
>
>
>
> --
> Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/
>