geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jasonhu...@apache.org
Subject [geode] branch develop updated: Revert "GEODE-3967: There're following 9 problems fixed here:"
Date Thu, 27 Sep 2018 00:38:41 GMT
This is an automated email from the ASF dual-hosted git repository.

jasonhuynh pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new a1bed42  Revert "GEODE-3967: There're following 9 problems fixed here:"
a1bed42 is described below

commit a1bed426f0606f158d54047205e1cdfe18383920
Author: Jason Huynh <huynhja@gmail.com>
AuthorDate: Wed Sep 26 16:38:35 2018 -0700

    Revert "GEODE-3967: There're following 9 problems fixed here:"
    
    This reverts commit de7c6d8b4a9b3e2c1c0ebd4ce1835aff0007f9e1.
    This commit seems to increase the likelihood of causing an WAN inconsistency
---
 .../geode/internal/cache/AbstractUpdateOperation.java      |  8 +-------
 .../java/org/apache/geode/internal/cache/LocalRegion.java  |  6 ++----
 .../wan/serial/SerialGatewaySenderEventProcessor.java      | 14 +++-----------
 3 files changed, 6 insertions(+), 22 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 6ec4453..2c2da45 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
@@ -142,12 +142,6 @@ public abstract class AbstractUpdateOperation extends DistributedCacheOperation
               }
               doUpdate = false;
             }
-            if (ev.isConcurrencyConflict()) {
-              if (logger.isDebugEnabled()) {
-                logger.debug("basicUpdate failed with CME, not to retry:" + ev);
-              }
-              doUpdate = false;
-            }
           }
         } finally {
           if (isBucket) {
@@ -181,7 +175,7 @@ public abstract class AbstractUpdateOperation extends DistributedCacheOperation
                   || (rgn.getDataPolicy().withReplication() && rgn.getConcurrencyChecksEnabled()))
{
                 overwriteDestroyed = true;
                 ev.makeCreate();
-                rgn.basicUpdate(ev, false /* ifNew */, false/* ifOld */, lastMod,
+                rgn.basicUpdate(ev, true /* 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 d6ce8a2..6c51dc5 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
@@ -5692,8 +5692,6 @@ 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;
     }
 
@@ -6192,7 +6190,8 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
   }
 
   protected void notifyGatewaySender(EnumListenerEvent operation, EntryEventImpl event) {
-    if (isPdxTypesRegion()) {
+    if (isPdxTypesRegion() || event.isConcurrencyConflict()) {
+      // isConcurrencyConflict is usually a concurrent cache modification problem
       return;
     }
 
@@ -6585,7 +6584,6 @@ 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 4d371ea..b2f9838 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
@@ -384,9 +384,6 @@ public class SerialGatewaySenderEventProcessor extends AbstractGatewaySenderEven
       if (m != null) {
         for (EventWrapper ew : m.values()) {
           GatewaySenderEventImpl gatewayEvent = ew.event;
-          if (logger.isDebugEnabled()) {
-            logger.debug("releaseUnprocessedEvents:" + gatewayEvent);
-          }
           gatewayEvent.release();
         }
         this.unprocessedEvents = null;
@@ -431,14 +428,9 @@ public class SerialGatewaySenderEventProcessor extends AbstractGatewaySenderEven
         } else {
           // If it is not, create an uninitialized GatewayEventImpl and
           // put it into the map of unprocessed events.
-          // 2 Special cases:
-          // 1) UPDATE_VERSION_STAMP: only enqueue to primary
-          // 2) CME && !originRemote: only enqueue to primary
-          if (!(event.getOperation().equals(Operation.UPDATE_VERSION_STAMP)
-              || ((EntryEventImpl) event).isConcurrencyConflict() && !event.isOriginRemote()))
{
-            senderEvent = new GatewaySenderEventImpl(operation, event, substituteValue, false);
// OFFHEAP
-            handleSecondaryEvent(senderEvent);
-          }
+          senderEvent = new GatewaySenderEventImpl(operation, event, substituteValue, false);
// OFFHEAP
+                                                                                        
     // ok
+          handleSecondaryEvent(senderEvent);
         }
       }
     }


Mime
View raw message