ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject ignite git commit: IGNITE-8053 Make sure local partitions collection does not change
Date Fri, 30 Mar 2018 14:40:38 GMT
Repository: ignite
Updated Branches:
  refs/heads/master a2c96ed88 -> c27fec3c3


IGNITE-8053 Make sure local partitions collection does not change


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

Branch: refs/heads/master
Commit: c27fec3c3ebd70ee9248a8d110b65adaa7ba042e
Parents: a2c96ed
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Fri Mar 30 17:40:28 2018 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Fri Mar 30 17:40:28 2018 +0300

----------------------------------------------------------------------
 .../persistence/GridCacheDatabaseSharedManager.java    | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c27fec3c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
index 73802c1..fabf258 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
@@ -129,7 +129,6 @@ import org.apache.ignite.internal.processors.cache.persistence.snapshot.Snapshot
 import org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO;
 import org.apache.ignite.internal.processors.cache.persistence.tree.io.PagePartitionMetaIO;
 import org.apache.ignite.internal.processors.cache.persistence.wal.FileWALPointer;
-import org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager;
 import org.apache.ignite.internal.processors.cache.persistence.wal.crc.PureJavaCrc32;
 import org.apache.ignite.internal.processors.port.GridPortRecord;
 import org.apache.ignite.internal.util.GridMultiCollectionWrapper;
@@ -377,7 +376,7 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
     private List<MetastorageLifecycleListener> metastorageLifecycleLsnrs;
 
     /** Initially disabled cache groups. */
-    public Collection<Integer> initiallyWalDisabledGrps;
+    private Collection<Integer> initiallyWalDisabledGrps;
 
     /**
      * @param ctx Kernal context.
@@ -3063,14 +3062,14 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
                     if (grp.isLocal() || !grp.walEnabled())
                         continue;
 
-                    int locPartsSize = 0;
+                    ArrayList<GridDhtLocalPartition> parts = new ArrayList<>();
 
-                    for (GridDhtLocalPartition ignored : grp.topology().currentLocalPartitions())
-                        locPartsSize++;
+                    for (GridDhtLocalPartition part : grp.topology().currentLocalPartitions())
+                        parts.add(part);
 
-                    CacheState state = new CacheState(locPartsSize);
+                    CacheState state = new CacheState(parts.size());
 
-                    for (GridDhtLocalPartition part : grp.topology().currentLocalPartitions())
{
+                    for (GridDhtLocalPartition part : parts) {
                         state.addPartitionState(
                             part.id(),
                             part.dataStore().fullSize(),


Mime
View raw message