You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vadim Opolski (JIRA)" <ji...@apache.org> on 2017/04/10 17:16:41 UTC

[jira] [Commented] (IGNITE-4760) Hibernate L2 cache stores value in wrong cache

    [ https://issues.apache.org/jira/browse/IGNITE-4760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15963212#comment-15963212 ] 

Vadim Opolski commented on IGNITE-4760:
---------------------------------------

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

> Hibernate L2 cache stores value in wrong cache
> ----------------------------------------------
>
>                 Key: IGNITE-4760
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4760
>             Project: Ignite
>          Issue Type: Sub-task
>          Components: Hibernate L2 cache
>            Reporter: Semen Boikov
>            Assignee: Vadim Opolski
>             Fix For: 2.1
>
>
> Issue is reported here:
> http://apache-ignite-developers.2346864.n4.nabble.com/issue-with-Hibernate-2L-cache-region-factory-ignite-1-8-td14912.html
> First it is necessary add JUnit test reproducing issue (see existing tests in IgniteHibernateTestSuite).
> Currently Hibernate access strategies track updates using thread locals, and it looks like updates for different caches can be mixed. I think per-cache thread local can fix issue for HibernateNonStrictAccessStrategy, but per-cache thread local can not be used for HibernateReadWriteAccessStrategy, since it is assumed that all updates should be part of the same cross-cache ignite transaction.
> So possible fix:
> - use per-cache thread local for HibernateNonStrictAccessStrategy (or somehow track target cache in HibernateNonStrictAccessStrategy)
> - use single thread local for HibernateReadWriteAccessStrategy



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)