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

In nonstrict mode, putFromLoad after evict can behave incorrectly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2.9, 5.1.9
    • Component/s: hibernate-infinispan
    • Labels:
      None
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true

      Description

      The handling for putFromLoads (coming without transaction start timestamp) was incorrect. This manifested as storing the value with expirable metadata as the code was assuming that it stores only an empty VersionedEntry. The putFromLoads were then expired from the cache too soon, causing less cache hits => inferior performance.

      However, there was more severe problem related to this: Since the putFromLoad record did not have any timestamp associated, after arriving to a cache containing evicted record (empty VersionedEntry, without version), the putFromLoad was applied. With asynchronous putFromLoads, the value could be already stale and without checking timestamp that could result in storing such stale value. This is not that bad in nonstrict mode caches, since stale entries are acceptable (the value was stored as mortal - expired after 1 minute by default), but given that it does not provide much performance benefit, it's not acceptable behaviour.

        Attachments

          Issue links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: