Dave Myron ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5d8e891... ) *created* an issue
Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYmNhOWUyMTZk... ) / Bug ( https://hibernate.atlassian.net/browse/HHH-15500?atlOrigin=eyJpIjoiYmNhOW... ) HHH-15500 ( https://hibernate.atlassian.net/browse/HHH-15500?atlOrigin=eyJpIjoiYmNhOW... ) Cache key is huge since migration to 6 ( https://hibernate.atlassian.net/browse/HHH-15500?atlOrigin=eyJpIjoiYmNhOW... )
Issue Type: Bug Affects Versions: 6.1.2 Assignee: Unassigned Components: hibernate-core Created: 12/Sep/2022 07:49 AM Environment: Java 11, Ubuntu 20, Hibernate 6.1.2 Labels: cache Priority: Critical Reporter: Dave Myron ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5d8e891... )
Since migrating to v6 the memory used in L2 cache has exploded. Investigations reveal that cache keys/fields in Redis (via Redisson) have ballooned considerably. A brief chat in Zulip lead to the recommendation to file this issue as it seems a possible side effect of changes to caching that came with 6.0.
We’re seeing keys with lengths of 2k-3k characters. We’re currently using SnappyCodecV2 but also verified with MarshallingCodec, SerializationCodec and JsonJacksonCodec.
An example of a key:
\xe9\x0cl\x04\x04\t>3org.hibernate.cache.int\x01\x10\bl.C\x01\x0fxKeyImplementation\xe0\x02\xdb\xd8ej\x84\xdf\x00\x00\x00\x05>\x17\x053\xf0JKeyValueDescriptor\x16\x00>\x10entityOrRoleName\x16\x00>\bhashCode#\x00>\x02id\x16\x00>\btenantId\x16\x00\x16\x04\t>.6\x91\x00\btyp\x1d\x904NamedBasicType\x01\x968?\xc6\xdf~\xeefk&\x00\x00\x00\x01>\x04n\x05e\b\t>)nE\x002@\x00\x1c\xe7.\xd5\x83&\xf1LA\x01(a)\x189\xfe\x16\x00\t>8J<\x00hAbstractSingleColumnStandar\x19\x8f8\xb0\xc2H\xa6T\xfb+\xaf\x00\x00\x00\x00\t>,nG\x00>;\x00D{\xf3\x8f\x0c\xd2\xa8\x18\xf6\x00\x00\x00\x06>\bjava\x01\xe0X\x16\x00>\x14jdbcLiteralFormatte![\x00\b\x01\x18\r$\x00\x0f\x01\x0c%~\x0cBind\x05\x1f\x00\x12\x15\x13\x04Ex\x05\xb9%\x90\x0c\bsql\x014\x04s\x16%j\x002J\xa2\x00\x00d5\xc0\x00.\x01\x86 .IntegerJ\r\x92\x1cBd\xac\xfb\x1f\xec\x7f\xf4\t\xe3N*\x01>A\x001:\x10Class\x11GPd\x1e\xe1\xc9\xda\xe5\xe1\x89\x00\x00\x00\x03>\ncompara\t\xa4H\x0emutabilityPlan\x16\x00>\x04A\x03\t\xb2:q\x00U\xa7\x10util.\tG\be.C\tO\x00b!\xa8\x11Y\x1c\x14jy\xe5\xc8\xd7E\xec\x01\xb8\x10\x16\x04\t>:\x8e\xfb\x00\x00m\x05\x8b\bleM2\x92\x00\x1c_\x18\xcdRI7g\xaa\x05K\x10,\x04\t>KzL\x00\bdbc\x19\xaa\x04JdF\xcf\x01LNumericData/L\xb5\xe4:\xc7\xe1\x12\x00A\xce\x18\x0eunwrap15A\x9c\x00@\x8al\x00\bspiI\xe3Nl\x00\x1c\x0c=\xe1\xf1\x80V\xac\xd3\x01\xbe\b\t>C\x9aO\x00\x00AM\xffNR\x00\x1c\xc6\x13\x85\xcd\xca\x97\x89\xdb\x01\xb3$9\xeb\x16\x00\x169\xf6,\x04\t\x82]\x02!\x16Q]\x04dbE\xcb\x1c\xcd\xf9\xe77V\x90Fk\x01\x9c!\xa5\x004\x8a\x9e\x00:C\x00t$1g)b\xe8\xf0\xd4\x90\x0e\x00\x00\x00\x02>\x06this$0\x16\x00>\x0cval$A\xd2a\x00!J\x00.\x8a]\x00\x85)iT\x1cj4T\xd6\xfe\x0b\xf3z\x01W\x149\xe4\x16\x009\xe6\x01\xea \xef9\xfa9\xfa9\xef\x04\t\xd2\xac\x00 2\x8b\xfb\x8b\xc1\xbe\x18\x12/\x05U\x10\xfb\x16\x009\xfc\x01\x9a\x001\x9e\x9a\x00u\xdb\x1c\xed\xa8\xad\xa7\xf4\xd28\"\x05H\x10\xe1\x16\x009\xe3\x01\x9d@\xec9\xf79\xf79\xecB\x01#\x00\x00\x00\x04> b\xb17\b(a)4(!\n\x10.lang1A\x10,4)>\aaPxger>Fcom.truenorthservice.nydus\xdd+\xa5\xdd\x18ies.Sub\xa1\xf5hberAttributeScope\x00\n\xab\xc1K\x00\x00X\x1f\x01
( https://hibernate.atlassian.net/browse/HHH-15500#add-comment?atlOrigin=ey... ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-15500#add-comment?atlOrigin=ey... )
Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.... ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailN... ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100206- sha1:8e0b99e )