ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [13/50] [abbrv] ignite git commit: GG-11538 - Fixed exhausting free pages on exchange
Date Mon, 10 Oct 2016 14:57:18 GMT
GG-11538 - Fixed exhausting free pages on exchange


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

Branch: refs/heads/ignite-gg-8-io2-park
Commit: bfaa95c564acc13cbac5ba043303ae225f09d60a
Parents: 6a29d2d
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Tue Sep 27 13:01:39 2016 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Tue Sep 27 13:01:39 2016 +0300

----------------------------------------------------------------------
 .../GridDhtPartitionsExchangeFuture.java        | 22 ++++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/bfaa95c5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index 7d387ed..f57118a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -757,15 +757,15 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
 
         waitPartitionRelease();
 
-        cctx.database().checkpointReadLock();
+        boolean topChanged = discoEvt.type() != EVT_DISCOVERY_CUSTOM_EVT || affChangeMsg
!= null;
 
-        try {
-            boolean topChanged = discoEvt.type() != EVT_DISCOVERY_CUSTOM_EVT || affChangeMsg
!= null;
+        for (GridCacheContext cacheCtx : cctx.cacheContexts()) {
+            if (cacheCtx.isLocal() || stopping(cacheCtx.cacheId()))
+                continue;
 
-            for (GridCacheContext cacheCtx : cctx.cacheContexts()) {
-                if (cacheCtx.isLocal() || stopping(cacheCtx.cacheId()))
-                    continue;
+            cctx.database().checkpointReadLock();
 
+            try {
                 if (topChanged) {
                     cacheCtx.continuousQueries().beforeExchange(exchId.topologyVersion());
 
@@ -775,13 +775,13 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
 
                 cacheCtx.topology().beforeExchange(this, !centralizedAff);
             }
-
-            cctx.database().beforeExchange(this);
-        }
-        finally {
-            cctx.database().checkpointReadUnlock();
+            finally {
+                cctx.database().checkpointReadUnlock();
+            }
         }
 
+        cctx.database().beforeExchange(this);
+
         // If a backup request, synchronously wait for backup start.
         if (discoEvt.type() == EVT_DISCOVERY_CUSTOM_EVT) {
             DiscoveryCustomMessage customMessage = ((DiscoveryCustomEvent)discoEvt).customMessage();


Mime
View raw message