Bug 1045579 - Null value read with RR can be replaced by cache loader value
Summary: Null value read with RR can be replaced by cache loader value
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR1
: 6.2.0
Assignee: Tristan Tarrant
QA Contact: Martin Gencur
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-20 18:47 UTC by William Burns
Modified: 2022-03-03 09:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ISPN-3829 0 Major Resolved Null value read with RR can be replaced by cache loader value 2014-03-31 19:21:16 UTC

Description William Burns 2013-12-20 18:47:42 UTC
Currently the CacheLoaderInterceptor does the following check to determine if it should check the loader for a value

if (e == null || e.isNull() || e.getValue() == null) {

Unfortunately this means it checks the loader when a null value is in the entry when using RR. This can cause an issue if another transaction commits that key and puts a value that results in that value being inserted into the loader.

This also is a performance issue for RR, since it has to check the loader over and over for a given key even if it was found null the first time.

Initial thought is to do something like setSkipRemoteGet and that could actually be used for a dual purpose possibly.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Start a new transaction with Repeatable Read
2. Invoke get on the cache which returns null
3. Cache Loader updates the given key behind the scenes
4. Invoke get on the cache

Actual results:

The cache returns the new value that was inserted into cache loader (violates Repeatable Read).

Expected results:

The get should return null while in the same transaction


Additional info:


Note You need to log in before you can comment on or make changes to this bug.