ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-5075
Date Wed, 17 May 2017 13:03:36 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-5075 d7e18d2b9 -> 1d0809367


ignite-5075


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

Branch: refs/heads/ignite-5075
Commit: 1d0809367d74dd6a603dcaec851b983096a909e4
Parents: d7e18d2
Author: sboikov <sboikov@gridgain.com>
Authored: Wed May 17 16:03:27 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed May 17 16:03:27 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/CacheGroupInfrastructure.java       | 11 +++++++++--
 .../preloader/GridCacheReplicatedPreloadSelfTest.java    |  3 ++-
 2 files changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1d080936/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupInfrastructure.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupInfrastructure.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupInfrastructure.java
index 3f6b549..52d60b1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupInfrastructure.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupInfrastructure.java
@@ -103,6 +103,9 @@ public class CacheGroupInfrastructure {
     /** ReuseList instance this group is associated with */
     private final ReuseList reuseList;
 
+    /** */
+    private final CacheType cacheType;
+
     /** IO policy. */
     private final byte ioPlc;
 
@@ -152,6 +155,7 @@ public class CacheGroupInfrastructure {
         this.freeList = freeList;
         this.reuseList = reuseList;
         this.locStartVer = locStartVer;
+        this.cacheType = cacheType;
 
         ioPlc = cacheType.ioPolicy();
 
@@ -213,6 +217,9 @@ public class CacheGroupInfrastructure {
      * @param cctx Cache context.
      */
     private void addCacheContext(GridCacheContext cctx) {
+        assert cacheType.userCache() == cctx.userCache() : cctx.name();
+        assert grpId == cctx.groupId() : cctx.name();
+
         synchronized (caches) {
             assert sharedGroup() || caches.isEmpty();
 
@@ -264,11 +271,11 @@ public class CacheGroupInfrastructure {
      * @return {@code True} if given event type should be recorded.
      */
     public boolean eventRecordable(int type) {
-        return ctx.gridEvents().isRecordable(type);
+        return cacheType.userCache() && ctx.gridEvents().isRecordable(type);
     }
 
     /**
-     * Adds preloading event.
+     * Adds rebalancing event.
      *
      * @param part Partition.
      * @param type Event type.

http://git-wip-us.apache.org/repos/asf/ignite/blob/1d080936/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java
index 346f908..e90b7e1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java
@@ -268,7 +268,8 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest
{
                     break;
             }
 
-            assert evts != null && evts.size() == 2 : "Wrong events received: " +
evts;
+            assertNotNull(evts);
+            assertEquals("Wrong events received: " + evts, 2, evts.size());
 
             Iterator<Event> iter = evts.iterator();
 


Mime
View raw message