You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Swapnil Bawaskar (JIRA)" <ji...@apache.org> on 2016/10/25 07:17:00 UTC

[jira] [Closed] (GEODE-1830) Client CacheListener receives a TOMBSTONE when user calls region.get

     [ https://issues.apache.org/jira/browse/GEODE-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Swapnil Bawaskar closed GEODE-1830.
-----------------------------------

> Client CacheListener receives a TOMBSTONE when user calls region.get
> --------------------------------------------------------------------
>
>                 Key: GEODE-1830
>                 URL: https://issues.apache.org/jira/browse/GEODE-1830
>             Project: Geode
>          Issue Type: Bug
>          Components: client/server
>            Reporter: Dan Smith
>            Assignee: Dan Smith
>             Fix For: 1.0.0-incubating
>
>
> A user's CacheListener on the client can see a TOMBSTONE as the newValue in this specific configuration:
>  * The region is created using  ClientRegionShortcut.PROXY (not CACHING_PROXY)
>  * The value on the server is a TOMBSTONE (the entry has been created and then destroyed)
>  * The user does a key for the destroyed key.
> Looking at the code, the problem seems to be in LocalRegion.basicPutPart2. The code checks to see if entry.isTomstone is true:
> {code}
>   protected long basicPutPart2(EntryEventImpl event, RegionEntry entry,
>       boolean isInitialized, long lastModified,
>       boolean clearConflict)
>   {
>     final boolean isNewKey = event.getOperation().isCreate();
>     final boolean invokeCallbacks = !entry.isTombstone(); // put() is creating a tombstone
> {code}
> Unfortunately, if the client is using ClientRegionShortcut.PROXY, the code calling this is ProxyRegionMap.basicPut, which passes a *static* markerEntry object, which will always return false for isTombstone. So the listener is invoked, despite the check for entry.isTombstone.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)