You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by zh...@apache.org on 2018/01/23 01:58:20 UTC

[geode] branch feature/GEODE-3967 updated (ece79d0 -> 7b4442f)

This is an automated email from the ASF dual-hosted git repository.

zhouxj pushed a change to branch feature/GEODE-3967
in repository https://gitbox.apache.org/repos/asf/geode.git.


    omit ece79d0  GEODE-3967: when ConcurrentCacheModificationException happened. GatewaySenderEventImpl should save the status and notify gatewaysender anyway. SerialGatewaySender will handle it. In AbstractUpdateOperation's doPutOrCreate's 3 tries of basicUpdate, the 3rd one should allow both create and update.
     add c1cf5d1  GEODE-4031: Update javadocs to include .gfd snapshot extension requirement (#1311)
     add b690cfa  GEODE-4015: Rewrite queue conflation tests (#1312)
     add 8d02247  GEODE-4332: Gfsh start locator should not retrieve cluster status when --connect=false (#1315)
     add 4f0c0b1  GEODE-4333: add unit tests for AbstractRegionMap.destroy (#1314)
     add 7fc5d6e  GEODE-3554: Add javadoc warning about getAnyInstance in CacheCallback
     add ec53f62  GEODE-3554: Add additional javadoc about how to get Cache.
     add 051349b  GEODE-4138: Move http related test to geode-web (#1320)
     add 4d82995  GEODE-4136: Move http related test to geode-web (#1319)
     add ea77216  GEODE-4306: Added concurrent checks enabled test to event time
     add aabad5f  GEODE-4315 Convert JSONWrapper to an interface
     new 7b4442f  GEODE-3967: when ConcurrentCacheModificationException happened. GatewaySenderEventImpl should save the status and notify gatewaysender anyway. SerialGatewaySender will handle it. In AbstractUpdateOperation's doPutOrCreate's 3 tries of basicUpdate, the 3rd one should allow both create and update.

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (ece79d0)
            \
             N -- N -- N   refs/heads/feature/GEODE-3967 (7b4442f)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ...tsTest.java => StartLocatorAcceptanceTest.java} |  30 +-
 .../java/org/apache/geode/cache/CacheFactory.java  |   8 +
 .../java/org/apache/geode/cache/CacheListener.java |   7 +-
 .../java/org/apache/geode/cache/CacheLoader.java   |   5 +-
 .../java/org/apache/geode/cache/CacheWriter.java   |   4 +
 .../apache/geode/cache/TransactionListener.java    |   4 +-
 .../org/apache/geode/cache/TransactionWriter.java  |   5 +
 .../geode/cache/snapshot/CacheSnapshotService.java |  25 +-
 .../geode/internal/cache/AbstractRegionMap.java    |   3 +-
 .../geode/internal/cache/EntryEventImpl.java       |   2 +-
 .../geode/internal/cache/VMLRURegionMap.java       |   8 +-
 .../geode/internal/cache/ha/HARegionQueue.java     |  85 ++-
 .../internal/cli/commands/StartLocatorCommand.java |  10 +-
 .../internal/cache/AbstractRegionMapTest.java      | 720 +++++++++++++++++++--
 .../geode/internal/cache/EntryEventImplTest.java   |  65 ++
 .../geode/internal/cache/ha/HARegionQueueTest.java | 128 ++++
 .../cache/tier/sockets/ConflationDUnitTest.java    |  60 --
 .../internal/cli/commands/QueryCommandTest.java    |  23 +-
 .../cli/commands/ShutdownCommandDUnitTest.java     |  24 +-
 .../geode/experimental/driver/JSONWrapper.java     |  59 +-
 .../geode/experimental/driver/ValueEncoder.java    |   2 +-
 ...HttpTest.java => QueryCommandOverHttpTest.java} |   6 +-
 ....java => ShutdownCommandOverHttpDUnitTest.java} |   8 +-
 23 files changed, 1027 insertions(+), 264 deletions(-)
 copy geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/{DestroyIndexIfExistsTest.java => StartLocatorAcceptanceTest.java} (57%)
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionQueueTest.java
 copy geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/{IndexCommandOverHttpTest.java => QueryCommandOverHttpTest.java} (90%)
 copy geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/{ListIndexCommandOverHttpDUnitTest.java => ShutdownCommandOverHttpDUnitTest.java} (83%)

-- 
To stop receiving notification emails like this one, please contact
zhouxj@apache.org.

[geode] 01/01: GEODE-3967: when ConcurrentCacheModificationException happened. GatewaySenderEventImpl should save the status and notify gatewaysender anyway. SerialGatewaySender will handle it. In AbstractUpdateOperation's doPutOrCreate's 3 tries of basicUpdate, the 3rd one should allow both create and update.

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhouxj pushed a commit to branch feature/GEODE-3967
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 7b4442f4e33dc97c28a0146decf9a857c1416689
Author: zhouxh <gz...@pivotal.io>
AuthorDate: Sat Jan 20 17:39:00 2018 -0800

    GEODE-3967: when ConcurrentCacheModificationException happened. GatewaySenderEventImpl should save the status and notify gatewaysender anyway. SerialGatewaySender will handle it. In AbstractUpdateOperation's doPutOrCreate's 3 tries of basicUpdate, the 3rd one should allow both create and update.
---
 .../org/apache/geode/internal/cache/AbstractUpdateOperation.java | 2 +-
 .../main/java/org/apache/geode/internal/cache/LocalRegion.java   | 9 +++++++--
 .../cache/wan/serial/SerialGatewaySenderEventProcessor.java      | 9 ++++++---
 .../apache/geode/cache30/DistributedAckRegionCCEDUnitTest.java   | 4 +++-
 4 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractUpdateOperation.java b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractUpdateOperation.java
index 585e131..a706abd 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractUpdateOperation.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractUpdateOperation.java
@@ -175,7 +175,7 @@ public abstract class AbstractUpdateOperation extends DistributedCacheOperation
                   || (rgn.getDataPolicy().withReplication() && rgn.getConcurrencyChecksEnabled())) {
                 overwriteDestroyed = true;
                 ev.makeCreate();
-                rgn.basicUpdate(ev, true /* ifNew */, false/* ifOld */, lastMod,
+                rgn.basicUpdate(ev, false /* ifNew */, false/* ifOld */, lastMod,
                     overwriteDestroyed);
                 rgn.getCachePerfStats().endPut(startPut, ev.isOriginRemote());
                 updated = true;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
index aca96d0..26d5dde 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
@@ -5618,6 +5618,8 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
         logger.debug("caught concurrent modification attempt when applying {}", event);
       }
       notifyBridgeClients(event);
+      notifyGatewaySender(event.getOperation().isUpdate() ? EnumListenerEvent.AFTER_UPDATE
+          : EnumListenerEvent.AFTER_CREATE, event);
       return false;
     }
 
@@ -5844,6 +5846,9 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
     updateTimeStampEvent.setGenerateCallbacks(false);
     updateTimeStampEvent.distributedMember = event.getDistributedMember();
     updateTimeStampEvent.setNewEventId(getSystem());
+    if (event.isConcurrencyConflict()) {
+      updateTimeStampEvent.isConcurrencyConflict(true);
+    }
 
     if (event.getRegion() instanceof BucketRegion) {
       BucketRegion bucketRegion = (BucketRegion) event.getRegion();
@@ -6100,8 +6105,7 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
   }
 
   protected void notifyGatewaySender(EnumListenerEvent operation, EntryEventImpl event) {
-    if (isPdxTypesRegion() || event.isConcurrencyConflict()) {
-      // isConcurrencyConflict is usually a concurrent cache modification problem
+    if (isPdxTypesRegion()) {
       return;
     }
 
@@ -6485,6 +6489,7 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
       // Notify clients only if its NOT a gateway event.
       if (event.getVersionTag() != null && !event.getVersionTag().isGatewayTag()) {
         notifyBridgeClients(event);
+        notifyGatewaySender(EnumListenerEvent.AFTER_DESTROY, event);
       }
       return true; // event was elided
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/serial/SerialGatewaySenderEventProcessor.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/serial/SerialGatewaySenderEventProcessor.java
index 734b560..d5d0baa 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/serial/SerialGatewaySenderEventProcessor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/serial/SerialGatewaySenderEventProcessor.java
@@ -35,6 +35,7 @@ import org.apache.geode.SystemFailure;
 import org.apache.geode.cache.CacheException;
 import org.apache.geode.cache.CacheListener;
 import org.apache.geode.cache.EntryEvent;
+import org.apache.geode.cache.Operation;
 import org.apache.geode.cache.Region;
 import org.apache.geode.cache.RegionDestroyedException;
 import org.apache.geode.cache.wan.GatewayQueueEvent;
@@ -423,9 +424,11 @@ public class SerialGatewaySenderEventProcessor extends AbstractGatewaySenderEven
         } else {
           // If it is not, create an uninitialized GatewayEventImpl and
           // put it into the map of unprocessed events.
-          senderEvent = new GatewaySenderEventImpl(operation, event, substituteValue, false); // OFFHEAP
-                                                                                              // ok
-          handleSecondaryEvent(senderEvent);
+          if (!event.getOperation().equals(Operation.UPDATE_VERSION_STAMP)) {
+            senderEvent = new GatewaySenderEventImpl(operation, event, substituteValue, false); // OFFHEAP
+                                                                                                // ok
+            handleSecondaryEvent(senderEvent);
+          }
         }
       }
     }
diff --git a/geode-core/src/test/java/org/apache/geode/cache30/DistributedAckRegionCCEDUnitTest.java b/geode-core/src/test/java/org/apache/geode/cache30/DistributedAckRegionCCEDUnitTest.java
index 1016a4b..bf6a611 100644
--- a/geode-core/src/test/java/org/apache/geode/cache30/DistributedAckRegionCCEDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache30/DistributedAckRegionCCEDUnitTest.java
@@ -476,7 +476,9 @@ public class DistributedAckRegionCCEDUnitTest extends DistributedAckRegionDUnitT
       CCRegion.basicBridgePut("cckey0", "newvalue", null, true, null, id, true, holder);
       vm0.invoke(new SerializableRunnable("check conflation count") {
         public void run() {
-          assertEquals("expected one conflated event", 1,
+          // after changed the 3rd try of AUO.doPutOrCreate to be ifOld=false ifNew=false
+          // ARM.updateEntry will be called one more time, so there will be 2 conflacted events
+          assertEquals("expected two conflated event", 2,
               CCRegion.getCachePerfStats().getConflatedEventsCount());
         }
       });

-- 
To stop receiving notification emails like this one, please contact
zhouxj@apache.org.