ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-4705
Date Mon, 06 Mar 2017 07:31:42 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-4705-2 8d744f42a -> d7d81dd1f


ignite-4705


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d7d81dd1
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d7d81dd1
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d7d81dd1

Branch: refs/heads/ignite-4705-2
Commit: d7d81dd1f6bb95b0dff5a7647e661e83bf8abdbb
Parents: 8d744f4
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Mar 6 10:14:58 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Mar 6 10:14:58 2017 +0300

----------------------------------------------------------------------
 .../dht/atomic/GridDhtAtomicAbstractUpdateFuture.java  |  3 +++
 .../dht/atomic/GridDhtAtomicAbstractUpdateRequest.java | 13 ++++++++++++-
 .../distributed/dht/atomic/GridDhtAtomicCache.java     |  7 +++++++
 .../IgniteCacheMessageRecoveryAbstractTest.java        |  2 +-
 4 files changed, 23 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d7d81dd1/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
index dcd4a18..8476955 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
@@ -419,6 +419,9 @@ public abstract class GridDhtAtomicAbstractUpdateFuture extends GridFutureAdapte
                         req.hasResult(true);
                 }
 
+                if (cntQryClsrs != null)
+                    req.replyWithoutDelay(true);
+
                 cctx.io().send(req.nodeId(), req, cctx.ioPolicy());
 
                 if (msgLog.isDebugEnabled()) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/d7d81dd1/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateRequest.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateRequest.java
index 34ac2ec..5eef5ce 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateRequest.java
@@ -55,6 +55,9 @@ public abstract class GridDhtAtomicAbstractUpdateRequest extends GridCacheMessag
     /** */
     static final int DHT_ATOMIC_HAS_RESULT_MASK = 0x08;
 
+    /** */
+    static final int DHT_ATOMIC_REPLY_WITHOUT_DELAY = 0x01;
+
     /** Message index. */
     public static final int CACHE_MSG_IDX = nextIndexId();
 
@@ -141,10 +144,18 @@ public abstract class GridDhtAtomicAbstractUpdateRequest extends GridCacheMessag
         this.nearFutId = nearFutId;
     }
 
+    boolean replyWithoutDelay() {
+        return isFlag(DHT_ATOMIC_REPLY_WITHOUT_DELAY);
+    }
+
+    void replyWithoutDelay(boolean replyWithoutDelay) {
+        setFlag(replyWithoutDelay, DHT_ATOMIC_REPLY_WITHOUT_DELAY);
+    }
+
     /**
      * @param res Result flag.
      */
-    public void hasResult(boolean res) {
+    void hasResult(boolean res) {
         setFlag(res, DHT_ATOMIC_HAS_RESULT_MASK);
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/d7d81dd1/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 5cd07b1..afca594 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -3236,6 +3236,13 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
         if (nearRes != null)
             sendDhtNearResponse(req, nearRes);
 
+        if (dhtRes == null && req.replyWithoutDelay()) {
+            dhtRes = new GridDhtAtomicUpdateResponse(ctx.cacheId(),
+                req.partition(),
+                req.futureId(),
+                ctx.deploymentEnabled());
+        }
+
         if (dhtRes != null)
             sendDhtPrimaryResponse(nodeId, req, dhtRes);
         else

http://git-wip-us.apache.org/repos/asf/ignite/blob/d7d81dd1/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java
index 1bfd727..0d8e7ae 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java
@@ -103,7 +103,7 @@ public abstract class IgniteCacheMessageRecoveryAbstractTest extends GridCommonA
         for (int i = 0; i < GRID_CNT; i++) {
             final IgniteKernal grid = (IgniteKernal)grid(i);
 
-            GridTestUtils.retryAssert(log, 10, 100, new CA() {
+            GridTestUtils.retryAssert(log, 10, 500, new CA() {
                 @Override public void apply() {
                     assertTrue(grid.internalCache().context().mvcc().atomicFutures().isEmpty());
                 }


Mime
View raw message