ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [1/2] ignite git commit: Partial fix for ignite-1355 to avoid errors in tests setup.
Date Tue, 08 Sep 2015 08:14:42 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1.4 97fe836b9 -> 5264ec738


Partial fix for ignite-1355 to avoid errors in tests setup.


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

Branch: refs/heads/ignite-1.4
Commit: 02fc057ee885ef70ed645d993d7e3cd7488d3888
Parents: bbfee45
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Sep 8 10:38:01 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Sep 8 10:38:01 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/affinity/GridAffinityProcessor.java  | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/02fc057e/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
index 090aca0..8f66dc1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
@@ -296,7 +296,7 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
      * @throws IgniteCheckedException In case of error.
      */
     @SuppressWarnings("ErrorNotRethrown")
-    private AffinityInfo affinityCache(@Nullable final String cacheName, AffinityTopologyVersion
topVer)
+    @Nullable private AffinityInfo affinityCache(@Nullable final String cacheName, AffinityTopologyVersion
topVer)
         throws IgniteCheckedException {
         AffinityAssignmentKey key = new AffinityAssignmentKey(cacheName, topVer);
 
@@ -879,7 +879,9 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
             ctx.gateway().readLock();
 
             try {
-                return cache().assignment().get(part);
+                AffinityInfo cache = cache();
+
+                return cache != null ? cache.assignment().get(part) : Collections.<ClusterNode>emptyList();
             }
             catch (IgniteCheckedException e) {
                 throw new IgniteException(e);
@@ -893,7 +895,7 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
          * @return Affinity info for current topology version.
          * @throws IgniteCheckedException If failed.
          */
-        private AffinityInfo cache() throws IgniteCheckedException {
+        @Nullable private AffinityInfo cache() throws IgniteCheckedException {
             return affinityCache(cacheName, new AffinityTopologyVersion(topologyVersion()));
         }
 


Mime
View raw message