Bug 1196258

Summary: Local Transactional Cache loses data when eviction is enabled and there are multiple readers and one writer
Product: [JBoss] JBoss Data Grid 6 Reporter: Tristan Tarrant <ttarrant>
Component: InfinispanAssignee: William Burns <wburns>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Gencur <mgencur>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4.0CC: dstahl, jdg-bugs, jolee, vjuranek
Target Milestone: ER1   
Target Release: 6.4.1   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1202354 (view as bug list) Environment:
Last Closed: 2015-04-02 12:13:44 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:
Bug Depends On:    
Bug Blocks: 1202354    

Description Tristan Tarrant 2015-02-25 15:30:06 UTC
Using Infinispan 6.0.2 and a local, transactional cache backed by a <singleFile> store, with eviction enabled and a small max-entries setting, we have the following scenario:

    the main thread (i.e. the "writer") starts a transaction, adds a batch of strings into the cache and also appends the same strings into a List cache entry and then commits the transaction
    after the above has finished (i.e. after tx.commit) it fires a number of reader threads where each reader thread
        checks that the string entries were added into the cache and
        checks that the entries were correctly appended to the List entry
    the above steps are repeated a number of times

On any given run, based on timing, we're seeing that at some point (after some time) some of the reader threads will not see the latest version of the List entry (i.e. will not see the latest elements that were added into the list) but rather an old, stale List (sort of a "lost update" scenario).

If we either:

    disable eviction or
    set the max-entries to a large enough value (which I suspect has the same effect - not evicting anything) the problem doesn't show up.

Comment 2 William Burns 2015-03-11 14:00:10 UTC
PR: https://github.com/infinispan/jdg/pull/552

Comment 3 JBoss JIRA Server 2015-03-16 13:57:28 UTC
Dan Berindei <dberinde@redhat.com> updated the status of jira ISPN-4810 to Resolved