StatelessSession is accidentally 2LC enabled in some cases

Description

It appears that inadvertently caused StatelessSessions to be 2LC enabled, which they shouldn't be. This causes a decent performance hit. Most uses of 2LC first check Session#getCacheMode, as they should. Others seem to rely solely on the Persister having 2LC enabled.

When 2LC is used, Session#getTimestamp is always called. That call appears to always be surrounded by try/finally. Before HHH-3482, StatelessSession would throw an exception for that method, essentially disabling 2LC use.

Audit all uses of #getTimestamp and ensure that StatelessSessions are blocked from using 2LC by other means.

Activity

Show:

Brett Meyer May 7, 2014 at 2:05 PM

CacheHelper appears to be the culprit, introduced in

Fixed

Details

Assignee

Reporter

Fix versions

Priority

Created May 7, 2014 at 1:56 PM
Updated May 5, 2022 at 10:33 AM
Resolved May 5, 2022 at 10:33 AM