ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject incubator-ignite git commit: IGNITE-104 - Ordered ATOMIC updates
Date Mon, 03 Aug 2015 23:52:00 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-104 55a2fc6b1 -> b27af71d8


IGNITE-104 - Ordered ATOMIC updates


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

Branch: refs/heads/ignite-104
Commit: b27af71d81274ed351d5c43740f5c904db62adfb
Parents: 55a2fc6
Author: Valentin Kulichenko <vkulichenko@gridgain.com>
Authored: Mon Aug 3 16:51:53 2015 -0700
Committer: Valentin Kulichenko <vkulichenko@gridgain.com>
Committed: Mon Aug 3 16:51:53 2015 -0700

----------------------------------------------------------------------
 .../dht/atomic/GridDhtAtomicCache.java          | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b27af71d/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 9328932..4f1b887 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
@@ -2409,7 +2409,25 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
      * @param nodeId Sender node ID.
      * @param req Dht atomic update request.
      */
-    private void processDhtAtomicUpdateRequest(UUID nodeId, GridDhtAtomicUpdateRequest req)
{
+    private void processDhtAtomicUpdateRequest(final UUID nodeId, final GridDhtAtomicUpdateRequest
req) {
+        IgniteInternalFuture fut = ctx.preloader().request(req.keys(), req.topologyVersion());
+
+        if (fut.isDone())
+            processDhtAtomicUpdateRequest0(nodeId, req);
+        else {
+            fut.listen(new CI1<IgniteInternalFuture>() {
+                @Override public void apply(IgniteInternalFuture future) {
+                    processDhtAtomicUpdateRequest0(nodeId, req);
+                }
+            });
+        }
+    }
+
+    /**
+     * @param nodeId Sender node ID.
+     * @param req Dht atomic update request.
+     */
+    private void processDhtAtomicUpdateRequest0(UUID nodeId, GridDhtAtomicUpdateRequest req)
{
         if (log.isDebugEnabled())
             log.debug("Processing dht atomic update request [nodeId=" + nodeId + ", req="
+ req + ']');
 


Mime
View raw message