Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-19 Thread Sergi Vladykin
SQL Queries never instantiate or touch cache entries. Thus SQL queries never affect any expiration policies. Sergi 2017-04-19 16:42 GMT+03:00 ALEKSEY KUZNETSOV : > I wonder if "SELECT" clause should *touch *an entry? For instance, > cache.contains() doesn't *touch*. > > вт, 18 апр. 2017 г. в 12:

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-19 Thread ALEKSEY KUZNETSOV
I wonder if "SELECT" clause should *touch *an entry? For instance, cache.contains() doesn't *touch*. вт, 18 апр. 2017 г. в 12:21, ALEKSEY KUZNETSOV : > Yeah. I've already run the test with two caches. Definately, the bug > hidden in cache.query() method. cache.query() calls > IgniteH2Indexing#que

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-18 Thread ALEKSEY KUZNETSOV
Yeah. I've already run the test with two caches. Definately, the bug hidden in cache.query() method. cache.query() calls IgniteH2Indexing#queryLocalSql(), which calls executeSqlQueryWithTimer, and then it sinks into JdbcPreparedStatement.executeQuery(). There is no key-value operations subsequent

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-17 Thread Denis Magda
It doesn’t matter who is right and who is wrong unless someone gets to the bottom of the issue debugging it. I would suggest to create a simple unit test with two caches and trying to reproduce the following without computations and other redundant stuff. Would you like to work on this? — Deni

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-17 Thread ALEKSEY KUZNETSOV
Why do u think so. First of all, the output above is not correct. After 3 iteration key-value API strats to return empty value. Every 5 seconds(iteration sleep time) repository.getAttributes("1").size() is got called. Which makes an entry "touch" and the entry wont be expired for as long as 10 sec

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-14 Thread Denis Magda
The iteration happens multiple time which means that the key-value API had to return an empty result set on second or third iteration. But this never happens. In any case, do you want to find a root of the issue and fix it? Otherwise, we can update the description and wait while someone else fix

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-14 Thread ALEKSEY KUZNETSOV
Because expiry time is 10 seconds, while loop iterates every 5 seconds пт, 14 апр. 2017 г. в 11:32, ALEKSEY KUZNETSOV : > No, the bug is in SQL query, not key-value storage. > > пт, 14 апр. 2017 г. в 11:11, Vladislav Pyatkov : > >> Denis, Aleksey, >> >> It is correct, remember I have already said

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-14 Thread ALEKSEY KUZNETSOV
No, the bug is in SQL query, not key-value storage. пт, 14 апр. 2017 г. в 11:11, Vladislav Pyatkov : > Denis, Aleksey, > > It is correct, remember I have already said something like[1]. > I have no idea, why this happened in this case with SQL. > > [1]: > > http://apache-ignite-developers.2346864

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-14 Thread Vladislav Pyatkov
Denis, Aleksey, It is correct, remember I have already said something like[1]. I have no idea, why this happened in this case with SQL. [1]: http://apache-ignite-developers.2346864.n4.nabble.com/TouchedExpiryPolicy-works-incorrect-in-some-cases-IGNITE-4401-td16349.html#a16356 On Fri, Apr 14, 201

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-13 Thread Denis Magda
I could reproduce the issue and this should be what Denis K. meant by saying “expiration policy works incorrectly”. If you remove the expiration policy from the caches' configuration then the issue disappears. In general, SQL engine processes an expiration event properly because the SQL querie

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-13 Thread ALEKSEY KUZNETSOV
any feedback? чт, 13 апр. 2017 г. в 11:51, ALEKSEY KUZNETSOV : > You should run ExpiryPolicyTest. The output should contain strings like > contains? new AffinityKey("1", "1"): and contains?2 new AffinityKey("1", " > 1"): and empty cursor? = > If you look at them you will see, that cache contains

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-13 Thread ALEKSEY KUZNETSOV
You should run ExpiryPolicyTest. The output should contain strings like contains? new AffinityKey("1", "1"): and contains?2 new AffinityKey("1", "1" ): and empty cursor? = If you look at them you will see, that cache contains affinity key new AffinityKey("1", "1") whereas cursor is empty(on second

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-12 Thread Denis Magda
Bluntly speaking I have no idea where to look and what to expect. This is output of the test execution of my machine: SQL res: [[1], [d]] 2 Op consume: 303 Value: org.ignite.test.EDU@22db8f4 SQL res: [] 0 Op consume: 9 Value: org.ignite.test.EDU@29caf222 SQL res: [] 0 Op consume: 15 Value: org.ig

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-12 Thread ALEKSEY KUZNETSOV
So what do u think about the issue ? ср, 12 апр. 2017 г. в 10:42, ALEKSEY KUZNETSOV : > I have already attached simlified version. Shall i simplify it more ? > > вт, 11 апр. 2017 г. в 19:28, Denis Magda : > > Can you attach the simplified version? Just want to avoid any side effects. > > — > Deni

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-12 Thread ALEKSEY KUZNETSOV
I have already attached simlified version. Shall i simplify it more ? вт, 11 апр. 2017 г. в 19:28, Denis Magda : > Can you attach the simplified version? Just want to avoid any side effects. > > — > Denis > > > On Apr 11, 2017, at 9:14 AM, ALEKSEY KUZNETSOV > wrote: > > > > I took it from https:

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-11 Thread Denis Magda
Can you attach the simplified version? Just want to avoid any side effects. — Denis > On Apr 11, 2017, at 9:14 AM, ALEKSEY KUZNETSOV > wrote: > > I took it from https://issues.apache.org/jira/browse/IGNITE-4401 > and simplified . See in > a

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-11 Thread ALEKSEY KUZNETSOV
I took it from https://issues.apache.org/jira/browse/IGNITE-4401 and simplified . See in attached вт, 11 апр. 2017 г. в 19:03, Denis Magda : > Hello, > > Do you have sample code? > > — > Denis > > On Apr 11, 2017, at 2:45 AM, ALEKSEY KUZNETSOV > wrote: > > > > Hi, igniters! > > While doing http

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-11 Thread Denis Magda
Hello, Do you have sample code? — Denis > On Apr 11, 2017, at 2:45 AM, ALEKSEY KUZNETSOV > wrote: > > Hi, igniters! > While doing https://issues.apache.org/jira/browse/IGNITE-4401 ticket i came > across the fact that cache querying returns null , while cache still has > got entry. > Cache quer

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-10 Thread ALEKSEY KUZNETSOV
It appears that the second query execution returns empty QueryCursor(ResultSet) within expiry time. But cache.get() operation returns non-null value in this time. Looks strange пн, 10 апр. 2017 г. в 17:53, Vladislav Pyatkov : > This is a javax cache API. > Look at the java doc about how to Touche

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-10 Thread Vladislav Pyatkov
This is a javax cache API. Look at the java doc about how to TouchedExpiryPolicy should be work[1]. [1]: http://static.javadoc.io/javax.cache/cache-api/1.0.0/javax/cache/expiry/TouchedExpiryPolicy.html On Mon, Apr 10, 2017 at 5:48 PM, ALEKSEY KUZNETSOV wrote: > Fine. So what is the point of thi

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-10 Thread ALEKSEY KUZNETSOV
Ah, i see. After 1 round the entity got expired, but it should not пн, 10 апр. 2017 г. в 17:48, ALEKSEY KUZNETSOV : > Fine. So what is the point of this ticket? What is the correct behavior of > the policy? > > пн, 10 апр. 2017 г. в 17:45, Vladislav Pyatkov : > > Aleksey, > > Yes, it's corect. >

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-10 Thread ALEKSEY KUZNETSOV
Fine. So what is the point of this ticket? What is the correct behavior of the policy? пн, 10 апр. 2017 г. в 17:45, Vladislav Pyatkov : > Aleksey, > > Yes, it's corect. > Pay attention, in the example was used TouchedExpiryPolicy with 20 seconds > as parameter. This mean enteries will never expir

Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401

2017-04-10 Thread Vladislav Pyatkov
Aleksey, Yes, it's corect. Pay attention, in the example was used TouchedExpiryPolicy with 20 seconds as parameter. This mean enteries will never expired in the example, because its touching each 10 seconds. On Mon, Apr 10, 2017 at 5:23 PM, ALEKSEY KUZNETSOV wrote: > Hello igniters! > Im fixing