geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Smith (JIRA)" <>
Subject [jira] [Created] (GEODE-1830) Client CacheListener receives a TOMBSTONE when user calls region.get
Date Mon, 29 Aug 2016 22:19:20 GMT
Dan Smith created GEODE-1830:

             Summary: Client CacheListener receives a TOMBSTONE when user calls region.get
                 Key: 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
 * 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:
  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

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

View raw message