Uploaded image for project: 'Hibernate ORM'
  1. HHH-9170

StatelessSession is accidentally 2LC enabled in some cases

    Details

    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true
    • Sprint:

      Description

      It appears that HHH-3482 Closed 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 Closed , 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.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                brmeyer Brett Meyer
                Reporter:
                brmeyer Brett Meyer
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: