ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [3/3] ignite git commit: ignite-gg-10837
Date Tue, 19 Jan 2016 11:19:33 GMT
ignite-gg-10837


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

Branch: refs/heads/ignite-gg-10837
Commit: 76685e376ece9d6d9877fc93732f7db0b1a4ca0b
Parents: 1068e13
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Jan 19 14:19:18 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Jan 19 14:19:18 2016 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/CacheOperationContext.java    | 2 +-
 .../cache/distributed/dht/atomic/GridDhtAtomicCache.java    | 5 +++++
 .../processors/cache/transactions/IgniteTxLocalAdapter.java | 9 +++++++--
 .../internal/processors/datastreamer/DataStreamerImpl.java  | 1 -
 .../java/org/apache/ignite/testframework/GridTestUtils.java | 2 +-
 5 files changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/76685e37/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java
index 5f64dc5..2ac8ae0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java
@@ -90,7 +90,7 @@ public class CacheOperationContext implements Serializable {
 
         this.noRetries = noRetries;
 
-        this.dataCenterId = 1;
+        this.dataCenterId = null;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/76685e37/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 7149b7d..2c45121 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
@@ -946,6 +946,9 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
         CacheOperationContext opCtx = ctx.operationContextPerCall();
 
         if (opCtx != null && opCtx.hasDataCenterId()) {
+            assert conflictPutMap == null : conflictPutMap;
+            assert conflictRmvMap == null : conflictRmvMap;
+
             if (op == GridCacheOperation.TRANSFORM) {
                 Map<KeyCacheObject, GridCacheDrInfo> confMap = new HashMap<>(invokeMap.size());
 
@@ -1052,6 +1055,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
         int taskNameHash = ctx.kernalContext().job().currentTaskNameHash();
 
         if (opCtx != null && keys != null && opCtx.hasDataCenterId()) {
+            assert conflictMap == null : conflictMap;
+
             Map<KeyCacheObject, GridCacheVersion> confMap = new HashMap<>(keys.size());
 
             for (K key : keys)

http://git-wip-us.apache.org/repos/asf/ignite/blob/76685e37/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index 2bfbcfd..0b19f30 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -3085,13 +3085,16 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
implements Ig
 
         final CacheOperationContext opCtx = cacheCtx.operationContextPerCall();
 
-        if (opCtx != null && opCtx.hasDataCenterId())
-            drMap = (Map<KeyCacheObject, GridCacheDrInfo>)F.viewReadOnly((Map<K,
V>)map,
+        if (opCtx != null && opCtx.hasDataCenterId()) {
+            assert drMap == null : drMap;
+
+            drMap = (Map<KeyCacheObject, GridCacheDrInfo>)F.viewReadOnly((Map<K,
V>) map,
                 new IgniteClosure<V, GridCacheDrInfo>() {
                     @Override public GridCacheDrInfo apply(V val) {
                         return new GridCacheDrInfo(cctx.versions().next(opCtx.dataCenterId()));
                     }
                 });
+        }
 
         // Cached entry may be passed only from entry wrapper.
         final Map<?, ?> map0 = map;
@@ -3346,6 +3349,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements
Ig
         CacheOperationContext opCtx = cacheCtx.operationContextPerCall();
 
         if (drMap == null && opCtx != null && opCtx.hasDataCenterId()) {
+            assert drMap == null : drMap;
+
             Map<K, GridCacheVersion> confMap = new TreeMap<>();
 
             for (K key : keys)

http://git-wip-us.apache.org/repos/asf/ignite/blob/76685e37/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
index 801d6ef..27eff0c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
@@ -64,7 +64,6 @@ import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.affinity.GridAffinityProcessor;
 import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.processors.cache.CacheObjectContext;
-import org.apache.ignite.internal.processors.cache.CacheOperationContext;
 import org.apache.ignite.internal.processors.cache.GridCacheAdapter;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCacheEntryEx;

http://git-wip-us.apache.org/repos/asf/ignite/blob/76685e37/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
b/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
index 9d67d58..26a8994 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
@@ -961,7 +961,7 @@ public final class GridTestUtils {
      * @return Resolved path, or {@code null} if file cannot be resolved.
      */
     @Nullable private static File resolvePath(@Nullable String igniteHome, String path) {
-        File file = new File("D:\\projects\\ggprivate\\modules\\core\\src\\test\\config\\tests.properties").getAbsoluteFile();
+        File file = new File(path).getAbsoluteFile();
 
         if (!file.exists()) {
             String home = igniteHome != null ? igniteHome : U.getIgniteHome();


Mime
View raw message