Performance regression in org.hibernate.stat.internal.StatisticsImpl

Description

Today's performance tests found contention for java.util.concurrent.ConcurrentHashMap.computeIfAbsent from org.hibernate.stat.internal.StatisticsImpl.getDomainDataRegionStatistics and org.hibernate.stat.internal.StatisticsImpl.getEntityStatistics totaling 6 hours in a 16m performance test.

I do not see the same contention in older 5.3 versions. We see contention when statistics-enabled=true or false and when we turn off our management interface polling.

Stack trace from JFR:

Stack Trace Count Duration

Environment

None

Status

Assignee

Sanne Grinovero

Reporter

Sanne Grinovero

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

Approved

Components

Affects versions

5.4.4
5.3.10

Priority

Major
Configure