You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Tolga Kavukcu <ka...@gmail.com> on 2017/04/03 13:28:23 UTC

Eager TTL and query

Hi Everyone,

I have a question about cache ttl. I understand that when eager ttl is set
to true for a cache, a thread created and expired entries are cleaned but
this can cause some heap usage.

Otherwise i can set eager ttl to false, when entry accessed ignite checks
if entry expired or not it is very much clear.


I wonder the terminology "When entry accessed" covers running query over
cache. Let's say i didnt call any put or get, but i queried entire cache.
Will expired entries will be removed during cache query execution ?

Regards.

-- 

*Tolga KAVUKÇU*

Re: Eager TTL and query

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

As far as my understanding goes, each cache operation has a chance of
expiring some number of cache entries, so the answer is "e1 and e2 may be
removed when putting e3 into mycache".

Maybe there's somebody to correct me.

Regards,
-- 
Ilya Kasnacheev


ср, 24 февр. 2021 г. в 09:36, xmw45688 <xw...@procurant.com>:

>
>
> Excepted from the latest Ignite doc -
> "If the property (eagerTtl) is set to false, expired entries are not
> removed
> immediately. Instead, they are removed when they are requested in a cache
> operation by the thread that executes the operation."
>
> Say mycache has two entries, e1, e2 with 5 min created expiration and eager
> ttl = false.  After 5 min, e3 is put into mycache("e3", "e3").  will e1 and
> e2 will be triggered to be removed from the cache when putting e3 into
> mycache?
>
> Thanks,
> Xinmin
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Eager TTL and query

Posted by xmw45688 <xw...@procurant.com>.

Excepted from the latest Ignite doc - 
"If the property (eagerTtl) is set to false, expired entries are not removed
immediately. Instead, they are removed when they are requested in a cache
operation by the thread that executes the operation."

Say mycache has two entries, e1, e2 with 5 min created expiration and eager
ttl = false.  After 5 min, e3 is put into mycache("e3", "e3").  will e1 and
e2 will be triggered to be removed from the cache when putting e3 into
mycache?

Thanks,
Xinmin
 



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

Re: Eager TTL and query

Posted by Tolga Kavukcu <ka...@gmail.com>.
Thanks Nikolai.

On Mon, Apr 3, 2017 at 7:05 PM, Nikolai Tikhonov <nt...@apache.org>
wrote:

> Hi,
>
> "When entry accessed" is mind that entry will be involved by IgniteCache
> API (put/get/invoke and etc). In during operation ttl will be checked.
>
> Ignite SQL doesn't update ttl and entry won't be removed.
>
>
> On Mon, Apr 3, 2017 at 4:28 PM, Tolga Kavukcu <ka...@gmail.com>
> wrote:
>
>> Hi Everyone,
>>
>> I have a question about cache ttl. I understand that when eager ttl is
>> set to true for a cache, a thread created and expired entries are cleaned
>> but this can cause some heap usage.
>>
>> Otherwise i can set eager ttl to false, when entry accessed ignite checks
>> if entry expired or not it is very much clear.
>>
>>
>> I wonder the terminology "When entry accessed" covers running query over
>> cache. Let's say i didnt call any put or get, but i queried entire cache.
>> Will expired entries will be removed during cache query execution ?
>>
>> Regards.
>>
>> --
>>
>> *Tolga KAVUKÇU*
>>
>
>


-- 

*Tolga KAVUKÇU*

Re: Eager TTL and query

Posted by Nikolai Tikhonov <nt...@apache.org>.
Hi,

"When entry accessed" is mind that entry will be involved by IgniteCache
API (put/get/invoke and etc). In during operation ttl will be checked.

Ignite SQL doesn't update ttl and entry won't be removed.


On Mon, Apr 3, 2017 at 4:28 PM, Tolga Kavukcu <ka...@gmail.com>
wrote:

> Hi Everyone,
>
> I have a question about cache ttl. I understand that when eager ttl is set
> to true for a cache, a thread created and expired entries are cleaned but
> this can cause some heap usage.
>
> Otherwise i can set eager ttl to false, when entry accessed ignite checks
> if entry expired or not it is very much clear.
>
>
> I wonder the terminology "When entry accessed" covers running query over
> cache. Let's say i didnt call any put or get, but i queried entire cache.
> Will expired entries will be removed during cache query execution ?
>
> Regards.
>
> --
>
> *Tolga KAVUKÇU*
>