You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/02/25 13:31:24 UTC

[25/51] [abbrv] ignite git commit: ignite-2523 : Fixed failing tests.

ignite-2523 : Fixed failing tests.


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

Branch: refs/heads/ignite-2523
Commit: 2f6aff8024794cd980fd77bb96e9a74876fb7442
Parents: 4f8220e
Author: Ilya Lantukh <il...@gridgain.com>
Authored: Tue Feb 9 15:04:52 2016 +0300
Committer: Ilya Lantukh <il...@gridgain.com>
Committed: Tue Feb 9 15:04:52 2016 +0300

----------------------------------------------------------------------
 .../distributed/dht/atomic/GridDhtAtomicCache.java   | 15 +++++++++++----
 .../atomic/GridNearAtomicSingleUpdateRequest.java    |  2 ++
 .../atomic/GridNearAtomicSingleUpdateResponse.java   |  8 ++++----
 .../dht/atomic/GridNearAtomicUpdateFuture.java       |  6 +++---
 4 files changed, 20 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/2f6aff80/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 05205e3..629aa25 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
@@ -269,6 +269,12 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
             }
         });
 
+        ctx.io().addHandler(ctx.cacheId(), GridNearAtomicSingleUpdateResponse.class, new CI2<UUID, GridNearAtomicSingleUpdateResponse>() {
+            @Override public void apply(UUID nodeId, GridNearAtomicSingleUpdateResponse res) {
+                processNearAtomicUpdateResponse(nodeId, res);
+            }
+        });
+
         ctx.io().addHandler(ctx.cacheId(), GridDhtAtomicUpdateRequest.class, new CI2<UUID, GridDhtAtomicUpdateRequest>() {
             @Override public void apply(UUID nodeId, GridDhtAtomicUpdateRequest req) {
                 processDhtAtomicUpdateRequest(nodeId, req);
@@ -868,7 +874,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
             TRANSFORM);
 
         return resFut.chain(new CX1<IgniteInternalFuture<Map<K, EntryProcessorResult<T>>>, Map<K, EntryProcessorResult<T>>>() {
-            @Override public Map<K, EntryProcessorResult<T>> applyx(IgniteInternalFuture<Map<K, EntryProcessorResult<T>>> fut) throws IgniteCheckedException {
+            @Override public Map<K, EntryProcessorResult<T>> applyx(
+                IgniteInternalFuture<Map<K, EntryProcessorResult<T>>> fut) throws IgniteCheckedException {
                 Map<Object, EntryProcessorResult> resMap = (Map)fut.get();
 
                 return ctx.unwrapInvokeResult(resMap, keepBinary);
@@ -1431,7 +1438,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
                             UpdateBatchResult updRes = updateWithBatch(node,
                                 hasNear,
                                 req,
-                                (GridNearAtomicMultipleUpdateResponse) res,
+                                (GridNearAtomicMultipleUpdateResponse)res,
                                 locked,
                                 ver,
                                 dhtFut,
@@ -2741,7 +2748,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
      * @param res Near atomic update response.
      */
     @SuppressWarnings("unchecked")
-    private void processNearAtomicUpdateResponse(UUID nodeId, GridNearAtomicMultipleUpdateResponse res) {
+    private void processNearAtomicUpdateResponse(UUID nodeId, GridNearAtomicUpdateResponse res) {
         if (log.isDebugEnabled())
             log.debug("Processing near atomic update response [nodeId=" + nodeId + ", res=" + res + ']');
 
@@ -2953,7 +2960,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
      */
     private void sendNearUpdateReply(UUID nodeId, GridNearAtomicUpdateResponse res) {
         try {
-            ctx.io().send(nodeId, (GridCacheMessage) res, ctx.ioPolicy());
+            ctx.io().send(nodeId, (GridCacheMessage)res, ctx.ioPolicy());
         }
         catch (ClusterTopologyCheckedException ignored) {
             U.warn(log, "Failed to send near update reply to node because it left grid: " +

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f6aff80/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateRequest.java
index 1e981af..e69be07 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateRequest.java
@@ -213,6 +213,8 @@ public class GridNearAtomicSingleUpdateRequest extends GridCacheMessage
         boolean clientReq,
         boolean addDepInfo
     ) {
+        System.out.println("???");
+
         assert futVer != null;
 
         this.key = key;

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f6aff80/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateResponse.java
index 0bea0dd..65dc08e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateResponse.java
@@ -164,7 +164,7 @@ public class GridNearAtomicSingleUpdateResponse extends GridCacheMessage impleme
         if (failed && key != null)
             return Collections.singletonList(key);
 
-        return Collections.emptyList();
+        return null;
     }
 
     /**
@@ -202,7 +202,7 @@ public class GridNearAtomicSingleUpdateResponse extends GridCacheMessage impleme
         if (remap && key != null)
             return Collections.singletonList(key);
 
-        return Collections.emptyList();
+        return null;
     }
 
     /**
@@ -294,7 +294,7 @@ public class GridNearAtomicSingleUpdateResponse extends GridCacheMessage impleme
         if (nearSkip && key != null)
             return Collections.singletonList(0);
 
-        return Collections.emptyList();
+        return null;
     }
 
     /**
@@ -304,7 +304,7 @@ public class GridNearAtomicSingleUpdateResponse extends GridCacheMessage impleme
         if (hasNearVal && key != null)
             return Collections.singletonList(0);
 
-        return Collections.emptyList();
+        return null;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f6aff80/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
index 55442dc..8edd0d4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
@@ -339,7 +339,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object> implem
      * @param nodeId Node ID.
      * @param res Update response.
      */
-    public void onResult(UUID nodeId, GridNearAtomicMultipleUpdateResponse res) {
+    public void onResult(UUID nodeId, GridNearAtomicUpdateResponse res) {
         state.onResult(nodeId, res, false);
     }
 
@@ -454,9 +454,9 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object> implem
     private void mapSingle(UUID nodeId, GridNearAtomicUpdateRequest req) {
         if (cctx.localNodeId().equals(nodeId)) {
             cache.updateAllAsyncInternal(nodeId, req,
-                new CI2<GridNearAtomicUpdateRequest, GridNearAtomicMultipleUpdateResponse>() {
+                new CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse>() {
                     @Override public void apply(GridNearAtomicUpdateRequest req,
-                        GridNearAtomicMultipleUpdateResponse res) {
+                        GridNearAtomicUpdateResponse res) {
                         onResult(res.nodeId(), res);
                     }
                 });