You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2017/10/17 10:16:01 UTC

[1/4] ignite git commit: ignite-3478 Tests restructured

Repository: ignite
Updated Branches:
  refs/heads/ignite-5937 [created] f0cad9f89


ignite-3478 Tests restructured


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

Branch: refs/heads/ignite-5937
Commit: dfa3b782cf18a7c1db4584480bb0c133b5e6dbf8
Parents: 1b4eb29
Author: sboikov <sb...@gridgain.com>
Authored: Tue Oct 17 12:47:55 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Oct 17 12:47:55 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/IgniteCacheOffheapManagerImpl.java   | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/dfa3b782/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 c07e2a8..e30bff4 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
@@ -1545,6 +1545,16 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
 
                 cleanup(updateRow.cleanupRows(), false);
 
+//                CacheDataRow oldRow = updateRow.oldRow();
+//
+//                if (oldRow != null)
+//                    oldRow.key(key);
+//
+//                GridCacheQueryManager qryMgr = cctx.queries();
+//
+//                if (qryMgr.enabled())
+//                    qryMgr.store(updateRow, oldRow);
+
                 return updateRow.activeTransactions();
             }
             finally {


[3/4] ignite git commit: ignite-3478 Tests restructured

Posted by sb...@apache.org.
ignite-3478 Tests restructured


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

Branch: refs/heads/ignite-5937
Commit: 47ef5c8815da3af36aa717520894f6900562bf6f
Parents: e0897f1
Author: sboikov <sb...@gridgain.com>
Authored: Tue Oct 17 13:02:22 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Oct 17 13:03:16 2017 +0300

----------------------------------------------------------------------
 .../cache/IgniteCacheOffheapManagerImpl.java    | 18 +++----
 .../cache/mvcc/CacheMvccSqlQueriesTest.java     | 51 ++++++++++++++++++++
 2 files changed, 60 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/47ef5c88/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 e55a4c6..e04f070 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
@@ -1545,15 +1545,15 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
 
                 cleanup(updateRow.cleanupRows(), false);
 
-//                CacheDataRow oldRow = updateRow.oldRow();
-//
-//                if (oldRow != null)
-//                    oldRow.key(key);
-//
-//                GridCacheQueryManager qryMgr = cctx.queries();
-//
-//                if (qryMgr.enabled())
-//                    qryMgr.store(updateRow, oldRow);
+                CacheDataRow oldRow = updateRow.oldRow();
+
+                if (oldRow != null)
+                    oldRow.key(key);
+
+                GridCacheQueryManager qryMgr = cctx.queries();
+
+                if (qryMgr.enabled())
+                    qryMgr.store(updateRow, oldRow);
 
                 return updateRow.activeTransactions();
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/47ef5c88/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesTest.java
index 7ba1b32..33908bf 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesTest.java
@@ -17,9 +17,19 @@
 
 package org.apache.ignite.internal.processors.cache.mvcc;
 
+import java.io.Serializable;
+import java.util.List;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.query.SqlQuery;
+import org.apache.ignite.cache.query.annotations.QuerySqlField;
 import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.lang.IgniteInClosure;
 
+import static org.apache.ignite.cache.CacheMode.PARTITIONED;
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
+
 /**
  *
  */
@@ -36,4 +46,45 @@ public class CacheMvccSqlQueriesTest extends CacheMvccAbstractTest {
         }, false, ReadMode.SQL_ALL);
     }
 
+    /**
+     * @throws Exception If failed.
+     */
+    public void testSqlSimple() throws Exception {
+        Ignite srv0 = startGrid(0);
+
+        IgniteCache<Integer, MvccTestSqlIndexValue> cache =  (IgniteCache)srv0.createCache(
+            cacheConfiguration(PARTITIONED, FULL_SYNC, 0, DFLT_PARTITION_COUNT).
+            setIndexedTypes(Integer.class, MvccTestSqlIndexValue.class));
+
+        cache.put(1, new MvccTestSqlIndexValue(1));
+        cache.put(1, new MvccTestSqlIndexValue(2));
+
+        SqlQuery<Integer, MvccTestSqlIndexValue> qry =
+            new SqlQuery<>(MvccTestSqlIndexValue.class, "_key >= 0");
+
+        List<IgniteCache.Entry<Integer, MvccTestSqlIndexValue>> res = cache.query(qry).getAll();
+
+        assertEquals(1, res.size());
+    }
+
+    /**
+     *
+     */
+    static class MvccTestSqlIndexValue implements Serializable {
+        /** */
+        @QuerySqlField(index = true)
+        private int idxVal1;
+
+        /**
+         * @param idxVal1 Indexed value 1.
+         */
+        public MvccTestSqlIndexValue(int idxVal1) {
+            this.idxVal1 = idxVal1;
+        }
+
+        /** {@inheritDoc} */
+        @Override public String toString() {
+            return S.toString(MvccTestSqlIndexValue.class, this);
+        }
+    }
 }


[2/4] ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-3478-idx' into ignite-5937

Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-3478-idx' into ignite-5937


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

Branch: refs/heads/ignite-5937
Commit: e0897f13a50fd8d13f55bdcb413bcb2bf5da1173
Parents: dfa3b78 bc831a7
Author: sboikov <sb...@gridgain.com>
Authored: Tue Oct 17 12:50:13 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Oct 17 12:50:13 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheEntryEx.java      |   3 +-
 .../processors/cache/GridCacheMapEntry.java     |   8 +-
 .../cache/IgniteCacheOffheapManagerImpl.java    |  42 +-----
 .../cache/query/GridCacheQueryManager.java      |  53 ++------
 .../processors/query/GridQueryIndexing.java     |  25 ++--
 .../processors/query/GridQueryProcessor.java    |  68 +++++-----
 .../schema/SchemaIndexCacheVisitorClosure.java  |  14 +-
 .../schema/SchemaIndexCacheVisitorImpl.java     |  29 ++---
 .../processors/cache/GridCacheTestEntryEx.java  |   2 +-
 ...IgniteClientCacheInitializationFailTest.java |  12 +-
 .../processors/query/h2/IgniteH2Indexing.java   |  68 +++++-----
 .../query/h2/database/H2PkHashIndex.java        |   5 +-
 .../query/h2/database/H2RowFactory.java         |   6 +-
 .../query/h2/opt/GridH2KeyRowOnheap.java        |   6 +-
 .../query/h2/opt/GridH2KeyValueRowOnheap.java   |  35 ++---
 .../processors/query/h2/opt/GridH2Row.java      |  59 +++------
 .../query/h2/opt/GridH2RowDescriptor.java       |  24 +---
 .../processors/query/h2/opt/GridH2Table.java    |  28 ++--
 .../cache/IgniteCacheAbstractQuerySelfTest.java |  13 +-
 .../cache/index/H2DynamicTableSelfTest.java     |  43 ++++++
 ...teSqlSkipReducerOnUpdateDmlFlagSelfTest.java |  17 +++
 .../ignite/logger/log4j2/Log4J2Logger.java      | 130 ++++++++-----------
 .../log4j2/GridLog4j2CorrectFileNameTest.java   |  94 --------------
 .../log4j2/GridLog4j2InitializedTest.java       |  77 -----------
 .../log4j2/GridLog4j2LoggingFileTest.java       |  68 ----------
 .../logger/log4j2/Log4j2LoggerSelfTest.java     |   7 +
 .../log4j2/Log4j2LoggerVerboseModeSelfTest.java |  71 ++++++----
 .../testsuites/IgniteLog4j2TestSuite.java       |   2 +
 28 files changed, 349 insertions(+), 660 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e0897f13/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/e0897f13/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/e0897f13/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/e0897f13/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/e0897f13/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/e0897f13/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Row.java
----------------------------------------------------------------------
diff --cc modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Row.java
index cdfc7cb,8b1b711..54e0417
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Row.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Row.java
@@@ -104,21 -83,6 +83,21 @@@ public abstract class GridH2Row extend
  
      /** {@inheritDoc} */
      @Override public int cacheId() {
-         return 0;
+         return row.cacheId();
      }
 +
 +    /** {@inheritDoc} */
 +    @Override public long mvccCoordinatorVersion() {
 +        throw new UnsupportedOperationException();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public long mvccCounter() {
 +        throw new UnsupportedOperationException();
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean removed() {
 +        throw new UnsupportedOperationException();
 +    }
  }


[4/4] ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-3478-idx' into ignite-5937

Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-3478-idx' into ignite-5937


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

Branch: refs/heads/ignite-5937
Commit: f0cad9f8997f01f5c7a78e7a93a4955f085b8edb
Parents: 47ef5c8 68cd93d
Author: sboikov <sb...@gridgain.com>
Authored: Tue Oct 17 13:15:27 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Oct 17 13:15:27 2017 +0300

----------------------------------------------------------------------
 .../processors/query/h2/opt/GridH2Table.java    | 33 +++++++++++---------
 1 file changed, 19 insertions(+), 14 deletions(-)
----------------------------------------------------------------------