-
Bug
-
Resolution: Done
-
Major
-
7.2.0.GA, 7.3.10.GA, 7.4.13.GA
-
False
-
None
-
False
-
User Experience
-
-
-
-
-
-
+
-
-
Customer is reporting reduced performance due to HHH-13179.
After updating an application that still uses XML mapping definition from 5.2 to 5.4 some requests suddenly started to take 10 times or even more time.
If figured out that the 2nd level caching was no longer working for some classes. Those classes are using the unionsubclass mapping. Even multiple simple session.get(unionsubclass, id) (in multiple sessions) don't fetch the entity from the 2nd level cache anymore but always hit the database. But where it hurts most is if these entities are reference from a cached collection. In this case the performance is much worse than without any caching at all as each cache miss (which is everytime now) hits the database for each entity with the ID instead of selecting them all with a single select using the foreign key.
After switching back to 5.2.17 the caching worked again as expected. I know that there were some changes regardging enabling caching on different levels in class hierarchies. But I didn't find anythign that says that the existing definitions must be changed and you cannot define any caching on the unionsubclass level anyway so I suppose this is a bug. When using annotations and MappedSuperclass it works as expected.
The attached test case inserts 2 entities, one using HBM and unionsubclass and the other annotations and mappedsuperclass. Then it fetches them using session.get() in 3 separate sessions.
- is incorporated by
-
JBEAP-26164 [GSS](7.4.z) Update Hibernate from 5.3.32.Final-redhat-00001 to 5.3.33.Final-redhat-00001
- Closed
- incorporates
-
HHH-13179 Loading...