You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Darrel Schneider (JIRA)" <ji...@apache.org> on 2018/04/17 18:57:00 UTC
[jira] [Comment Edited] (GEODE-4957) The key used in a putIfAbsent
call that returns null may not be the one in the RegionEntry
[ https://issues.apache.org/jira/browse/GEODE-4957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16441339#comment-16441339 ]
Darrel Schneider edited comment on GEODE-4957 at 4/17/18 6:56 PM:
------------------------------------------------------------------
The fix caused a problem with persistence so that fix will be reverted and this issue reopened.
was (Author: dschneider):
The fix caused a problem with persistence
> The key used in a putIfAbsent call that returns null may not be the one in the RegionEntry
> ------------------------------------------------------------------------------------------
>
> Key: GEODE-4957
> URL: https://issues.apache.org/jira/browse/GEODE-4957
> Project: Geode
> Issue Type: Bug
> Components: regions
> Reporter: Barry Oglesby
> Assignee: Darrel Schneider
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.6.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> With simultaneous putIfAbsent calls, sometimes the thread that returns null is not the thread that actually creates the RegionEntry.
> Below is some logging that shows this behavior.
> Thread-77 returns null from the putIfAbsent call (which means there was no previous value). 1 ms before Thread-77's putEntryIfAbsent call, Thread-9 creates the RegionEntry. You can see that because not only is oldRe=null for Thread-9, but also the event's key (eventKey) and entry's key (reKey) are identical. But Thread-9 returns a non-null old value.
> {noformat}
> Thread-77 at 1522187267493: AbstractRegionMap.putEntryIfAbsent regionEntry=VersionedStatsDiskLRURegionEntryHeapObjectKey@6a8119a0 (key=ComplexKey[identity=1682369152; key=key]; rawValue=REMOVED_PHASE1; version=\{v0; rv0; ds=0; time=0};member=null); oldRe=VersionedStatsDiskLRURegionEntryHeapObjectKey@1aac7604 (key=ComplexKey[identity=342592289; key=key]; rawValue=REMOVED_PHASE1; version=\{v0; rv0; ds=0; time=0};member=null)
> Thread-77 at 1522187267493: AbstractRegionMap.basicPut eventKey=ComplexKey[identity=1682369152; key=key]; reKey=ComplexKey[identity=342592289; key=key]
> Thread-77 at 1522187267500: LocalRegion.putIfAbsent returning null
> {noformat}
> {noformat}
> Thread-9 at 1522187267492: AbstractRegionMap.putEntryIfAbsent regionEntry=VersionedStatsDiskLRURegionEntryHeapObjectKey@1aac7604 (key=ComplexKey[identity=342592289; key=key]; rawValue=REMOVED_PHASE1; version=\{v0; rv0; ds=0; time=0};member=null); oldRe=null
> Thread-9 at 1522187267495: AbstractRegionMap.basicPut eventKey=ComplexKey[identity=342592289; key=key]; reKey=ComplexKey[identity=342592289; key=key]
> Thread-9 at 1522187267504: LocalRegion.putIfAbsent returning v1
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)