Dan Smith created GEODE-1830:
--------------------------------
Summary: 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
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)