[hibernate-dev] HHH-10418 and Infinispan

Steve Ebersole steve at hibernate.org
Fri Nov 17 08:38:03 EST 2017


I have clarified on HHH-10418, but I'll repeat the back-port portion: imo
it is a bad idea to back-port this.

In general I'd say that HHH-10418 should be closed as out-of-date as of 5.2

On Fri, Nov 17, 2017 at 12:29 AM Gail Badner <gbadner at redhat.com> wrote:

> I see that HHH-11356 is scheduled for 6.0.0.Beta1. Any chance it could be
> fixed in 5.3?
>
> On Thu, Nov 16, 2017 at 10:23 PM, Gail Badner <gbadner at redhat.com> wrote:
>
>> Oh, OK. There's a comment that made it sound like HHH-10418 was fixed in
>> master. [1]
>>
>> Maybe it's just the CCE that got fixed. I'll add a comment to HHH-10418
>> to clarify that entities and collections still cannot be stored in the same
>> region in 5.2.
>>
>> [1]
>> https://hibernate.atlassian.net/browse/HHH-10418?focusedCommentId=83441&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-83441
>>
>> On Thu, Nov 16, 2017 at 6:28 PM, Steve Ebersole <steve at hibernate.org>
>> wrote:
>>
>>> No that is currently broken.  See
>>> https://hibernate.atlassian.net/browse/HHH-11356
>>>
>>> This won't be fixed in 5.x as fixing it required significant changes to
>>> the caching SPIs to resolve.
>>>
>>> On Thu, Nov 16, 2017 at 8:10 PM Gail Badner <gbadner at redhat.com> wrote:
>>>
>>>> Steve/Radim,
>>>>
>>>> Is it OK if an entity and collection region have the same name, they
>>>> will use the same AdvancedCache? I realize that the key will be
>>>> different (as long as hibernate.cache.keys_factory != simple).
>>>>
>>>> I'm assuming they use the same access strategies, etc. I know there
>>>> would be problems if they didn't (HHH-10707/HHH-11356).
>>>>
>>>> I've been looking at how things are implemented in 5.2 to avoid the
>>>> ClassCacheException when an entity region and collection region has the
>>>> same name.
>>>>
>>>> I see that org.hibernate.internal.CacheImpl has a separate map for
>>>> each type of cache (i.e., entity, collection, natural-id). [1]
>>>>
>>>> I also see that org.hibernate.cache.infinispan.InfinispanRegionFactory#
>>>> buildEntityRegion and #buildCollectionRegion both call #getCache. [2]
>>>>
>>>> #getCache checks to see if there is already a cache with the specified
>>>> regionName, but does not take the type (i.e., entity, collection,
>>>> natural-id) into account. If there is already a cache with that region
>>>> name, it will be used.
>>>>
>>>> In other words, it seems that if an entity and collection region have
>>>> the same name, they will use the same AdvancedCache.
>>>>
>>>> I just want to confirm that this is intended and there is no problem
>>>> with having different types of data in the same AdvancedCache.
>>>>
>>>> Thanks,
>>>> Gail
>>>>
>>>> [1]
>>>> https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/internal/CacheImpl.java#L59-L61
>>>> [2]
>>>> https://github.com/hibernate/hibernate-orm/blob/master/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/InfinispanRegionFactory.java#L680-L729
>>>>
>>>
>>
>


More information about the hibernate-dev mailing list