ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [2/3] ignite git commit: ignite-3477 : Fixed endless partsToEvict queue.
Date Tue, 11 Apr 2017 13:34:42 GMT
ignite-3477 : Fixed endless partsToEvict queue.


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

Branch: refs/heads/ignite-3477-master
Commit: 5e5ffe690292a22d7cdffc272e858d7e0d9acc2e
Parents: 7eb1234
Author: Ilya Lantukh <ilantukh@gridgain.com>
Authored: Tue Apr 11 15:32:31 2017 +0300
Committer: Ilya Lantukh <ilantukh@gridgain.com>
Committed: Tue Apr 11 15:32:31 2017 +0300

----------------------------------------------------------------------
 .../cache/distributed/dht/GridDhtLocalPartition.java  | 14 ++++++++------
 .../distributed/dht/preloader/GridDhtPreloader.java   |  4 ++--
 2 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5e5ffe69/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
index dbd1948..44fd905 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
@@ -217,6 +217,13 @@ public class GridDhtLocalPartition extends GridCacheConcurrentMapImpl
implements
     }
 
     /**
+     * @return {@code True} if partition is marked for transfer to renting state.
+     */
+    public boolean shouldBeRenting() {
+        return shouldBeRenting;
+    }
+
+    /**
      * @return Reservations.
      */
     public int reservations() {
@@ -458,12 +465,7 @@ public class GridDhtLocalPartition extends GridCacheConcurrentMapImpl
implements
                 if (reservations == 0 && shouldBeRenting)
                     rent(true);
 
-                try {
-                    tryEvict();
-                }
-                catch (NodeStoppingException ignore) {
-                    // Node is stopping.
-                }
+                tryEvictAsync(false);
 
                 break;
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5e5ffe69/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 9af2388..c033b93 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
@@ -72,7 +72,7 @@ import static org.apache.ignite.events.EventType.EVT_NODE_JOINED;
 import static org.apache.ignite.events.EventType.EVT_NODE_LEFT;
 import static org.apache.ignite.internal.managers.communication.GridIoPolicy.AFFINITY_POOL;
 import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.MOVING;
-import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.EVICTED;
+import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.RENTING;
 import static org.apache.ignite.internal.util.GridConcurrentFactory.newMap;
 
 /**
@@ -790,7 +790,7 @@ public class GridDhtPreloader extends GridCachePreloaderAdapter {
                                 try {
                                     part.tryEvict();
 
-                                    if (part.state() != EVICTED)
+                                    if (part.state() == RENTING || part.shouldBeRenting())
                                         partsToEvict.push(part);
                                 }
                                 catch (Throwable ex) {


Mime
View raw message