ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: Fix NPE in GridCachePartitionExchangeManager.createPartitionsFullMessage.
Date Mon, 09 Jan 2017 14:32:46 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-3477 56162b39a -> 15956a8a6


Fix NPE in GridCachePartitionExchangeManager.createPartitionsFullMessage.


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

Branch: refs/heads/ignite-3477
Commit: 15956a8a6a26e37d99501fdb7e5af0b00efae506
Parents: 56162b3
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Jan 9 17:32:49 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Jan 9 17:32:49 2017 +0300

----------------------------------------------------------------------
 .../GridCachePartitionExchangeManager.java      | 24 ++++++++++++--------
 ...maryWriteOrderWithStoreExpiryPolicyTest.java |  2 +-
 2 files changed, 16 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/15956a8a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index f10a072..004e07c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -871,17 +871,23 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
                     ready = cacheCtx.started();
 
                 if (ready) {
-                    GridDhtPartitionFullMap locMap = cacheCtx.topology().partitionMap(true);
+                    GridAffinityAssignmentCache affCache = cacheCtx.affinity().affinityCache();
 
-                    addFullPartitionsMap(m,
-                        dupData,
-                        compress,
-                        cacheCtx.cacheId(),
-                        locMap,
-                        cacheCtx.affinity().affinityCache().similarAffinityKey());
+                    if (affCache != null) {
+                        GridDhtPartitionFullMap locMap = cacheCtx.topology().partitionMap(true);
 
-                    if (exchId != null)
-                        m.addPartitionUpdateCounters(cacheCtx.cacheId(), cacheCtx.topology().updateCounters(true));
+                        addFullPartitionsMap(m,
+                            dupData,
+                            compress,
+                            cacheCtx.cacheId(),
+                            locMap,
+                            affCache.similarAffinityKey());
+
+                        if (exchId != null)
+                            m.addPartitionUpdateCounters(cacheCtx.cacheId(), cacheCtx.topology().updateCounters(true));
+                    }
+                    else
+                        assert cctx.cacheContext(cacheCtx.cacheId()) == null : cacheCtx.name();
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/15956a8a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicPrimaryWriteOrderWithStoreExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicPrimaryWriteOrderWithStoreExpiryPolicyTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicPrimaryWriteOrderWithStoreExpiryPolicyTest.java
index 8fc5f07..75ddf52 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicPrimaryWriteOrderWithStoreExpiryPolicyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicPrimaryWriteOrderWithStoreExpiryPolicyTest.java
@@ -24,7 +24,7 @@ import org.apache.ignite.cache.store.CacheStore;
  *
  */
 public class IgniteCacheAtomicPrimaryWriteOrderWithStoreExpiryPolicyTest extends
-    IgniteCacheAtomicPrimaryWriteOrderExpiryPolicyTest{
+    IgniteCacheAtomicPrimaryWriteOrderExpiryPolicyTest {
     /** {@inheritDoc} */
     @Override protected Factory<CacheStore> cacheStoreFactory() {
         return new TestStoreFactory();


Mime
View raw message