ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [1/2] ignite git commit: indexingEnabled flag was reused from queryManager
Date Fri, 31 Mar 2017 17:23:53 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-3477-master 15e2024b8 -> b6c17615f


indexingEnabled flag was reused from queryManager


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

Branch: refs/heads/ignite-3477-master
Commit: 481f0210ecc280bd00be3fa473409aeb4a61d7fd
Parents: fbc7315
Author: Sergey Chugunov <sergey.chugunov@gmail.com>
Authored: Fri Mar 31 14:25:04 2017 +0300
Committer: Sergey Chugunov <sergey.chugunov@gmail.com>
Committed: Fri Mar 31 20:09:51 2017 +0300

----------------------------------------------------------------------
 .../cache/IgniteCacheOffheapManagerImpl.java    | 20 +++++---------------
 .../cache/query/IndexingSpiQuerySelfTest.java   |  3 ---
 2 files changed, 5 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/481f0210/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
index 8b8de19..93e9550 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
@@ -84,9 +84,6 @@ import static org.apache.ignite.internal.pagemem.PageIdUtils.pageId;
 @SuppressWarnings("PublicInnerClass")
 public class IgniteCacheOffheapManagerImpl extends GridCacheManagerAdapter implements IgniteCacheOffheapManager
{
     /** */
-    private boolean indexingEnabled;
-
-    /** */
     // TODO GG-11208 need restore size after restart.
     private CacheDataStore locCacheDataStore;
 
@@ -123,8 +120,6 @@ public class IgniteCacheOffheapManagerImpl extends GridCacheManagerAdapter
imple
     @Override protected void start0() throws IgniteCheckedException {
         super.start0();
 
-        indexingEnabled = QueryUtils.isEnabled(cctx.config());
-
         updateValSizeThreshold = cctx.kernalContext().config().getMemoryConfiguration().getPageSize()
/ 2;
 
         if (cctx.affinityNode()) {
@@ -914,7 +909,7 @@ public class IgniteCacheOffheapManagerImpl extends GridCacheManagerAdapter
imple
          */
         private boolean canUpdateOldRow(@Nullable CacheDataRow oldRow, DataRow dataRow)
             throws IgniteCheckedException {
-            if (oldRow == null || indexingEnabled)
+            if (oldRow == null || cctx.queries().enabled())
                 return false;
 
             if (oldRow.expireTime() != dataRow.expireTime())
@@ -1059,11 +1054,9 @@ public class IgniteCacheOffheapManagerImpl extends GridCacheManagerAdapter
imple
 
             long expireTime = newRow.expireTime();
 
-            if (indexingEnabled) {
-                GridCacheQueryManager qryMgr = cctx.queries();
-
-                assert qryMgr.enabled();
+            GridCacheQueryManager qryMgr = cctx.queries();
 
+            if (qryMgr.enabled()) {
                 if (oldRow != null) {
                     qryMgr.store(key,
                         partId,
@@ -1138,13 +1131,10 @@ public class IgniteCacheOffheapManagerImpl extends GridCacheManagerAdapter
imple
                 ver = oldRow.version();
             }
 
-            if (indexingEnabled) {
-                GridCacheQueryManager qryMgr = cctx.queries();
-
-                assert qryMgr.enabled();
+            GridCacheQueryManager qryMgr = cctx.queries();
 
+            if (qryMgr.enabled())
                 qryMgr.remove(key, partId, val, ver);
-            }
 
             if (oldRow != null)
                 rowStore.removeRow(oldRow.link());

http://git-wip-us.apache.org/repos/asf/ignite/blob/481f0210/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IndexingSpiQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IndexingSpiQuerySelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IndexingSpiQuerySelfTest.java
index ac6044f..06a89a4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IndexingSpiQuerySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IndexingSpiQuerySelfTest.java
@@ -208,8 +208,6 @@ public class IndexingSpiQuerySelfTest extends TestCase {
 
         CacheConfiguration<Integer, Integer> ccfg = cacheConfiguration(CACHE_NAME);
 
-        ccfg.setIndexedTypes(Integer.class, String.class);
-
         ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
 
         final IgniteCache<Integer, Integer> cache = ignite.createCache(ccfg);
@@ -344,7 +342,6 @@ public class IndexingSpiQuerySelfTest extends TestCase {
         /** {@inheritDoc} */
         @Override public void store(@Nullable String spaceName, Object key, Object val,
             long expirationTime) throws IgniteSpiException {
-            System.out.println("-->>-->> [" + Thread.currentThread().getName()
+ "] "  + System.currentTimeMillis() + " called");
             throw new IgniteSpiException("Test exception");
         }
     }


Mime
View raw message