In nonstrict mode, putFromLoad after evict can behave incorrectly

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.

Environment

None

Status

Assignee

Radim Vansa

Reporter

Radim Vansa

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Major