Bug 1122269

Summary: Replace fails with cache loader
Product: [JBoss] JBoss Data Grid 6 Reporter: dereed
Component: InfinispanAssignee: Pedro Ruivo <pruivo>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Gencur <mgencur>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: afield, gsheldon, jawilson, jdg-bugs, mhusnain, ttarrant
Target Milestone: ER1   
Target Release: 6.3.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously in Red Hat JBoss Data Grid, the cache.replace(key, oldValue, newValue) operation was comparing the requested new value with previous value, and if they differed it turned into a no-operation. However, CacheLoaderInterceptor did not load entries for a ReplaceCommand. If the entry only existed in the loader and not in memory, this caused the replace operation to fail. This issue is now fixed in JBoss Data Grid 6.3.1 and the replace operation works correctly even if the old value is only in the cache store and not in memory.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-26 14:03:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1122270    

Description dereed 2014-07-22 20:09:45 UTC
cache.replace(key, oldValue, newValue) compares the current value in the cache to oldValue, and if they differ it turns into a no-op.

However, CacheLoaderInterceptor does not load entries for a ReplaceCommand.
If the entry only exists in the loader and not in memory, this causes the replace to fail.

CacheLoaderInterceptor must always load the value for a ReplaceCommand.

Comment 3 JBoss JIRA Server 2014-08-01 13:59:06 UTC
Pedro Ruivo <pruivo> updated the status of jira ISPN-4559 to Coding In Progress

Comment 4 Alan Field 2014-08-26 09:00:48 UTC
Verified that all of the tests added  with this fix pass with JDG 6.3.1 ER1