You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by ALEKSEY KUZNETSOV <al...@gmail.com> on 2017/04/17 14:20:22 UTC

cache query operations

Hi, Igniters! When one fires query like this : ignite().cache(null
).query(...)
The query would be executed against the schema. I wonder, how the schema is
synchronized with cache, with cache entries?

What i mean is , cache.query(...update operation...) must eventually update
the cache entry in cache. But how does it happen?(cache API must be called,
but i cannot realize how)
-- 

*Best Regards,*

*Kuznetsov Aleksey*

Re: cache query operations

Posted by Denis Magda <dm...@apache.org>.
I can’t answer on this question because didn’t develop that part of the system.

Could you try to find this out debugging the code?

—
Denis

> On Apr 18, 2017, at 8:00 AM, ALEKSEY KUZNETSOV <al...@gmail.com> wrote:
> 
> So, when GridCacheTtlManager evicted cache entry due to timeout, how H2 got
> notified about it ?
> 
> And as i understand, firstly cacheEntry got evicted, and then H2 data got
> updated(removed corresponding entry)
> 
> вт, 18 апр. 2017 г. в 17:56, Denis Magda <dm...@apache.org>:
> 
>> That’s true, SELECT queries are executed right away by H2 while DML are
>> eventually converted to key-value operations.
>> 
>> —
>> Denis
>> 
>>> On Apr 18, 2017, at 1:29 AM, ALEKSEY KUZNETSOV <al...@gmail.com>
>> wrote:
>>> 
>>> if executing sql "select" clause then no cache key-value operations would
>>> be called.
>>> Debbuging cache.query(...) leads
>>> to
>> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing#executeSqlQuery
>>> which doesnt call cache key-value ops
>>> 
>>> вт, 18 апр. 2017 г. в 10:49, ALEKSEY KUZNETSOV <alkuznetsov.sb@gmail.com
>>> :
>>> 
>>>> thanx! )
>>>> 
>>>> пн, 17 апр. 2017 г. в 21:48, Denis Magda <dm...@apache.org>:
>>>> 
>>>>> Did you have a chance to take a look this documentation that explains
>> how
>>>>> DML statements are turned into cache operations?
>>>>> https://apacheignite.readme.io/docs/dml#dml-operations <
>>>>> https://apacheignite.readme.io/docs/dml#dml-operations>
>>>>> 
>>>>> —
>>>>> Denis
>>>>> 
>>>>>> On Apr 17, 2017, at 7:20 AM, ALEKSEY KUZNETSOV <
>>>>> alkuznetsov.sb@gmail.com> wrote:
>>>>>> 
>>>>>> Hi, Igniters! When one fires query like this : ignite().cache(null
>>>>>> ).query(...)
>>>>>> The query would be executed against the schema. I wonder, how the
>>>>> schema is
>>>>>> synchronized with cache, with cache entries?
>>>>>> 
>>>>>> What i mean is , cache.query(...update operation...) must eventually
>>>>> update
>>>>>> the cache entry in cache. But how does it happen?(cache API must be
>>>>> called,
>>>>>> but i cannot realize how)
>>>>>> --
>>>>>> 
>>>>>> *Best Regards,*
>>>>>> 
>>>>>> *Kuznetsov Aleksey*
>>>>> 
>>>>> --
>>>> 
>>>> *Best Regards,*
>>>> 
>>>> *Kuznetsov Aleksey*
>>>> 
>>> --
>>> 
>>> *Best Regards,*
>>> 
>>> *Kuznetsov Aleksey*
>> 
>> --
> 
> *Best Regards,*
> 
> *Kuznetsov Aleksey*


Re: cache query operations

Posted by ALEKSEY KUZNETSOV <al...@gmail.com>.
So, when GridCacheTtlManager evicted cache entry due to timeout, how H2 got
notified about it ?

And as i understand, firstly cacheEntry got evicted, and then H2 data got
updated(removed corresponding entry)

вт, 18 апр. 2017 г. в 17:56, Denis Magda <dm...@apache.org>:

> That’s true, SELECT queries are executed right away by H2 while DML are
> eventually converted to key-value operations.
>
> —
> Denis
>
> > On Apr 18, 2017, at 1:29 AM, ALEKSEY KUZNETSOV <al...@gmail.com>
> wrote:
> >
> > if executing sql "select" clause then no cache key-value operations would
> > be called.
> > Debbuging cache.query(...) leads
> > to
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing#executeSqlQuery
> > which doesnt call cache key-value ops
> >
> > вт, 18 апр. 2017 г. в 10:49, ALEKSEY KUZNETSOV <alkuznetsov.sb@gmail.com
> >:
> >
> >> thanx! )
> >>
> >> пн, 17 апр. 2017 г. в 21:48, Denis Magda <dm...@apache.org>:
> >>
> >>> Did you have a chance to take a look this documentation that explains
> how
> >>> DML statements are turned into cache operations?
> >>> https://apacheignite.readme.io/docs/dml#dml-operations <
> >>> https://apacheignite.readme.io/docs/dml#dml-operations>
> >>>
> >>> —
> >>> Denis
> >>>
> >>>> On Apr 17, 2017, at 7:20 AM, ALEKSEY KUZNETSOV <
> >>> alkuznetsov.sb@gmail.com> wrote:
> >>>>
> >>>> Hi, Igniters! When one fires query like this : ignite().cache(null
> >>>> ).query(...)
> >>>> The query would be executed against the schema. I wonder, how the
> >>> schema is
> >>>> synchronized with cache, with cache entries?
> >>>>
> >>>> What i mean is , cache.query(...update operation...) must eventually
> >>> update
> >>>> the cache entry in cache. But how does it happen?(cache API must be
> >>> called,
> >>>> but i cannot realize how)
> >>>> --
> >>>>
> >>>> *Best Regards,*
> >>>>
> >>>> *Kuznetsov Aleksey*
> >>>
> >>> --
> >>
> >> *Best Regards,*
> >>
> >> *Kuznetsov Aleksey*
> >>
> > --
> >
> > *Best Regards,*
> >
> > *Kuznetsov Aleksey*
>
> --

*Best Regards,*

*Kuznetsov Aleksey*

Re: cache query operations

Posted by Denis Magda <dm...@apache.org>.
That’s true, SELECT queries are executed right away by H2 while DML are eventually converted to key-value operations.

—
Denis

> On Apr 18, 2017, at 1:29 AM, ALEKSEY KUZNETSOV <al...@gmail.com> wrote:
> 
> if executing sql "select" clause then no cache key-value operations would
> be called.
> Debbuging cache.query(...) leads
> to org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing#executeSqlQuery
> which doesnt call cache key-value ops
> 
> вт, 18 апр. 2017 г. в 10:49, ALEKSEY KUZNETSOV <al...@gmail.com>:
> 
>> thanx! )
>> 
>> пн, 17 апр. 2017 г. в 21:48, Denis Magda <dm...@apache.org>:
>> 
>>> Did you have a chance to take a look this documentation that explains how
>>> DML statements are turned into cache operations?
>>> https://apacheignite.readme.io/docs/dml#dml-operations <
>>> https://apacheignite.readme.io/docs/dml#dml-operations>
>>> 
>>> —
>>> Denis
>>> 
>>>> On Apr 17, 2017, at 7:20 AM, ALEKSEY KUZNETSOV <
>>> alkuznetsov.sb@gmail.com> wrote:
>>>> 
>>>> Hi, Igniters! When one fires query like this : ignite().cache(null
>>>> ).query(...)
>>>> The query would be executed against the schema. I wonder, how the
>>> schema is
>>>> synchronized with cache, with cache entries?
>>>> 
>>>> What i mean is , cache.query(...update operation...) must eventually
>>> update
>>>> the cache entry in cache. But how does it happen?(cache API must be
>>> called,
>>>> but i cannot realize how)
>>>> --
>>>> 
>>>> *Best Regards,*
>>>> 
>>>> *Kuznetsov Aleksey*
>>> 
>>> --
>> 
>> *Best Regards,*
>> 
>> *Kuznetsov Aleksey*
>> 
> -- 
> 
> *Best Regards,*
> 
> *Kuznetsov Aleksey*


Re: cache query operations

Posted by ALEKSEY KUZNETSOV <al...@gmail.com>.
if executing sql "select" clause then no cache key-value operations would
be called.
Debbuging cache.query(...) leads
to org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing#executeSqlQuery
which doesnt call cache key-value ops

вт, 18 апр. 2017 г. в 10:49, ALEKSEY KUZNETSOV <al...@gmail.com>:

> thanx! )
>
> пн, 17 апр. 2017 г. в 21:48, Denis Magda <dm...@apache.org>:
>
>> Did you have a chance to take a look this documentation that explains how
>> DML statements are turned into cache operations?
>> https://apacheignite.readme.io/docs/dml#dml-operations <
>> https://apacheignite.readme.io/docs/dml#dml-operations>
>>
>> —
>> Denis
>>
>> > On Apr 17, 2017, at 7:20 AM, ALEKSEY KUZNETSOV <
>> alkuznetsov.sb@gmail.com> wrote:
>> >
>> > Hi, Igniters! When one fires query like this : ignite().cache(null
>> > ).query(...)
>> > The query would be executed against the schema. I wonder, how the
>> schema is
>> > synchronized with cache, with cache entries?
>> >
>> > What i mean is , cache.query(...update operation...) must eventually
>> update
>> > the cache entry in cache. But how does it happen?(cache API must be
>> called,
>> > but i cannot realize how)
>> > --
>> >
>> > *Best Regards,*
>> >
>> > *Kuznetsov Aleksey*
>>
>> --
>
> *Best Regards,*
>
> *Kuznetsov Aleksey*
>
-- 

*Best Regards,*

*Kuznetsov Aleksey*

Re: cache query operations

Posted by ALEKSEY KUZNETSOV <al...@gmail.com>.
thanx! )

пн, 17 апр. 2017 г. в 21:48, Denis Magda <dm...@apache.org>:

> Did you have a chance to take a look this documentation that explains how
> DML statements are turned into cache operations?
> https://apacheignite.readme.io/docs/dml#dml-operations <
> https://apacheignite.readme.io/docs/dml#dml-operations>
>
> —
> Denis
>
> > On Apr 17, 2017, at 7:20 AM, ALEKSEY KUZNETSOV <al...@gmail.com>
> wrote:
> >
> > Hi, Igniters! When one fires query like this : ignite().cache(null
> > ).query(...)
> > The query would be executed against the schema. I wonder, how the schema
> is
> > synchronized with cache, with cache entries?
> >
> > What i mean is , cache.query(...update operation...) must eventually
> update
> > the cache entry in cache. But how does it happen?(cache API must be
> called,
> > but i cannot realize how)
> > --
> >
> > *Best Regards,*
> >
> > *Kuznetsov Aleksey*
>
> --

*Best Regards,*

*Kuznetsov Aleksey*

Re: cache query operations

Posted by Denis Magda <dm...@apache.org>.
Did you have a chance to take a look this documentation that explains how DML statements are turned into cache operations?
https://apacheignite.readme.io/docs/dml#dml-operations <https://apacheignite.readme.io/docs/dml#dml-operations>

—
Denis

> On Apr 17, 2017, at 7:20 AM, ALEKSEY KUZNETSOV <al...@gmail.com> wrote:
> 
> Hi, Igniters! When one fires query like this : ignite().cache(null
> ).query(...)
> The query would be executed against the schema. I wonder, how the schema is
> synchronized with cache, with cache entries?
> 
> What i mean is , cache.query(...update operation...) must eventually update
> the cache entry in cache. But how does it happen?(cache API must be called,
> but i cannot realize how)
> -- 
> 
> *Best Regards,*
> 
> *Kuznetsov Aleksey*