ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [9/9] ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-3477' into ignite-db-x-opt
Date Wed, 18 Jan 2017 15:27:45 GMT
Merge remote-tracking branch 'remotes/origin/ignite-3477' into ignite-db-x-opt

# Conflicts:
#	modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java
#	modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
#	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapImpl.java
#	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
#	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/MetadataStorage.java
#	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/FreeListImpl.java
#	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/BPlusTree.java
#	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
#	modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java
#	modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2Tree.java
#	modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java


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

Branch: refs/heads/ignite-db-x-opt
Commit: a5400910283314f620e9305b66dd51aa9854a73a
Parents: ae511af
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Jan 18 18:27:33 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Jan 18 18:27:33 2017 +0300

----------------------------------------------------------------------
 .../cache/IgniteCacheOffheapManagerImpl.java    |  4 ++++
 .../cache/database/CacheDataRowAdapter.java     |  2 +-
 .../cache/database/tree/io/DataPageIO.java      |  2 --
 .../cache/IgniteSqlQueryPutBenchmark.java       | 25 ++++++++++++++++++--
 4 files changed, 28 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a5400910/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 ca35b5d..7bde2f3 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
@@ -903,8 +903,12 @@ public class IgniteCacheOffheapManagerImpl extends GridCacheManagerAdapter
imple
                 throw new NodeStoppingException("Operation has been cancelled (node is stopping).");
 
             try {
+                CacheStatistics.opStart(PutStatistic.Ops.STORE_ADD);
+
                 rowStore.addRow(dataRow);
 
+                CacheStatistics.opEnd(PutStatistic.Ops.STORE_ADD);
+
                 assert dataRow.link() != 0 : dataRow;
 
                 cctx.stats().opStart(TREE_PUT);

http://git-wip-us.apache.org/repos/asf/ignite/blob/a5400910/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/CacheDataRowAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/CacheDataRowAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/CacheDataRowAdapter.java
index 710348e..5288aad 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/CacheDataRowAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/CacheDataRowAdapter.java
@@ -58,7 +58,7 @@ public class CacheDataRowAdapter implements CacheDataRow {
     protected CacheObject val;
 
     /** */
-    protected long expireTime;
+    protected long expireTime = -1;
 
     /** */
     @GridToStringInclude

http://git-wip-us.apache.org/repos/asf/ignite/blob/a5400910/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
index 821dd53..548e300 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
@@ -29,8 +29,6 @@ import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.processors.cache.database.CacheDataRow;
 import org.apache.ignite.internal.processors.cache.database.tree.util.PageHandler;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
-import org.apache.ignite.internal.util.CacheStatistics;
-import org.apache.ignite.internal.util.PutStatistic;
 import org.apache.ignite.internal.util.typedef.internal.SB;
 
 /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/a5400910/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryPutBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryPutBenchmark.java
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryPutBenchmark.java
index cf194e4..dfa4cbc 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryPutBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryPutBenchmark.java
@@ -48,9 +48,30 @@ public class IgniteSqlQueryPutBenchmark extends IgniteCacheAbstractBenchmark<Int
     @Override public boolean test(Map<Object, Object> ctx) throws Exception {
         ThreadLocalRandom rnd = ThreadLocalRandom.current();
 
-        int i = rnd.nextInt(args.range());
+        if (rnd.nextBoolean()) {
+            double salary = rnd.nextDouble() * args.range() * 1000;
 
-        cache.put(i, new Person(i, "firstName" + i, "lastName" + i, i * 1000));
+            double maxSalary = salary + 1000;
+
+            Collection<Cache.Entry<Integer, Object>> entries = executeQuery(salary,
maxSalary);
+
+            for (Cache.Entry<Integer, Object> entry : entries) {
+                Person p = (Person)entry.getValue();
+
+                if (p.getSalary() < salary || p.getSalary() > maxSalary)
+                    throw new Exception("Invalid person retrieved [min=" + salary + ", max="
+ maxSalary +
+                            ", person=" + p + ']');
+            }
+
+            qryCnt.getAndIncrement();
+        }
+        else {
+            int i = rnd.nextInt(args.range());
+
+            cache.put(i, new Person(i, "firstName" + i, "lastName" + i, i * 1000));
+
+            putCnt.getAndIncrement();
+        }
 
         return true;
     }


Mime
View raw message