Branch: refs/heads/5.6
Home:
https://github.com/hibernate/hibernate-orm
Commit: fc957ec91e17197b9ef6fbef514f16c38b334de6
https://github.com/hibernate/hibernate-orm/commit/fc957ec91e17197b9ef6fbe...
Author: Ivaylo Mitrev <ivaylo.mitrev(a)documaster.com>
Date: 2021-12-09 (Thu, 09 Dec 2021)
Changed paths:
M hibernate-core/src/main/java/org/hibernate/metamodel/internal/MetamodelImpl.java
M hibernate-core/src/test/java/org/hibernate/test/hql/QuerySplitterTest.java
Log Message:
-----------
HHH-14948 - Reduce the size of the imports cache in the metamodel
We have agreed to mitigate a memory issue by introducing a hard-coded
(for the time being) cap on the imports cache in MetamodelImpl. This
would preserve the previously available performance improvement for
the majority of applications using Hibernate (which are expected to have
less than 1000 imports) while mitigating an unbounded memory consumption
issue for applications that exceed this limit when dynamically
generating queries with random entity aliases.
The commit also adds a not-so-beautiful test, which, however, is
beneficial considering the consequences of introduing a regression.