You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Вадим Опольский <va...@gmail.com> on 2017/04/10 17:15:40 UTC

IGNITE - 4760 ready for review

Hello guys!

Semyon, review please again. Test check corresponding IgniteCaches contain
expected number of entries. Test fails for
HibernateNonStrictAccessStrategy.
And per-cache thread local in method threadLocalForCache fix this issue.

https://github.com/apache/ignite/pull/1768/files

Vadim Opolski


2017-04-07 14:15 GMT+03:00 Semyon Boikov <sb...@gridgain.com>:

> Hi Vadim,
>
> Test does not look correct to me. I think test need check that
> corresponding IgniteCaches contain expected number of entries like
> 'testCacheUsage' does.
>
> Thanks
>
> On Wed, Apr 5, 2017 at 3:26 PM, Вадим Опольский <va...@gmail.com>
> wrote:
>
>> Hello everybody!
>>
>> Added test. Test fails after session.update(e2forUpdate). This update
>> must put into ENTITY2_NAME region, but it puts into ENTITY1_NAME and
>> ENTITY2_NAME regions.
>>
>> https://github.com/vadopolski/ignite/pull/1
>>
>> Is it true?
>>
>> I have no idea how to change the method threadLocalForCache to support
>> NONSTRICT_READ_WRITE strategy. I tried to change it in accordance with
>> Cameroon Braid report.
>>
>> Vadim Opolski
>>
>>
>> ---------- Forwarded message ----------
>> From: Вадим Опольский <va...@gmail.com>
>> Date: 2017-04-03 17:39 GMT+03:00
>> Subject: Re: IGNITE - 4760 : working in hibernate module
>> To: dev@ignite.apache.org
>> Cc: Valentin Kulichenko <va...@gmail.com>, Semyon Boikov <
>> sboikov@gridgain.com>
>>
>>
>> Hello everyone!
>>
>> I added some change to method threadLocalForCache  and added test
>> testEntityCacheNonStrictFails.
>>
>> How to reproduce situation when updates can be recorded to another region?
>>
>> https://github.com/vadopolski/ignite/blob/5aa25f3830fef14ac5
>> 07ed73872d62b2969a7411/modules/hibernate/src/main/java/org/
>> apache/ignite/cache/hibernate/HibernateRegionFactory.java
>>
>> https://github.com/vadopolski/ignite/blob/5aa25f3830fef14ac5
>> 07ed73872d62b2969a7411/modules/hibernate/src/test/java/org/
>> apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java
>>
>> PullRequest
>> https://github.com/vadopolski/ignite/pull/4/files
>>
>> Vadim
>>
>>
>>
>> 2017-03-27 18:20 GMT+03:00 Denis Magda <dm...@apache.org>:
>>
>>> Vadim,
>>>
>>> What IDE do you use? My recommendation would be to set up everything
>>> let’s say under IntellijIDEA or Eclipse and after that trying to compile
>>> from a terminal.
>>>
>>> This is how you can easily prepare the dev env in IntellijIDEA:
>>> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup <
>>> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup>
>>>
>>> —
>>> Denis
>>>
>>> > On Mar 27, 2017, at 7:14 AM, Вадим Опольский <va...@gmail.com>
>>> wrote:
>>> >
>>> > Valentin, OK.
>>> >
>>> > To enabled it in my environment I done next:
>>> > - built project with command - mvn clean package -DskipTests
>>> -Prelease,lgpl
>>> > - added folder hibernate to modules in project structure
>>> > - added library to dependencies (without it import doesn't working)
>>> >
>>> > After that I have a lot of error, for instance:
>>> > - Class 'AccessStrategy' must either be declared abstract or implement
>>> abstract method 'remove(SharedSessionContractImplementor, Object) in
>>> 'RegionAccessStrategy'
>>> >
>>> > generateCacheKey
>>> > getCacheKeyId
>>> > getRegion
>>> > insert
>>> > afterInsert
>>> > update
>>> > afterUpdate
>>> > insert
>>> > afterInsert
>>> > update
>>> > get
>>> > putFromLoad
>>> > lockItem
>>> > unlockItem
>>> > remove
>>> >
>>> > Do anybody know the easier way to resolve this issue?
>>> >
>>> > Also tried to reimport all maven projects and cleansed repository in
>>> .m2.
>>> > Vadim Opolski
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > 2017-03-25 2:42 GMT+03:00 Valentin Kulichenko <
>>> valentin.kulichenko@gmail.com <ma...@gmail.com>>:
>>> > Vadim,
>>> >
>>> > ignite-hibernate module is a part of 'lgpl' profile. Apparently it's
>>> not
>>> > enabled in your environment.
>>> >
>>> > -Val
>>> >
>>> > On Fri, Mar 24, 2017 at 4:38 PM, Вадим Опольский <vaopolskij@gmail.com
>>> <ma...@gmail.com>>
>>> > wrote:
>>> >
>>> > > Hello everybody,
>>> > >
>>> > > I want to resolve issue №4760
>>> > > https://issues.apache.org/jira/browse/IGNITE-4760 <
>>> https://issues.apache.org/jira/browse/IGNITE-4760>
>>> > >
>>> > > To find solution I'm going to change method threadLocalForCache and
>>> to add
>>> > > Junit test.
>>> > >
>>> > > Why folder hibernate is not a module ? Can I added it ?
>>> > >
>>> > > Vadim Opolski
>>> > >
>>> >
>>>
>>>
>>
>>
>

Re: IGNITE - 4760 ready for review

Posted by Вадим Опольский <va...@gmail.com>.
Hi Semyon!

I added tests for ReadWrite and NonStrictReadWrite strategy.

Also I couldn't find how to get information about access type for created
region and added overload method threadLocalForCache() without param for
ReadWrite Strategy case in createAccessStrategy. Is it right ?

https://github.com/apache/ignite/pull/1768

Vadim

2017-04-13 15:05 GMT+03:00 Semyon Boikov <sb...@gridgain.com>:

> Hi Vadim,
>
> I added comments in JIRA. I'll apply the same fix for hibernate5 when fix
> is finalized.
>
> Thanks!
>
> On Thu, Apr 13, 2017 at 12:10 PM, Вадим Опольский <va...@gmail.com>
> wrote:
>
>> Hi, guys!
>>
>> Semyon, have you had a time to review IGNITE-4760
>> https://github.com/apache/ignite/pull/1768 ?
>>
>> Is this fix actual for hibernate5 module?
>>
>> Vadim Opolski
>>
>> 2017-04-11 13:40 GMT+03:00 Semyon Boikov <sb...@gridgain.com>:
>>
>>> Thanks Vadim, I'll try to do review today.
>>>
>>> Semyon
>>>
>>> On Mon, Apr 10, 2017 at 8:15 PM, Вадим Опольский <va...@gmail.com>
>>> wrote:
>>>
>>>> Hello guys!
>>>>
>>>> Semyon, review please again. Test check corresponding IgniteCaches
>>>> contain expected number of entries. Test fails for
>>>> HibernateNonStrictAccessStrategy.
>>>> And per-cache thread local in method threadLocalForCache fix this issue.
>>>>
>>>> https://github.com/apache/ignite/pull/1768/files
>>>>
>>>> Vadim Opolski
>>>>
>>>>
>>>> 2017-04-07 14:15 GMT+03:00 Semyon Boikov <sb...@gridgain.com>:
>>>>
>>>>> Hi Vadim,
>>>>>
>>>>> Test does not look correct to me. I think test need check that
>>>>> corresponding IgniteCaches contain expected number of entries like
>>>>> 'testCacheUsage' does.
>>>>>
>>>>> Thanks
>>>>>
>>>>> On Wed, Apr 5, 2017 at 3:26 PM, Вадим Опольский <va...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hello everybody!
>>>>>>
>>>>>> Added test. Test fails after session.update(e2forUpdate). This update
>>>>>> must put into ENTITY2_NAME region, but it puts into ENTITY1_NAME and
>>>>>> ENTITY2_NAME regions.
>>>>>>
>>>>>> https://github.com/vadopolski/ignite/pull/1
>>>>>>
>>>>>> Is it true?
>>>>>>
>>>>>> I have no idea how to change the method threadLocalForCache to
>>>>>> support NONSTRICT_READ_WRITE strategy. I tried to change it in accordance
>>>>>> with Cameroon Braid report.
>>>>>>
>>>>>> Vadim Opolski
>>>>>>
>>>>>>
>>>>>> ---------- Forwarded message ----------
>>>>>> From: Вадим Опольский <va...@gmail.com>
>>>>>> Date: 2017-04-03 17:39 GMT+03:00
>>>>>> Subject: Re: IGNITE - 4760 : working in hibernate module
>>>>>> To: dev@ignite.apache.org
>>>>>> Cc: Valentin Kulichenko <va...@gmail.com>, Semyon
>>>>>> Boikov <sb...@gridgain.com>
>>>>>>
>>>>>>
>>>>>> Hello everyone!
>>>>>>
>>>>>> I added some change to method threadLocalForCache  and added test
>>>>>> testEntityCacheNonStrictFails.
>>>>>>
>>>>>> How to reproduce situation when updates can be recorded to another
>>>>>> region?
>>>>>>
>>>>>> https://github.com/vadopolski/ignite/blob/5aa25f3830fef14ac5
>>>>>> 07ed73872d62b2969a7411/modules/hibernate/src/main/java/org/a
>>>>>> pache/ignite/cache/hibernate/HibernateRegionFactory.java
>>>>>>
>>>>>> https://github.com/vadopolski/ignite/blob/5aa25f3830fef14ac5
>>>>>> 07ed73872d62b2969a7411/modules/hibernate/src/test/java/org/a
>>>>>> pache/ignite/cache/hibernate/HibernateL2CacheConfigurationSe
>>>>>> lfTest.java
>>>>>>
>>>>>> PullRequest
>>>>>> https://github.com/vadopolski/ignite/pull/4/files
>>>>>>
>>>>>> Vadim
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2017-03-27 18:20 GMT+03:00 Denis Magda <dm...@apache.org>:
>>>>>>
>>>>>>> Vadim,
>>>>>>>
>>>>>>> What IDE do you use? My recommendation would be to set up everything
>>>>>>> let’s say under IntellijIDEA or Eclipse and after that trying to compile
>>>>>>> from a terminal.
>>>>>>>
>>>>>>> This is how you can easily prepare the dev env in IntellijIDEA:
>>>>>>> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup <
>>>>>>> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup>
>>>>>>>
>>>>>>> —
>>>>>>> Denis
>>>>>>>
>>>>>>> > On Mar 27, 2017, at 7:14 AM, Вадим Опольский <va...@gmail.com>
>>>>>>> wrote:
>>>>>>> >
>>>>>>> > Valentin, OK.
>>>>>>> >
>>>>>>> > To enabled it in my environment I done next:
>>>>>>> > - built project with command - mvn clean package -DskipTests
>>>>>>> -Prelease,lgpl
>>>>>>> > - added folder hibernate to modules in project structure
>>>>>>> > - added library to dependencies (without it import doesn't working)
>>>>>>> >
>>>>>>> > After that I have a lot of error, for instance:
>>>>>>> > - Class 'AccessStrategy' must either be declared abstract or
>>>>>>> implement abstract method 'remove(SharedSessionContractImplementor,
>>>>>>> Object) in 'RegionAccessStrategy'
>>>>>>> >
>>>>>>> > generateCacheKey
>>>>>>> > getCacheKeyId
>>>>>>> > getRegion
>>>>>>> > insert
>>>>>>> > afterInsert
>>>>>>> > update
>>>>>>> > afterUpdate
>>>>>>> > insert
>>>>>>> > afterInsert
>>>>>>> > update
>>>>>>> > get
>>>>>>> > putFromLoad
>>>>>>> > lockItem
>>>>>>> > unlockItem
>>>>>>> > remove
>>>>>>> >
>>>>>>> > Do anybody know the easier way to resolve this issue?
>>>>>>> >
>>>>>>> > Also tried to reimport all maven projects and cleansed repository
>>>>>>> in .m2.
>>>>>>> > Vadim Opolski
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> > 2017-03-25 2:42 GMT+03:00 Valentin Kulichenko <
>>>>>>> valentin.kulichenko@gmail.com <mailto:valentin.kulichenko@gmail.com
>>>>>>> >>:
>>>>>>> > Vadim,
>>>>>>> >
>>>>>>> > ignite-hibernate module is a part of 'lgpl' profile. Apparently
>>>>>>> it's not
>>>>>>> > enabled in your environment.
>>>>>>> >
>>>>>>> > -Val
>>>>>>> >
>>>>>>> > On Fri, Mar 24, 2017 at 4:38 PM, Вадим Опольский <
>>>>>>> vaopolskij@gmail.com <ma...@gmail.com>>
>>>>>>> > wrote:
>>>>>>> >
>>>>>>> > > Hello everybody,
>>>>>>> > >
>>>>>>> > > I want to resolve issue №4760
>>>>>>> > > https://issues.apache.org/jira/browse/IGNITE-4760 <
>>>>>>> https://issues.apache.org/jira/browse/IGNITE-4760>
>>>>>>> > >
>>>>>>> > > To find solution I'm going to change method threadLocalForCache
>>>>>>> and to add
>>>>>>> > > Junit test.
>>>>>>> > >
>>>>>>> > > Why folder hibernate is not a module ? Can I added it ?
>>>>>>> > >
>>>>>>> > > Vadim Opolski
>>>>>>> > >
>>>>>>> >
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: IGNITE - 4760 ready for review

Posted by Вадим Опольский <va...@gmail.com>.
Semyon, thanks for comments.

- I will change access type for created region.
- USE_STRUCTURED_CACHE property needs to store data in cache in a more
readable format. Without it I cant cast data from cache to String and
HashMap.
- I will add the same test for READ_WRITE access strategy.
- I will check code style rules.

Vadim


2017-04-13 15:05 GMT+03:00 Semyon Boikov <sb...@gridgain.com>:

> Hi Vadim,
>
> I added comments in JIRA. I'll apply the same fix for hibernate5 when fix
> is finalized.
>
> Thanks!
>
> On Thu, Apr 13, 2017 at 12:10 PM, Вадим Опольский <va...@gmail.com>
> wrote:
>
>> Hi, guys!
>>
>> Semyon, have you had a time to review IGNITE-4760
>> https://github.com/apache/ignite/pull/1768 ?
>>
>> Is this fix actual for hibernate5 module?
>>
>> Vadim Opolski
>>
>> 2017-04-11 13:40 GMT+03:00 Semyon Boikov <sb...@gridgain.com>:
>>
>>> Thanks Vadim, I'll try to do review today.
>>>
>>> Semyon
>>>
>>> On Mon, Apr 10, 2017 at 8:15 PM, Вадим Опольский <va...@gmail.com>
>>> wrote:
>>>
>>>> Hello guys!
>>>>
>>>> Semyon, review please again. Test check corresponding IgniteCaches
>>>> contain expected number of entries. Test fails for
>>>> HibernateNonStrictAccessStrategy.
>>>> And per-cache thread local in method threadLocalForCache fix this issue.
>>>>
>>>> https://github.com/apache/ignite/pull/1768/files
>>>>
>>>> Vadim Opolski
>>>>
>>>>
>>>> 2017-04-07 14:15 GMT+03:00 Semyon Boikov <sb...@gridgain.com>:
>>>>
>>>>> Hi Vadim,
>>>>>
>>>>> Test does not look correct to me. I think test need check that
>>>>> corresponding IgniteCaches contain expected number of entries like
>>>>> 'testCacheUsage' does.
>>>>>
>>>>> Thanks
>>>>>
>>>>> On Wed, Apr 5, 2017 at 3:26 PM, Вадим Опольский <va...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hello everybody!
>>>>>>
>>>>>> Added test. Test fails after session.update(e2forUpdate). This update
>>>>>> must put into ENTITY2_NAME region, but it puts into ENTITY1_NAME and
>>>>>> ENTITY2_NAME regions.
>>>>>>
>>>>>> https://github.com/vadopolski/ignite/pull/1
>>>>>>
>>>>>> Is it true?
>>>>>>
>>>>>> I have no idea how to change the method threadLocalForCache to
>>>>>> support NONSTRICT_READ_WRITE strategy. I tried to change it in accordance
>>>>>> with Cameroon Braid report.
>>>>>>
>>>>>> Vadim Opolski
>>>>>>
>>>>>>
>>>>>> ---------- Forwarded message ----------
>>>>>> From: Вадим Опольский <va...@gmail.com>
>>>>>> Date: 2017-04-03 17:39 GMT+03:00
>>>>>> Subject: Re: IGNITE - 4760 : working in hibernate module
>>>>>> To: dev@ignite.apache.org
>>>>>> Cc: Valentin Kulichenko <va...@gmail.com>, Semyon
>>>>>> Boikov <sb...@gridgain.com>
>>>>>>
>>>>>>
>>>>>> Hello everyone!
>>>>>>
>>>>>> I added some change to method threadLocalForCache  and added test
>>>>>> testEntityCacheNonStrictFails.
>>>>>>
>>>>>> How to reproduce situation when updates can be recorded to another
>>>>>> region?
>>>>>>
>>>>>> https://github.com/vadopolski/ignite/blob/5aa25f3830fef14ac5
>>>>>> 07ed73872d62b2969a7411/modules/hibernate/src/main/java/org/a
>>>>>> pache/ignite/cache/hibernate/HibernateRegionFactory.java
>>>>>>
>>>>>> https://github.com/vadopolski/ignite/blob/5aa25f3830fef14ac5
>>>>>> 07ed73872d62b2969a7411/modules/hibernate/src/test/java/org/a
>>>>>> pache/ignite/cache/hibernate/HibernateL2CacheConfigurationSe
>>>>>> lfTest.java
>>>>>>
>>>>>> PullRequest
>>>>>> https://github.com/vadopolski/ignite/pull/4/files
>>>>>>
>>>>>> Vadim
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2017-03-27 18:20 GMT+03:00 Denis Magda <dm...@apache.org>:
>>>>>>
>>>>>>> Vadim,
>>>>>>>
>>>>>>> What IDE do you use? My recommendation would be to set up everything
>>>>>>> let’s say under IntellijIDEA or Eclipse and after that trying to compile
>>>>>>> from a terminal.
>>>>>>>
>>>>>>> This is how you can easily prepare the dev env in IntellijIDEA:
>>>>>>> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup <
>>>>>>> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup>
>>>>>>>
>>>>>>> —
>>>>>>> Denis
>>>>>>>
>>>>>>> > On Mar 27, 2017, at 7:14 AM, Вадим Опольский <va...@gmail.com>
>>>>>>> wrote:
>>>>>>> >
>>>>>>> > Valentin, OK.
>>>>>>> >
>>>>>>> > To enabled it in my environment I done next:
>>>>>>> > - built project with command - mvn clean package -DskipTests
>>>>>>> -Prelease,lgpl
>>>>>>> > - added folder hibernate to modules in project structure
>>>>>>> > - added library to dependencies (without it import doesn't working)
>>>>>>> >
>>>>>>> > After that I have a lot of error, for instance:
>>>>>>> > - Class 'AccessStrategy' must either be declared abstract or
>>>>>>> implement abstract method 'remove(SharedSessionContractImplementor,
>>>>>>> Object) in 'RegionAccessStrategy'
>>>>>>> >
>>>>>>> > generateCacheKey
>>>>>>> > getCacheKeyId
>>>>>>> > getRegion
>>>>>>> > insert
>>>>>>> > afterInsert
>>>>>>> > update
>>>>>>> > afterUpdate
>>>>>>> > insert
>>>>>>> > afterInsert
>>>>>>> > update
>>>>>>> > get
>>>>>>> > putFromLoad
>>>>>>> > lockItem
>>>>>>> > unlockItem
>>>>>>> > remove
>>>>>>> >
>>>>>>> > Do anybody know the easier way to resolve this issue?
>>>>>>> >
>>>>>>> > Also tried to reimport all maven projects and cleansed repository
>>>>>>> in .m2.
>>>>>>> > Vadim Opolski
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> > 2017-03-25 2:42 GMT+03:00 Valentin Kulichenko <
>>>>>>> valentin.kulichenko@gmail.com <mailto:valentin.kulichenko@gmail.com
>>>>>>> >>:
>>>>>>> > Vadim,
>>>>>>> >
>>>>>>> > ignite-hibernate module is a part of 'lgpl' profile. Apparently
>>>>>>> it's not
>>>>>>> > enabled in your environment.
>>>>>>> >
>>>>>>> > -Val
>>>>>>> >
>>>>>>> > On Fri, Mar 24, 2017 at 4:38 PM, Вадим Опольский <
>>>>>>> vaopolskij@gmail.com <ma...@gmail.com>>
>>>>>>> > wrote:
>>>>>>> >
>>>>>>> > > Hello everybody,
>>>>>>> > >
>>>>>>> > > I want to resolve issue №4760
>>>>>>> > > https://issues.apache.org/jira/browse/IGNITE-4760 <
>>>>>>> https://issues.apache.org/jira/browse/IGNITE-4760>
>>>>>>> > >
>>>>>>> > > To find solution I'm going to change method threadLocalForCache
>>>>>>> and to add
>>>>>>> > > Junit test.
>>>>>>> > >
>>>>>>> > > Why folder hibernate is not a module ? Can I added it ?
>>>>>>> > >
>>>>>>> > > Vadim Opolski
>>>>>>> > >
>>>>>>> >
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: IGNITE - 4760 ready for review

Posted by Semyon Boikov <sb...@gridgain.com>.
Hi Vadim,

I added comments in JIRA. I'll apply the same fix for hibernate5 when fix
is finalized.

Thanks!

On Thu, Apr 13, 2017 at 12:10 PM, Вадим Опольский <va...@gmail.com>
wrote:

> Hi, guys!
>
> Semyon, have you had a time to review IGNITE-4760
> https://github.com/apache/ignite/pull/1768 ?
>
> Is this fix actual for hibernate5 module?
>
> Vadim Opolski
>
> 2017-04-11 13:40 GMT+03:00 Semyon Boikov <sb...@gridgain.com>:
>
>> Thanks Vadim, I'll try to do review today.
>>
>> Semyon
>>
>> On Mon, Apr 10, 2017 at 8:15 PM, Вадим Опольский <va...@gmail.com>
>> wrote:
>>
>>> Hello guys!
>>>
>>> Semyon, review please again. Test check corresponding IgniteCaches
>>> contain expected number of entries. Test fails for
>>> HibernateNonStrictAccessStrategy.
>>> And per-cache thread local in method threadLocalForCache fix this issue.
>>>
>>> https://github.com/apache/ignite/pull/1768/files
>>>
>>> Vadim Opolski
>>>
>>>
>>> 2017-04-07 14:15 GMT+03:00 Semyon Boikov <sb...@gridgain.com>:
>>>
>>>> Hi Vadim,
>>>>
>>>> Test does not look correct to me. I think test need check that
>>>> corresponding IgniteCaches contain expected number of entries like
>>>> 'testCacheUsage' does.
>>>>
>>>> Thanks
>>>>
>>>> On Wed, Apr 5, 2017 at 3:26 PM, Вадим Опольский <va...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hello everybody!
>>>>>
>>>>> Added test. Test fails after session.update(e2forUpdate). This update
>>>>> must put into ENTITY2_NAME region, but it puts into ENTITY1_NAME and
>>>>> ENTITY2_NAME regions.
>>>>>
>>>>> https://github.com/vadopolski/ignite/pull/1
>>>>>
>>>>> Is it true?
>>>>>
>>>>> I have no idea how to change the method threadLocalForCache to
>>>>> support NONSTRICT_READ_WRITE strategy. I tried to change it in accordance
>>>>> with Cameroon Braid report.
>>>>>
>>>>> Vadim Opolski
>>>>>
>>>>>
>>>>> ---------- Forwarded message ----------
>>>>> From: Вадим Опольский <va...@gmail.com>
>>>>> Date: 2017-04-03 17:39 GMT+03:00
>>>>> Subject: Re: IGNITE - 4760 : working in hibernate module
>>>>> To: dev@ignite.apache.org
>>>>> Cc: Valentin Kulichenko <va...@gmail.com>, Semyon
>>>>> Boikov <sb...@gridgain.com>
>>>>>
>>>>>
>>>>> Hello everyone!
>>>>>
>>>>> I added some change to method threadLocalForCache  and added test
>>>>> testEntityCacheNonStrictFails.
>>>>>
>>>>> How to reproduce situation when updates can be recorded to another
>>>>> region?
>>>>>
>>>>> https://github.com/vadopolski/ignite/blob/5aa25f3830fef14ac5
>>>>> 07ed73872d62b2969a7411/modules/hibernate/src/main/java/org/a
>>>>> pache/ignite/cache/hibernate/HibernateRegionFactory.java
>>>>>
>>>>> https://github.com/vadopolski/ignite/blob/5aa25f3830fef14ac5
>>>>> 07ed73872d62b2969a7411/modules/hibernate/src/test/java/org/a
>>>>> pache/ignite/cache/hibernate/HibernateL2CacheConfigurationSe
>>>>> lfTest.java
>>>>>
>>>>> PullRequest
>>>>> https://github.com/vadopolski/ignite/pull/4/files
>>>>>
>>>>> Vadim
>>>>>
>>>>>
>>>>>
>>>>> 2017-03-27 18:20 GMT+03:00 Denis Magda <dm...@apache.org>:
>>>>>
>>>>>> Vadim,
>>>>>>
>>>>>> What IDE do you use? My recommendation would be to set up everything
>>>>>> let’s say under IntellijIDEA or Eclipse and after that trying to compile
>>>>>> from a terminal.
>>>>>>
>>>>>> This is how you can easily prepare the dev env in IntellijIDEA:
>>>>>> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup <
>>>>>> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup>
>>>>>>
>>>>>> —
>>>>>> Denis
>>>>>>
>>>>>> > On Mar 27, 2017, at 7:14 AM, Вадим Опольский <va...@gmail.com>
>>>>>> wrote:
>>>>>> >
>>>>>> > Valentin, OK.
>>>>>> >
>>>>>> > To enabled it in my environment I done next:
>>>>>> > - built project with command - mvn clean package -DskipTests
>>>>>> -Prelease,lgpl
>>>>>> > - added folder hibernate to modules in project structure
>>>>>> > - added library to dependencies (without it import doesn't working)
>>>>>> >
>>>>>> > After that I have a lot of error, for instance:
>>>>>> > - Class 'AccessStrategy' must either be declared abstract or
>>>>>> implement abstract method 'remove(SharedSessionContractImplementor,
>>>>>> Object) in 'RegionAccessStrategy'
>>>>>> >
>>>>>> > generateCacheKey
>>>>>> > getCacheKeyId
>>>>>> > getRegion
>>>>>> > insert
>>>>>> > afterInsert
>>>>>> > update
>>>>>> > afterUpdate
>>>>>> > insert
>>>>>> > afterInsert
>>>>>> > update
>>>>>> > get
>>>>>> > putFromLoad
>>>>>> > lockItem
>>>>>> > unlockItem
>>>>>> > remove
>>>>>> >
>>>>>> > Do anybody know the easier way to resolve this issue?
>>>>>> >
>>>>>> > Also tried to reimport all maven projects and cleansed repository
>>>>>> in .m2.
>>>>>> > Vadim Opolski
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> > 2017-03-25 2:42 GMT+03:00 Valentin Kulichenko <
>>>>>> valentin.kulichenko@gmail.com <mailto:valentin.kulichenko@gmail.com
>>>>>> >>:
>>>>>> > Vadim,
>>>>>> >
>>>>>> > ignite-hibernate module is a part of 'lgpl' profile. Apparently
>>>>>> it's not
>>>>>> > enabled in your environment.
>>>>>> >
>>>>>> > -Val
>>>>>> >
>>>>>> > On Fri, Mar 24, 2017 at 4:38 PM, Вадим Опольский <
>>>>>> vaopolskij@gmail.com <ma...@gmail.com>>
>>>>>> > wrote:
>>>>>> >
>>>>>> > > Hello everybody,
>>>>>> > >
>>>>>> > > I want to resolve issue №4760
>>>>>> > > https://issues.apache.org/jira/browse/IGNITE-4760 <
>>>>>> https://issues.apache.org/jira/browse/IGNITE-4760>
>>>>>> > >
>>>>>> > > To find solution I'm going to change method threadLocalForCache
>>>>>> and to add
>>>>>> > > Junit test.
>>>>>> > >
>>>>>> > > Why folder hibernate is not a module ? Can I added it ?
>>>>>> > >
>>>>>> > > Vadim Opolski
>>>>>> > >
>>>>>> >
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

Re: IGNITE - 4760 ready for review

Posted by Вадим Опольский <va...@gmail.com>.
Hi, guys!

Semyon, have you had a time to review IGNITE-4760
https://github.com/apache/ignite/pull/1768 ?

Is this fix actual for hibernate5 module?

Vadim Opolski

2017-04-11 13:40 GMT+03:00 Semyon Boikov <sb...@gridgain.com>:

> Thanks Vadim, I'll try to do review today.
>
> Semyon
>
> On Mon, Apr 10, 2017 at 8:15 PM, Вадим Опольский <va...@gmail.com>
> wrote:
>
>> Hello guys!
>>
>> Semyon, review please again. Test check corresponding IgniteCaches
>> contain expected number of entries. Test fails for
>> HibernateNonStrictAccessStrategy.
>> And per-cache thread local in method threadLocalForCache fix this issue.
>>
>> https://github.com/apache/ignite/pull/1768/files
>>
>> Vadim Opolski
>>
>>
>> 2017-04-07 14:15 GMT+03:00 Semyon Boikov <sb...@gridgain.com>:
>>
>>> Hi Vadim,
>>>
>>> Test does not look correct to me. I think test need check that
>>> corresponding IgniteCaches contain expected number of entries like
>>> 'testCacheUsage' does.
>>>
>>> Thanks
>>>
>>> On Wed, Apr 5, 2017 at 3:26 PM, Вадим Опольский <va...@gmail.com>
>>> wrote:
>>>
>>>> Hello everybody!
>>>>
>>>> Added test. Test fails after session.update(e2forUpdate). This update
>>>> must put into ENTITY2_NAME region, but it puts into ENTITY1_NAME and
>>>> ENTITY2_NAME regions.
>>>>
>>>> https://github.com/vadopolski/ignite/pull/1
>>>>
>>>> Is it true?
>>>>
>>>> I have no idea how to change the method threadLocalForCache to support
>>>> NONSTRICT_READ_WRITE strategy. I tried to change it in accordance with
>>>> Cameroon Braid report.
>>>>
>>>> Vadim Opolski
>>>>
>>>>
>>>> ---------- Forwarded message ----------
>>>> From: Вадим Опольский <va...@gmail.com>
>>>> Date: 2017-04-03 17:39 GMT+03:00
>>>> Subject: Re: IGNITE - 4760 : working in hibernate module
>>>> To: dev@ignite.apache.org
>>>> Cc: Valentin Kulichenko <va...@gmail.com>, Semyon Boikov
>>>> <sb...@gridgain.com>
>>>>
>>>>
>>>> Hello everyone!
>>>>
>>>> I added some change to method threadLocalForCache  and added test
>>>> testEntityCacheNonStrictFails.
>>>>
>>>> How to reproduce situation when updates can be recorded to another
>>>> region?
>>>>
>>>> https://github.com/vadopolski/ignite/blob/5aa25f3830fef14ac5
>>>> 07ed73872d62b2969a7411/modules/hibernate/src/main/java/org/a
>>>> pache/ignite/cache/hibernate/HibernateRegionFactory.java
>>>>
>>>> https://github.com/vadopolski/ignite/blob/5aa25f3830fef14ac5
>>>> 07ed73872d62b2969a7411/modules/hibernate/src/test/java/org/a
>>>> pache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java
>>>>
>>>> PullRequest
>>>> https://github.com/vadopolski/ignite/pull/4/files
>>>>
>>>> Vadim
>>>>
>>>>
>>>>
>>>> 2017-03-27 18:20 GMT+03:00 Denis Magda <dm...@apache.org>:
>>>>
>>>>> Vadim,
>>>>>
>>>>> What IDE do you use? My recommendation would be to set up everything
>>>>> let’s say under IntellijIDEA or Eclipse and after that trying to compile
>>>>> from a terminal.
>>>>>
>>>>> This is how you can easily prepare the dev env in IntellijIDEA:
>>>>> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup <
>>>>> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup>
>>>>>
>>>>> —
>>>>> Denis
>>>>>
>>>>> > On Mar 27, 2017, at 7:14 AM, Вадим Опольский <va...@gmail.com>
>>>>> wrote:
>>>>> >
>>>>> > Valentin, OK.
>>>>> >
>>>>> > To enabled it in my environment I done next:
>>>>> > - built project with command - mvn clean package -DskipTests
>>>>> -Prelease,lgpl
>>>>> > - added folder hibernate to modules in project structure
>>>>> > - added library to dependencies (without it import doesn't working)
>>>>> >
>>>>> > After that I have a lot of error, for instance:
>>>>> > - Class 'AccessStrategy' must either be declared abstract or
>>>>> implement abstract method 'remove(SharedSessionContractImplementor,
>>>>> Object) in 'RegionAccessStrategy'
>>>>> >
>>>>> > generateCacheKey
>>>>> > getCacheKeyId
>>>>> > getRegion
>>>>> > insert
>>>>> > afterInsert
>>>>> > update
>>>>> > afterUpdate
>>>>> > insert
>>>>> > afterInsert
>>>>> > update
>>>>> > get
>>>>> > putFromLoad
>>>>> > lockItem
>>>>> > unlockItem
>>>>> > remove
>>>>> >
>>>>> > Do anybody know the easier way to resolve this issue?
>>>>> >
>>>>> > Also tried to reimport all maven projects and cleansed repository in
>>>>> .m2.
>>>>> > Vadim Opolski
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> > 2017-03-25 2:42 GMT+03:00 Valentin Kulichenko <
>>>>> valentin.kulichenko@gmail.com <ma...@gmail.com>>:
>>>>> > Vadim,
>>>>> >
>>>>> > ignite-hibernate module is a part of 'lgpl' profile. Apparently it's
>>>>> not
>>>>> > enabled in your environment.
>>>>> >
>>>>> > -Val
>>>>> >
>>>>> > On Fri, Mar 24, 2017 at 4:38 PM, Вадим Опольский <
>>>>> vaopolskij@gmail.com <ma...@gmail.com>>
>>>>> > wrote:
>>>>> >
>>>>> > > Hello everybody,
>>>>> > >
>>>>> > > I want to resolve issue №4760
>>>>> > > https://issues.apache.org/jira/browse/IGNITE-4760 <
>>>>> https://issues.apache.org/jira/browse/IGNITE-4760>
>>>>> > >
>>>>> > > To find solution I'm going to change method threadLocalForCache
>>>>> and to add
>>>>> > > Junit test.
>>>>> > >
>>>>> > > Why folder hibernate is not a module ? Can I added it ?
>>>>> > >
>>>>> > > Vadim Opolski
>>>>> > >
>>>>> >
>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>

Re: IGNITE - 4760 ready for review

Posted by Semyon Boikov <sb...@gridgain.com>.
Thanks Vadim, I'll try to do review today.

Semyon

On Mon, Apr 10, 2017 at 8:15 PM, Вадим Опольский <va...@gmail.com>
wrote:

> Hello guys!
>
> Semyon, review please again. Test check corresponding IgniteCaches contain
> expected number of entries. Test fails for HibernateNonStrictAccessStrategy.
>
> And per-cache thread local in method threadLocalForCache fix this issue.
>
> https://github.com/apache/ignite/pull/1768/files
>
> Vadim Opolski
>
>
> 2017-04-07 14:15 GMT+03:00 Semyon Boikov <sb...@gridgain.com>:
>
>> Hi Vadim,
>>
>> Test does not look correct to me. I think test need check that
>> corresponding IgniteCaches contain expected number of entries like
>> 'testCacheUsage' does.
>>
>> Thanks
>>
>> On Wed, Apr 5, 2017 at 3:26 PM, Вадим Опольский <va...@gmail.com>
>> wrote:
>>
>>> Hello everybody!
>>>
>>> Added test. Test fails after session.update(e2forUpdate). This update
>>> must put into ENTITY2_NAME region, but it puts into ENTITY1_NAME and
>>> ENTITY2_NAME regions.
>>>
>>> https://github.com/vadopolski/ignite/pull/1
>>>
>>> Is it true?
>>>
>>> I have no idea how to change the method threadLocalForCache to support
>>> NONSTRICT_READ_WRITE strategy. I tried to change it in accordance with
>>> Cameroon Braid report.
>>>
>>> Vadim Opolski
>>>
>>>
>>> ---------- Forwarded message ----------
>>> From: Вадим Опольский <va...@gmail.com>
>>> Date: 2017-04-03 17:39 GMT+03:00
>>> Subject: Re: IGNITE - 4760 : working in hibernate module
>>> To: dev@ignite.apache.org
>>> Cc: Valentin Kulichenko <va...@gmail.com>, Semyon Boikov <
>>> sboikov@gridgain.com>
>>>
>>>
>>> Hello everyone!
>>>
>>> I added some change to method threadLocalForCache  and added test
>>> testEntityCacheNonStrictFails.
>>>
>>> How to reproduce situation when updates can be recorded to another
>>> region?
>>>
>>> https://github.com/vadopolski/ignite/blob/5aa25f3830fef14ac5
>>> 07ed73872d62b2969a7411/modules/hibernate/src/main/java/org/a
>>> pache/ignite/cache/hibernate/HibernateRegionFactory.java
>>>
>>> https://github.com/vadopolski/ignite/blob/5aa25f3830fef14ac5
>>> 07ed73872d62b2969a7411/modules/hibernate/src/test/java/org/a
>>> pache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java
>>>
>>> PullRequest
>>> https://github.com/vadopolski/ignite/pull/4/files
>>>
>>> Vadim
>>>
>>>
>>>
>>> 2017-03-27 18:20 GMT+03:00 Denis Magda <dm...@apache.org>:
>>>
>>>> Vadim,
>>>>
>>>> What IDE do you use? My recommendation would be to set up everything
>>>> let’s say under IntellijIDEA or Eclipse and after that trying to compile
>>>> from a terminal.
>>>>
>>>> This is how you can easily prepare the dev env in IntellijIDEA:
>>>> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup <
>>>> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup>
>>>>
>>>> —
>>>> Denis
>>>>
>>>> > On Mar 27, 2017, at 7:14 AM, Вадим Опольский <va...@gmail.com>
>>>> wrote:
>>>> >
>>>> > Valentin, OK.
>>>> >
>>>> > To enabled it in my environment I done next:
>>>> > - built project with command - mvn clean package -DskipTests
>>>> -Prelease,lgpl
>>>> > - added folder hibernate to modules in project structure
>>>> > - added library to dependencies (without it import doesn't working)
>>>> >
>>>> > After that I have a lot of error, for instance:
>>>> > - Class 'AccessStrategy' must either be declared abstract or
>>>> implement abstract method 'remove(SharedSessionContractImplementor,
>>>> Object) in 'RegionAccessStrategy'
>>>> >
>>>> > generateCacheKey
>>>> > getCacheKeyId
>>>> > getRegion
>>>> > insert
>>>> > afterInsert
>>>> > update
>>>> > afterUpdate
>>>> > insert
>>>> > afterInsert
>>>> > update
>>>> > get
>>>> > putFromLoad
>>>> > lockItem
>>>> > unlockItem
>>>> > remove
>>>> >
>>>> > Do anybody know the easier way to resolve this issue?
>>>> >
>>>> > Also tried to reimport all maven projects and cleansed repository in
>>>> .m2.
>>>> > Vadim Opolski
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > 2017-03-25 2:42 GMT+03:00 Valentin Kulichenko <
>>>> valentin.kulichenko@gmail.com <ma...@gmail.com>>:
>>>> > Vadim,
>>>> >
>>>> > ignite-hibernate module is a part of 'lgpl' profile. Apparently it's
>>>> not
>>>> > enabled in your environment.
>>>> >
>>>> > -Val
>>>> >
>>>> > On Fri, Mar 24, 2017 at 4:38 PM, Вадим Опольский <
>>>> vaopolskij@gmail.com <ma...@gmail.com>>
>>>> > wrote:
>>>> >
>>>> > > Hello everybody,
>>>> > >
>>>> > > I want to resolve issue №4760
>>>> > > https://issues.apache.org/jira/browse/IGNITE-4760 <
>>>> https://issues.apache.org/jira/browse/IGNITE-4760>
>>>> > >
>>>> > > To find solution I'm going to change method threadLocalForCache and
>>>> to add
>>>> > > Junit test.
>>>> > >
>>>> > > Why folder hibernate is not a module ? Can I added it ?
>>>> > >
>>>> > > Vadim Opolski
>>>> > >
>>>> >
>>>>
>>>>
>>>
>>>
>>
>