Tell a lie… it’s now sensitive to the iteration order of the entityBindingMap (a HashMap)
in MetadataImpl. Regardless, modifying that test to give each entity it’s own region
causes the non-strict entities to start failing.
On May 26, 2016, at 2:58 PM, Chris Dennis
<chris.w.dennis(a)gmail.com> wrote:
Hi All,
Quick followup, attached is a test that illustrates how entities can end up using the
wrong access modes when they share a region but request different modes. As it happens I
think this test is failing because HHH-10649 was never fixed for nonstrict-read-write.
This test is derived from the RefreshUpdatedDateTest, and the only reason this test passes
for the non-strict elements is because the read-write elements are in the annotated class
array first, and so everyone ends up using the read-write access strategy.
<SharedCacheRegionAccessStrategyTest.java>
> On May 24, 2016, at 2:19 PM, Chris Dennis <chris.w.dennis(a)gmail.com> wrote:
>
> Hi All,
>
> I filed
https://hibernate.atlassian.net/browse/HHH-10707 toward the end of last
month, and was wondering what the best way was to go about getting this moved forward. My
analysis indicates that for users configured such that they trip this bug (those sharing a
single cache region across caches with different access strategies) they can be silently
seeing looser caching semantics than they would expect to be - obviously a far from ideal
situation. I have the beginnings of a fix coded up
(
https://github.com/chrisdennis/hibernate-orm/commits/HHH-10707) but it needs both polish
and more testing, and has some slightly undesirable side affects. My current fix also has
interesting interactions with the Infinispan testing, so a fix may require a fair amount
of modification of at a minimum the Infinispan test code, and potentially the Infinispan
provider itself?
>
> Thanks,
>
> Chris Dennis