ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [24/27] incubator-ignite git commit: ignite-exchange - fixed NPE on stop.
Date Fri, 13 Feb 2015 06:24:59 GMT
ignite-exchange - fixed NPE on stop.


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

Branch: refs/heads/ignite-189
Commit: 4f430a15e420505ec3c00931f1408c3ed57120d1
Parents: 126ce46
Author: Alexey Goncharuk <agoncharuk@gridgain.com>
Authored: Thu Feb 12 19:55:53 2015 -0800
Committer: Alexey Goncharuk <agoncharuk@gridgain.com>
Committed: Thu Feb 12 19:55:53 2015 -0800

----------------------------------------------------------------------
 .../dht/preloader/GridDhtPreloader.java           | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4f430a15/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
index 75668d4..9418f70 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
@@ -466,13 +466,21 @@ public class GridDhtPreloader<K, V> extends GridCachePreloaderAdapter<K,
V> {
      * @param updateSeq Update sequence.
      */
     public void onPartitionEvicted(GridDhtLocalPartition<K, V> part, boolean updateSeq)
{
-        top.onEvicted(part, updateSeq);
+        if (!enterBusy())
+            return;
+
+        try {
+            top.onEvicted(part, updateSeq);
 
-        if (cctx.events().isRecordable(EVT_CACHE_PRELOAD_PART_UNLOADED))
-            cctx.events().addUnloadEvent(part.id());
+            if (cctx.events().isRecordable(EVT_CACHE_PRELOAD_PART_UNLOADED))
+                cctx.events().addUnloadEvent(part.id());
 
-        if (updateSeq)
-            cctx.shared().exchange().scheduleResendPartitions();
+            if (updateSeq)
+                cctx.shared().exchange().scheduleResendPartitions();
+        }
+        finally {
+            leaveBusy();
+        }
     }
 
     /**


Mime
View raw message