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 2015/11/12 09:33:10 UTC
[01/10] ignite git commit: Disabled failing tests.
Repository: ignite
Updated Branches:
refs/heads/ignite-1758-debug 70ed06ea1 -> 79809a1af
Disabled failing tests.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d567d259
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d567d259
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d567d259
Branch: refs/heads/ignite-1758-debug
Commit: d567d2595cc95c5a27e43d1331b9dd523dc67be7
Parents: 3de9d47
Author: sboikov <sb...@gridgain.com>
Authored: Wed Nov 11 10:19:48 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Nov 11 10:19:48 2015 +0300
----------------------------------------------------------------------
.../dht/IgniteCachePutRetryTransactionalSelfTest.java | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/d567d259/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
index f61faf2..7655464 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
@@ -88,6 +88,16 @@ public class IgniteCachePutRetryTransactionalSelfTest extends IgniteCachePutRetr
}
}
+ /** {@inheritDoc} */
+ @Override public void testGetAndPut() throws Exception {
+ fail("https://issues.apache.org/jira/browse/IGNITE-1525");
+ }
+
+ /** {@inheritDoc} */
+ @Override public void testInvoke() throws Exception {
+ fail("https://issues.apache.org/jira/browse/IGNITE-1525");
+ }
+
/**
* @throws Exception If failed.
*/
[03/10] ignite git commit: IGNITE-1888 Start
org.apache.ignite.yardstick.IgniteNode with Spring Application context.
Posted by sb...@apache.org.
IGNITE-1888 Start org.apache.ignite.yardstick.IgniteNode with Spring Application context.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/92881e07
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/92881e07
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/92881e07
Branch: refs/heads/ignite-1758-debug
Commit: 92881e07a561f25db5edd29ca5b9adc2c060d4b5
Parents: 6b158c9
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Wed Nov 11 14:29:22 2015 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Wed Nov 11 14:29:22 2015 +0700
----------------------------------------------------------------------
.../org/apache/ignite/yardstick/IgniteNode.java | 23 ++++++++++++++------
1 file changed, 16 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/92881e07/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
index ea3bd07..93c80d3 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
@@ -22,6 +22,7 @@ import java.net.URL;
import java.util.Map;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteSpring;
import org.apache.ignite.Ignition;
import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
import org.apache.ignite.configuration.CacheConfiguration;
@@ -30,9 +31,11 @@ import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.configuration.NearCacheConfiguration;
import org.apache.ignite.configuration.TransactionConfiguration;
import org.apache.ignite.internal.util.IgniteUtils;
+import org.apache.ignite.lang.IgniteBiTuple;
import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
+import org.springframework.context.ApplicationContext;
import org.springframework.context.support.GenericApplicationContext;
import org.springframework.core.io.UrlResource;
import org.yardstickframework.BenchmarkConfiguration;
@@ -73,15 +76,20 @@ public class IgniteNode implements BenchmarkServer {
BenchmarkUtils.jcommander(cfg.commandLineArguments(), args, "<ignite-node>");
- IgniteConfiguration c = loadConfiguration(args.configuration());
+ IgniteBiTuple<IgniteConfiguration, ? extends ApplicationContext> tup = loadConfiguration(args.configuration());
+
+ IgniteConfiguration c = tup.get1();
assert c != null;
+ ApplicationContext appCtx = tup.get2();
+
+ assert appCtx != null;
+
for (CacheConfiguration cc : c.getCacheConfiguration()) {
// IgniteNode can not run in CLIENT_ONLY mode,
// except the case when it's used inside IgniteAbstractBenchmark.
- boolean cl = args.isClientOnly() && !args.isNearCache() && !clientMode ?
- false : args.isClientOnly();
+ boolean cl = args.isClientOnly() && (args.isNearCache() || clientMode);
if (cl)
c.setClientMode(true);
@@ -141,15 +149,16 @@ public class IgniteNode implements BenchmarkServer {
c.setCommunicationSpi(commSpi);
- ignite = Ignition.start(c);
+ ignite = IgniteSpring.start(c, appCtx);
}
/**
* @param springCfgPath Spring configuration file path.
- * @return Grid configuration.
+ * @return Tuple with grid configuration and Spring application context.
* @throws Exception If failed.
*/
- private static IgniteConfiguration loadConfiguration(String springCfgPath) throws Exception {
+ private static IgniteBiTuple<IgniteConfiguration, ? extends ApplicationContext> loadConfiguration(String springCfgPath)
+ throws Exception {
URL url;
try {
@@ -191,7 +200,7 @@ public class IgniteNode implements BenchmarkServer {
if (cfgMap == null || cfgMap.isEmpty())
throw new Exception("Failed to find ignite configuration in: " + url);
- return cfgMap.values().iterator().next();
+ return new IgniteBiTuple<>(cfgMap.values().iterator().next(), springCtx);
}
/** {@inheritDoc} */
[08/10] ignite git commit: ignite-1.5 Added descriptions for missing
options and sort them alphabetically.
Posted by sb...@apache.org.
ignite-1.5 Added descriptions for missing options and sort them alphabetically.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1f5a409c
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1f5a409c
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1f5a409c
Branch: refs/heads/ignite-1758-debug
Commit: 1f5a409cc138b7df396bcc78ab166b0b366ad7d6
Parents: 55c227a
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Thu Nov 12 10:00:05 2015 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Thu Nov 12 10:00:05 2015 +0700
----------------------------------------------------------------------
modules/yardstick/README.txt | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/1f5a409c/modules/yardstick/README.txt
----------------------------------------------------------------------
diff --git a/modules/yardstick/README.txt b/modules/yardstick/README.txt
index 8cbe3cf..0b8e678 100644
--- a/modules/yardstick/README.txt
+++ b/modules/yardstick/README.txt
@@ -54,21 +54,23 @@ and command line arguments for running Yardstick scripts.
The following Ignite benchmark properties can be defined in the benchmark configuration:
-* `-nn <num>` or `--nodeNumber <num>` - Number of nodes (automatically set in `benchmark.properties`), used to wait for the specified number of nodes to start
* `-b <num>` or `--backups <num>` - Number of backups for every key
* `-cfg <path>` or `--Config <path>` - Path to Ignite configuration file
-* `-sm <mode>` or `-syncMode <mode>` - Synchronization mode (defined in `CacheWriteSynchronizationMode`)
+* `-cs` or `--cacheStore` - Enable or disable cache store readThrough, writeThrough
* `-cl` or `--client` - Client flag
* `-nc` or `--nearCache` - Near cache flag
-* `-wom <mode>` or `--writeOrderMode <mode>` - Write order mode for ATOMIC caches (defined in `CacheAtomicWriteOrderMode`)
-* `-txc <value>` or `--txConcurrency <value>` - Cache transaction concurrency control, either `OPTIMISTIC` or `PESSIMISTIC` (defined in `CacheTxConcurrency`)
-* `-txi <value>` or `--txIsolation <value>` - Cache transaction isolation (defined in `CacheTxIsolation`)
+* `-nn <num>` or `--nodeNumber <num>` - Number of nodes (automatically set in `benchmark.properties`), used to wait for the specified number of nodes to start
+* `-sm <mode>` or `-syncMode <mode>` - Synchronization mode (defined in `CacheWriteSynchronizationMode`)
* `-ot` or `--offheapTiered` - Flag indicating whether tiered off-heap mode is on
* `-ov` or `--offheapValuesOnly` - Flag indicating whether off-heap mode is on and only cache values are stored off-heap
-* `-rtp <num>` or `--restPort <num>` - REST TCP port, indicates that a Ignite node is ready to process Ignite Clients
+* `-r <num>` or `--range` - Range of keys that are randomly generated for cache operations
* `-rth <host>` or `--restHost <host>` - REST TCP host
+* `-rtp <num>` or `--restPort <num>` - REST TCP port, indicates that a Ignite node is ready to process Ignite Clients
* `-ss` or `--syncSend` - Flag indicating whether synchronous send is used in `TcpCommunicationSpi`
-* `-r <num>` or `--range` - Range of keys that are randomly generated for cache operations
+* `-txc <value>` or `--txConcurrency <value>` - Cache transaction concurrency control, either `OPTIMISTIC` or `PESSIMISTIC` (defined in `CacheTxConcurrency`)
+* `-txi <value>` or `--txIsolation <value>` - Cache transaction isolation (defined in `CacheTxIsolation`)
+* `-wb` or `--writeBehind` - Enable or disable writeBehind for cache store
+* `-wom <mode>` or `--writeOrderMode <mode>` - Write order mode for ATOMIC caches (defined in `CacheAtomicWriteOrderMode`)
For example if we need to run 2 `IgniteNode` servers on localhost with `PutBenchmark` benchmark on localhost,
with number of backups set to 1, synchronization mode set to `PRIMARY_SYNC`, then the following configuration
[07/10] ignite git commit: ignite-1.5 Update store benchmark config.
Posted by sb...@apache.org.
ignite-1.5 Update store benchmark config.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/55c227a5
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/55c227a5
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/55c227a5
Branch: refs/heads/ignite-1758-debug
Commit: 55c227a5920223c30be73b304e98dfc34ea8f998
Parents: 8cc9fa4
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Thu Nov 12 09:45:39 2015 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Thu Nov 12 09:45:39 2015 +0700
----------------------------------------------------------------------
.../yardstick/config/benchmark-store.properties | 86 ++++++++++++--------
1 file changed, 50 insertions(+), 36 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/55c227a5/modules/yardstick/config/benchmark-store.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-store.properties b/modules/yardstick/config/benchmark-store.properties
index bda136e..746fa11 100644
--- a/modules/yardstick/config/benchmark-store.properties
+++ b/modules/yardstick/config/benchmark-store.properties
@@ -1,4 +1,3 @@
-#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
@@ -13,7 +12,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-#
#
# Contains all benchmarks for:
@@ -28,36 +26,40 @@ JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
# Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.
JVM_OPTS=${JVM_OPTS}" \
- -Xloggc:./gc${now0}.log \
- -XX:+PrintGCDetails \
- -verbose:gc \
- -XX:+UseParNewGC \
- -XX:+UseConcMarkSweepGC \
- -XX:+UseTLAB \
- -XX:NewSize=128m \
- -XX:MaxNewSize=128m \
- -XX:MaxTenuringThreshold=0 \
- -XX:SurvivorRatio=1024 \
- -XX:+UseCMSInitiatingOccupancyOnly \
- -XX:CMSInitiatingOccupancyFraction=60 \
+-Xloggc:./gc${now0}.log \
+-XX:+PrintGCDetails \
+-verbose:gc \
+-XX:+UseParNewGC \
+-XX:+UseConcMarkSweepGC \
+-XX:+UseTLAB \
+-XX:NewSize=128m \
+-XX:MaxNewSize=128m \
+-XX:MaxTenuringThreshold=0 \
+-XX:SurvivorRatio=1024 \
+-XX:+UseCMSInitiatingOccupancyOnly \
+-XX:CMSInitiatingOccupancyFraction=60 \
"
+#Ignite version
+ver="RELEASE-"
+
# List of default probes.
# Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
-BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe
+BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe,DStatProbe
# Packages where the specified benchmark is searched by reflection mechanism.
BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick
+# Restart servers for each benchmark.
RESTART_SERVERS=true
# Probe point writer class name.
# BENCHMARK_WRITER=
-# Comma-separated list of the hosts to run BenchmarkServers on. 2 nodes on local host are enabled by default.
+# Comma-separated list of the hosts to run BenchmarkServers on.
SERVER_HOSTS=localhost
-# Comma-separated list of the hosts to run BenchmarkDrivers on. 1 node on local host is enabled by default.
+# Comma-separated list of the hosts to run BenchmarkDrivers on.
DRIVER_HOSTS=localhost
# Remote username.
@@ -66,27 +68,39 @@ DRIVER_HOSTS=localhost
# Number of nodes, used to wait for the specified number of nodes to start.
nodesNum=$((`echo ${SERVER_HOSTS} | tr ',' '\n' | wc -l` + `echo ${DRIVER_HOSTS} | tr ',' '\n' | wc -l`))
-# Each benchmark warm_up set to 60 seconds (1 minute).
-warm_up=60
+# Backups count.
+b=1
+
+# Warmup.
+w=60
+
+# Duration.
+d=300
+
+# Threads count.
+t=64
+
+# Sync mode.
+sm=PRIMARY_SYNC
-# Each benchmark run set to 300 seconds (5 mins).
-run=300
+# Jobs.
+j=10
# Run configuration which contains all benchmarks.
CONFIGS="\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStoreGetBenchmark -sn IgniteNode -ds atomic-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStoreGetBenchmark -sn IgniteNode -cs -ds atomic-store-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStoreGetBenchmark -sn IgniteNode -cs -wb -ds atomic-writeBehind-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStoreGetTxBenchmark -sn IgniteNode -ds tx-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStoreGetTxBenchmark -sn IgniteNode -cs -ds tx-store-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutBenchmark -sn IgniteNode -ds atomic-put,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutBenchmark -sn IgniteNode -cs -ds atomic-store-put,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutBenchmark -sn IgniteNode -cs -wb -ds atomic-writeBehind-put,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutTxBenchmark -sn IgniteNode -ds tx-put,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutTxBenchmark -sn IgniteNode -cs -ds tx-store-put,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutGetBenchmark -sn IgniteNode -ds atomic-put-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutGetBenchmark -sn IgniteNode -cs -ds atomic-store-put-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutGetBenchmark -sn IgniteNode -cs -wb -ds atomic-writeBehind-put-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutGetTxBenchmark -sn IgniteNode -ds tx-put-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutGetTxBenchmark -sn IgniteNode -cs -ds tx-store-put-get\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStoreGetBenchmark -sn IgniteNode -ds atomic-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStoreGetBenchmark -sn IgniteNode -cs -ds atomic-store-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStoreGetBenchmark -sn IgniteNode -cs -wb -ds atomic-writeBehind-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStoreGetTxBenchmark -sn IgniteNode -ds tx-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStoreGetTxBenchmark -sn IgniteNode -cs -ds tx-store-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutBenchmark -sn IgniteNode -ds atomic-put,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutBenchmark -sn IgniteNode -cs -ds atomic-store-put,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutBenchmark -sn IgniteNode -cs -wb -ds atomic-writeBehind-put,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutTxBenchmark -sn IgniteNode -ds tx-put,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutTxBenchmark -sn IgniteNode -cs -ds tx-store-put,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutGetBenchmark -sn IgniteNode -ds atomic-put-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutGetBenchmark -sn IgniteNode -cs -ds atomic-store-put-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutGetBenchmark -sn IgniteNode -cs -wb -ds atomic-writeBehind-put-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutGetTxBenchmark -sn IgniteNode -ds tx-put-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutGetTxBenchmark -sn IgniteNode -cs -ds tx-store-put-get\
"
[10/10] ignite git commit: ignite-1758 Discovery fixes.
Posted by sb...@apache.org.
ignite-1758 Discovery fixes.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/79809a1a
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/79809a1a
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/79809a1a
Branch: refs/heads/ignite-1758-debug
Commit: 79809a1af6cfe40828736322bafbc009fb5b96ee
Parents: 52bb959
Author: sboikov <sb...@gridgain.com>
Authored: Thu Nov 12 11:33:00 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Nov 12 11:33:00 2015 +0300
----------------------------------------------------------------------
.../ignite/spi/discovery/tcp/ServerImpl.java | 145 ++++++++++++-------
.../tcp/internal/TcpDiscoveryNodesRing.java | 1 +
.../tcp/TcpDiscoveryMultiThreadedTest.java | 4 +-
.../spi/discovery/tcp/TcpDiscoverySelfTest.java | 86 ++++++++++-
4 files changed, 180 insertions(+), 56 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/79809a1a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index 13a321a..f3b3cf4 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -1785,6 +1785,8 @@ class ServerImpl extends TcpDiscoveryImpl {
TcpDiscoveryNode failedNode = ring.node(nodeId);
if (failedNode != null) {
+ assert !failedNode.isLocal() : msg;
+
synchronized (mux) {
failedNodes.add(failedNode);
}
@@ -2173,6 +2175,22 @@ class ServerImpl extends TcpDiscoveryImpl {
if (debugMode)
debugLog("Processing message [cls=" + msg.getClass().getSimpleName() + ", id=" + msg.id() + ']');
+ if (locNode.internalOrder() == 0) {
+ boolean process = false;
+
+ if (msg instanceof TcpDiscoveryNodeAddedMessage)
+ process = ((TcpDiscoveryNodeAddedMessage)msg).node().equals(locNode);
+
+ if (!process) {
+ if (log.isDebugEnabled()) {
+ log.debug("Ignore message, local node order is not initialized [msg=" + msg +
+ ", locNode=" + locNode + ']');
+ }
+
+ return;
+ }
+ }
+
spi.stats.onMessageProcessingStarted(msg);
processMessageFailedNodes(msg);
@@ -2306,50 +2324,50 @@ class ServerImpl extends TcpDiscoveryImpl {
boolean sent = false;
- boolean searchNext = true;
+ boolean newNextNode = false;
UUID locNodeId = getLocalNodeId();
while (true) {
- if (searchNext) {
- TcpDiscoveryNode newNext = ring.nextNode(failedNodes);
+ TcpDiscoveryNode newNext = ring.nextNode(failedNodes);
- if (newNext == null) {
- if (log.isDebugEnabled())
- log.debug("No next node in topology.");
-
- if (debugMode)
- debugLog("No next node in topology.");
+ if (newNext == null) {
+ if (log.isDebugEnabled())
+ log.debug("No next node in topology.");
- if (ring.hasRemoteNodes() && !(msg instanceof TcpDiscoveryConnectionCheckMessage) &&
- !(msg instanceof TcpDiscoveryStatusCheckMessage && msg.creatorNodeId().equals(locNodeId))) {
- msg.senderNodeId(locNodeId);
+ if (debugMode)
+ debugLog("No next node in topology.");
- addMessage(msg);
- }
+ if (ring.hasRemoteNodes() && !(msg instanceof TcpDiscoveryConnectionCheckMessage) &&
+ !(msg instanceof TcpDiscoveryStatusCheckMessage && msg.creatorNodeId().equals(locNodeId))) {
+ msg.senderNodeId(locNodeId);
- break;
+ addMessage(msg);
}
- if (!newNext.equals(next)) {
- if (log.isDebugEnabled())
- log.debug("New next node [newNext=" + newNext + ", formerNext=" + next +
- ", ring=" + ring + ", failedNodes=" + failedNodes + ']');
+ break;
+ }
- if (debugMode)
- debugLog("New next node [newNext=" + newNext + ", formerNext=" + next +
- ", ring=" + ring + ", failedNodes=" + failedNodes + ']');
+ if (!newNext.equals(next)) {
+ if (log.isDebugEnabled())
+ log.debug("New next node [newNext=" + newNext + ", formerNext=" + next +
+ ", ring=" + ring + ", failedNodes=" + failedNodes + ']');
- U.closeQuiet(sock);
+ if (debugMode)
+ debugLog("New next node [newNext=" + newNext + ", formerNext=" + next +
+ ", ring=" + ring + ", failedNodes=" + failedNodes + ']');
- sock = null;
+ U.closeQuiet(sock);
- next = newNext;
- }
- else if (log.isDebugEnabled())
- log.debug("Next node remains the same [nextId=" + next.id() +
- ", nextOrder=" + next.internalOrder() + ']');
+ sock = null;
+
+ next = newNext;
+
+ newNextNode = true;
}
+ else if (log.isDebugEnabled())
+ log.debug("Next node remains the same [nextId=" + next.id() +
+ ", nextOrder=" + next.internalOrder() + ']');
// Flag that shows whether next node exists and accepts incoming connections.
boolean nextNodeExists = sock != null;
@@ -2521,13 +2539,15 @@ class ServerImpl extends TcpDiscoveryImpl {
assert !forceSndPending || msg instanceof TcpDiscoveryNodeLeftMessage;
- if (failure || forceSndPending) {
+ if (newNextNode || failure || forceSndPending) {
if (log.isDebugEnabled())
log.debug("Pending messages will be sent [failure=" + failure +
+ ", newNextNode=" + newNextNode +
", forceSndPending=" + forceSndPending + ']');
if (debugMode)
debugLog("Pending messages will be sent [failure=" + failure +
+ ", newNextNode=" + newNextNode +
", forceSndPending=" + forceSndPending + ']');
for (TcpDiscoveryAbstractMessage pendingMsg : pendingMsgs) {
@@ -2585,8 +2605,11 @@ class ServerImpl extends TcpDiscoveryImpl {
timeoutHelper = new IgniteSpiOperationTimeoutHelper(spi);
if (!failedNodes.isEmpty()) {
- for (TcpDiscoveryNode node : failedNodes)
- msg.addFailedNode(node);
+ for (TcpDiscoveryNode failedNode : failedNodes) {
+ assert !failedNode.equals(next) : failedNode;
+
+ msg.addFailedNode(failedNode);
+ }
}
writeToSocket(sock, msg, timeoutHelper.nextTimeoutChunk(spi.getSocketTimeout()));
@@ -2684,8 +2707,6 @@ class ServerImpl extends TcpDiscoveryImpl {
next = null;
- searchNext = true;
-
errs = null;
}
else
@@ -2714,25 +2735,29 @@ class ServerImpl extends TcpDiscoveryImpl {
msgWorker.addMessage(new TcpDiscoveryNodeFailedMessage(locNodeId, n.id(), n.internalOrder()));
if (!sent) {
+ assert next == null : next;
+
if (log.isDebugEnabled())
log.debug("Pending messages will be resent to local node");
if (debugMode)
- log.debug("Pending messages will be resent to local node");
+ debugLog("Pending messages will be resent to local node");
for (TcpDiscoveryAbstractMessage pendingMsg : pendingMsgs) {
prepareNodeAddedMessage(pendingMsg, locNodeId, pendingMsgs.msgs, pendingMsgs.discardId,
pendingMsgs.customDiscardId);
+ pendingMsg.senderNodeId(locNodeId);
+
msgWorker.addMessage(pendingMsg);
if (log.isDebugEnabled())
log.debug("Pending message has been sent to local node [msg=" + msg.id() +
- ", pendingMsgId=" + pendingMsg + ", next=" + (next != null ? next.id() : null) + ']');
+ ", pendingMsgId=" + pendingMsg + ']');
if (debugMode)
debugLog("Pending message has been sent to local node [msg=" + msg.id() +
- ", pendingMsgId=" + pendingMsg + ", next=" + (next != null ? next.id() : null) + ']');
+ ", pendingMsgId=" + pendingMsg + ']');
}
}
@@ -3943,6 +3968,8 @@ class ServerImpl extends TcpDiscoveryImpl {
}
if (node != null) {
+ assert !node.isLocal() : msg;
+
synchronized (mux) {
failedNodes.add(node);
}
@@ -4420,27 +4447,33 @@ class ServerImpl extends TcpDiscoveryImpl {
*/
private void processCustomMessage(TcpDiscoveryCustomEventMessage msg) {
if (isLocalNodeCoordinator()) {
- if (!joiningNodes.isEmpty()) {
+ if (msg.topologyVersion() == 0L && !joiningNodes.isEmpty()) {
+ if (log.isDebugEnabled()) {
+ log.debug("Delay custom message processing, there are joining nodes [msg=" + msg +
+ ", joiningNodes=" + joiningNodes + ']');
+ }
+
pendingCustomMsgs.add(msg);
return;
}
- boolean sndNext = !msg.verified();
-
- if (sndNext) {
+ if (!msg.verified()) {
msg.verify(getLocalNodeId());
msg.topologyVersion(ring.topologyVersion());
- if (pendingMsgs.procCustomMsgs.add(msg.id()))
+ if (pendingMsgs.procCustomMsgs.add(msg.id())) {
notifyDiscoveryListener(msg);
- else
- sndNext = false;
- }
- if (sndNext && ring.hasRemoteNodes())
- sendMessageAcrossRing(msg);
+ if (sendMessageToRemotes(msg))
+ sendMessageAcrossRing(msg);
+ else
+ processCustomMessage(msg);
+ }
+ }
else {
+ addMessage(new TcpDiscoveryDiscardMessage(getLocalNodeId(), msg.id(), true));
+
spi.stats.onRingMessageReceived(msg);
DiscoverySpiCustomMessage msgObj = null;
@@ -4457,16 +4490,21 @@ class ServerImpl extends TcpDiscoveryImpl {
if (nextMsg != null) {
try {
- addMessage(new TcpDiscoveryCustomEventMessage(getLocalNodeId(), nextMsg,
- spi.marsh.marshal(nextMsg)));
+ TcpDiscoveryCustomEventMessage ackMsg = new TcpDiscoveryCustomEventMessage(
+ msg.creatorNodeId(), nextMsg, spi.marsh.marshal(nextMsg));
+
+ ackMsg.topologyVersion(msg.topologyVersion());
+
+ processCustomMessage(ackMsg);
+
+ if (ackMsg.verified())
+ msgHist.add(ackMsg);
}
catch (IgniteCheckedException e) {
U.error(log, "Failed to marshal discovery custom message.", e);
}
}
}
-
- addMessage(new TcpDiscoveryDiscardMessage(getLocalNodeId(), msg.id(), true));
}
}
else {
@@ -4484,9 +4522,8 @@ class ServerImpl extends TcpDiscoveryImpl {
}
if (msg.verified() && state0 == CONNECTED && pendingMsgs.procCustomMsgs.add(msg.id())) {
- assert joiningNodes.isEmpty() : "Joining nodes: " + joiningNodes + ", msg=" + msg + ", loc=" + locNode.id() +
- ", topver=" + ring.topologyVersion();
- assert msg.topologyVersion() == ring.topologyVersion() : "msg: " + msg + ", topver=" + ring.topologyVersion();
+ assert msg.topologyVersion() == ring.topologyVersion() :
+ "msg: " + msg + ", topver=" + ring.topologyVersion();
notifyDiscoveryListener(msg);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/79809a1a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNodesRing.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNodesRing.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNodesRing.java
index b234f40..f184fbd 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNodesRing.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNodesRing.java
@@ -451,6 +451,7 @@ public class TcpDiscoveryNodesRing {
* topology contains less than two nodes.
*/
@Nullable public TcpDiscoveryNode nextNode(@Nullable Collection<TcpDiscoveryNode> excluded) {
+ assert locNode.internalOrder() > 0 : locNode;
assert excluded == null || excluded.isEmpty() || !excluded.contains(locNode) : excluded;
rwLock.readLock().lock();
http://git-wip-us.apache.org/repos/asf/ignite/blob/79809a1a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java
index 5a01121..ac83651 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java
@@ -219,7 +219,7 @@ public class TcpDiscoveryMultiThreadedTest extends GridCommonAbstractTest {
/**
* @throws Exception If any error occurs.
*/
- public void _testMultiThreadedServersRestart() throws Throwable {
+ public void testMultiThreadedServersRestart() throws Throwable {
multiThreadedClientsServersRestart(GRID_CNT * 2, 0);
}
@@ -333,6 +333,8 @@ public class TcpDiscoveryMultiThreadedTest extends GridCommonAbstractTest {
while (!done.get() && error.get() == null) {
int stopIdx = srvStopIdxs.take();
+ U.sleep(50);
+
Thread.currentThread().setName("stop-server-" + getTestGridName(stopIdx));
log.info("Stop server: " + stopIdx);
http://git-wip-us.apache.org/repos/asf/ignite/blob/79809a1a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java
index 4218c16..379a3a6 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java
@@ -51,6 +51,8 @@ import org.apache.ignite.events.EventType;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.internal.IgniteKernal;
+import org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage;
+import org.apache.ignite.internal.processors.continuous.StartRoutineAckDiscoveryMessage;
import org.apache.ignite.internal.processors.port.GridPortRecord;
import org.apache.ignite.internal.util.io.GridByteArrayOutputStream;
import org.apache.ignite.internal.util.lang.GridAbsPredicate;
@@ -58,6 +60,7 @@ import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.G;
import org.apache.ignite.internal.util.typedef.X;
import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.lang.IgniteBiPredicate;
import org.apache.ignite.lang.IgniteInClosure;
import org.apache.ignite.lang.IgnitePredicate;
import org.apache.ignite.spi.IgniteSpiException;
@@ -110,7 +113,6 @@ public class TcpDiscoverySelfTest extends GridCommonAbstractTest {
}
/** {@inheritDoc} */
- @SuppressWarnings({"IfMayBeConditional", "deprecation"})
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
@@ -1607,6 +1609,34 @@ public class TcpDiscoverySelfTest extends GridCommonAbstractTest {
}
/**
+ * @throws Exception If failed.
+ */
+ public void testCustomEventAckNotSend() throws Exception {
+ try {
+ TestCustomerEventAckSpi spi0 = new TestCustomerEventAckSpi();
+
+ nodeSpi.set(spi0);
+
+ Ignite ignite0 = startGrid(0);
+
+ nodeSpi.set(new TestCustomerEventAckSpi());
+
+ Ignite ignite1 = startGrid(1);
+
+ spi0.stopBeforeSndAck = true;
+
+ ignite1.message().remoteListen("test", new DummyPredicate());
+
+ waitNodeStop(ignite0.name());
+
+ startGrid(2);
+ }
+ finally {
+ stopAllGrids();
+ }
+ }
+
+ /**
* @param nodeName Node name.
* @throws Exception If failed.
*/
@@ -1652,6 +1682,60 @@ public class TcpDiscoverySelfTest extends GridCommonAbstractTest {
}
/**
+ *
+ */
+ static class DummyPredicate implements IgniteBiPredicate<UUID, Object> {
+ /** {@inheritDoc} */
+ @Override public boolean apply(UUID uuid, Object o) {
+ return true;
+ }
+ }
+
+ /**
+ *
+ */
+ private static class TestCustomerEventAckSpi extends TcpDiscoverySpi {
+ /** */
+ private volatile boolean stopBeforeSndAck;
+
+ /** {@inheritDoc} */
+ @Override protected void writeToSocket(Socket sock,
+ TcpDiscoveryAbstractMessage msg,
+ GridByteArrayOutputStream bout,
+ long timeout) throws IOException, IgniteCheckedException {
+ if (stopBeforeSndAck) {
+ if (msg instanceof TcpDiscoveryCustomEventMessage) {
+ try {
+ DiscoveryCustomMessage custMsg = GridTestUtils.getFieldValue(
+ ((TcpDiscoveryCustomEventMessage)msg).message(marsh), "delegate");
+
+ if (custMsg instanceof StartRoutineAckDiscoveryMessage) {
+ log.info("Skip message send and stop node: " + msg);
+
+ sock.close();
+
+ GridTestUtils.runAsync(new Callable<Object>() {
+ @Override public Object call() throws Exception {
+ ignite.close();
+
+ return null;
+ }
+ }, "stop-node");
+
+ return;
+ }
+ }
+ catch (Throwable e) {
+ fail("Unexpected error: " + e);
+ }
+ }
+ }
+
+ super.writeToSocket(sock, msg, bout, timeout);
+ }
+ }
+
+ /**
* Simulate scenario when node detects node failure trying to send message, but node still alive.
*/
private static class TestFailedNodesSpi extends TcpDiscoverySpi {
[02/10] ignite git commit: Merge remote-tracking branch
'origin/ignite-1.5' into ignite-1.5
Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-1.5' into ignite-1.5
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6b158c9d
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6b158c9d
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6b158c9d
Branch: refs/heads/ignite-1758-debug
Commit: 6b158c9ddf61159ce8f622832713e0bc508d1fb8
Parents: d567d259 388a892
Author: sboikov <sb...@gridgain.com>
Authored: Wed Nov 11 10:20:22 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Nov 11 10:20:22 2015 +0300
----------------------------------------------------------------------
.../cache/store/CacheStoreSessionListener.java | 9 +-
.../jdbc/CacheJdbcStoreSessionListener.java | 8 +-
.../GridCachePartitionExchangeManager.java | 34 ++--
.../dht/preloader/GridDhtPartitionDemander.java | 25 ++-
.../store/GridCacheStoreManagerAdapter.java | 26 ++-
.../GridCacheAtomicReferenceImpl.java | 2 +-
.../processors/igfs/IgfsMetaManager.java | 2 +-
.../org/apache/ignite/stream/StreamAdapter.java | 2 +-
.../store/GridCacheBalancingStoreSelfTest.java | 181 ++++++++++++++++++-
...CacheAtomicReferenceApiSelfAbstractTest.java | 20 +-
modules/rest-http/pom.xml | 11 ++
.../yardstick/config/ignite-store-config.xml | 31 ++--
modules/zookeeper/pom.xml | 2 +-
13 files changed, 293 insertions(+), 60 deletions(-)
----------------------------------------------------------------------
[05/10] ignite git commit: Added tx-getAll PutAll benchmarks
Posted by sb...@apache.org.
Added tx-getAll PutAll benchmarks
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/847b616f
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/847b616f
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/847b616f
Branch: refs/heads/ignite-1758-debug
Commit: 847b616f1a15756db8876fc8f88b0629318f14c3
Parents: 967cfcb
Author: ashutak <as...@gridgain.com>
Authored: Wed Nov 11 18:35:02 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Wed Nov 11 18:35:02 2015 +0300
----------------------------------------------------------------------
.../config/benchmark-multicast.properties | 5 +-
.../ignite/yardstick/IgniteBenchmarkUtils.java | 75 ++++++++++++++++++++
.../IgniteAccountSerializableTxBenchmark.java | 11 ++-
.../cache/IgniteAccountTxBenchmark.java | 11 ++-
.../cache/IgniteGetAllPutAllTxBenchmark.java | 73 +++++++++++++++++++
...IgniteTransactionalWriteInvokeBenchmark.java | 41 +----------
.../IgniteTransactionalWriteReadBenchmark.java | 41 +----------
7 files changed, 166 insertions(+), 91 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/847b616f/modules/yardstick/config/benchmark-multicast.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-multicast.properties b/modules/yardstick/config/benchmark-multicast.properties
index 536ccf4..577d611 100644
--- a/modules/yardstick/config/benchmark-multicast.properties
+++ b/modules/yardstick/config/benchmark-multicast.properties
@@ -110,5 +110,8 @@ CONFIGS="\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryPutOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-put-offheap-1-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 100 -dn IgnitePutAllBenchmark -sn IgniteNode -ds ${ver}atomic-putAll-1-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 100 -dn IgnitePutAllTxBenchmark -sn IgniteNode -ds ${ver}tx-putAll-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 100 -dn IgnitePutAllSerializableTxBenchmark -sn IgniteNode -ds ${ver}tx-putAllSerializable-1-backup\
+-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 100 -dn IgnitePutAllSerializableTxBenchmark -sn IgniteNode -ds ${ver}tx-putAllSerializable-1-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 10 -txc OPTIMISTIC -dn IgniteGetAllPutAllTxBenchmark -sn IgniteNode -ds tx-optimistic-getAllPutAll-1-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 10 -txc PESSIMISTIC -dn IgniteGetAllPutAllTxBenchmark -sn IgniteNode -ds tx-pessimistic-getAllPutAll-1-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 10 -txc OPTIMISTIC -txi SERIALIZABLE -dn IgniteGetAllPutAllTxBenchmark -sn IgniteNode -ds tx-opt-serializable-getAllPutAll-1-backup,\
"
http://git-wip-us.apache.org/repos/asf/ignite/blob/847b616f/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkUtils.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkUtils.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkUtils.java
new file mode 100644
index 0000000..0b7568b
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkUtils.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.yardstick;
+
+import java.util.concurrent.Callable;
+import javax.cache.CacheException;
+import org.apache.ignite.IgniteTransactions;
+import org.apache.ignite.cluster.ClusterTopologyException;
+import org.apache.ignite.transactions.Transaction;
+import org.apache.ignite.transactions.TransactionConcurrency;
+import org.apache.ignite.transactions.TransactionIsolation;
+import org.apache.ignite.transactions.TransactionOptimisticException;
+import org.apache.ignite.transactions.TransactionRollbackException;
+
+/**
+ * Utils.
+ */
+public class IgniteBenchmarkUtils {
+ /**
+ * Utility class constructor.
+ */
+ private IgniteBenchmarkUtils() {
+ // No-op.
+ }
+
+ /**
+ * @param igniteTx Ignite transaction.
+ * @param txConcurrency Transaction concurrency.
+ * @param clo Closure.
+ * @return Result of closure execution.
+ * @throws Exception
+ */
+ public static <T> T doInTransaction(IgniteTransactions igniteTx, TransactionConcurrency txConcurrency,
+ TransactionIsolation txIsolation, Callable<T> clo) throws Exception {
+ while (true) {
+ try (Transaction tx = igniteTx.txStart(txConcurrency, txIsolation)) {
+ T res = clo.call();
+
+ tx.commit();
+
+ return res;
+ }
+ catch (CacheException e) {
+ if (e.getCause() instanceof ClusterTopologyException) {
+ ClusterTopologyException topEx = (ClusterTopologyException)e.getCause();
+
+ topEx.retryReadyFuture().get();
+ }
+ else
+ throw e;
+ }
+ catch (ClusterTopologyException e) {
+ e.retryReadyFuture().get();
+ }
+ catch (TransactionRollbackException | TransactionOptimisticException ignore) {
+ // Safe to retry right away.
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/847b616f/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteAccountSerializableTxBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteAccountSerializableTxBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteAccountSerializableTxBenchmark.java
index 32e7653..ecb6727 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteAccountSerializableTxBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteAccountSerializableTxBenchmark.java
@@ -31,21 +31,20 @@ import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE;
*
*/
public class IgniteAccountSerializableTxBenchmark extends IgniteAccountTxAbstractBenchmark {
- /** */
- private static final int ACCOUNT_NUMBER = 3;
-
/** {@inheritDoc} */
@Override public boolean test(Map<Object, Object> ctx) throws Exception {
Set<Integer> accountIds = new HashSet<>();
- while (accountIds.size() < ACCOUNT_NUMBER)
+ int accNum = args.batch();
+
+ while (accountIds.size() < accNum)
accountIds.add(nextRandom(args.range()));
while (true) {
try (Transaction tx = txs.txStart(OPTIMISTIC, SERIALIZABLE)) {
Map<Integer, Account> accounts = (Map)cache.getAll(accountIds);
- if (accounts.size() != ACCOUNT_NUMBER)
+ if (accounts.size() != accNum)
throw new Exception("Failed to find accounts: " + accountIds);
Integer fromId = accountIds.iterator().next();
@@ -78,4 +77,4 @@ public class IgniteAccountSerializableTxBenchmark extends IgniteAccountTxAbstrac
return true;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/847b616f/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteAccountTxBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteAccountTxBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteAccountTxBenchmark.java
index 78e675e..de332c1 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteAccountTxBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteAccountTxBenchmark.java
@@ -30,21 +30,20 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
*
*/
public class IgniteAccountTxBenchmark extends IgniteAccountTxAbstractBenchmark {
- /** */
- private static final int ACCOUNT_NUMBER = 3;
-
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override public boolean test(Map<Object, Object> ctx) throws Exception {
Set<Integer> accountIds = new TreeSet<>();
- while (accountIds.size() < ACCOUNT_NUMBER)
+ int accNum = args.batch();
+
+ while (accountIds.size() < accNum)
accountIds.add(nextRandom(args.range()));
try (Transaction tx = txs.txStart(PESSIMISTIC, REPEATABLE_READ)) {
Map<Integer, Account> accounts = (Map)cache.getAll(accountIds);
- if (accounts.size() != ACCOUNT_NUMBER)
+ if (accounts.size() != accNum)
throw new Exception("Failed to find accounts: " + accountIds);
Integer fromId = accountIds.iterator().next();
@@ -71,4 +70,4 @@ public class IgniteAccountTxBenchmark extends IgniteAccountTxAbstractBenchmark {
return true;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/847b616f/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetAllPutAllTxBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetAllPutAllTxBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetAllPutAllTxBenchmark.java
new file mode 100644
index 0000000..a8f6d7b
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetAllPutAllTxBenchmark.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.yardstick.cache;
+
+import java.util.Map;
+import java.util.SortedMap;
+import java.util.TreeMap;
+import java.util.concurrent.Callable;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteTransactions;
+import org.yardstickframework.BenchmarkConfiguration;
+
+import static org.apache.ignite.yardstick.IgniteBenchmarkUtils.doInTransaction;
+
+/**
+ * Ignite benchmark that performs transactional putAll operations.
+ */
+public class IgniteGetAllPutAllTxBenchmark extends IgniteCacheAbstractBenchmark<Integer, Integer> {
+ /** */
+ private IgniteTransactions txs;
+
+ /** {@inheritDoc} */
+ @Override public void setUp(BenchmarkConfiguration cfg) throws Exception {
+ super.setUp(cfg);
+
+ txs = ignite().transactions();
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean test(Map<Object, Object> ctx) throws Exception {
+ final ThreadRange r = threadRange();
+
+ doInTransaction(txs, args.txConcurrency(), args.txIsolation(), new Callable<Void>() {
+ @Override public Void call() throws Exception {
+ SortedMap<Integer, Integer> vals = new TreeMap<>();
+
+ for (int i = 0; i < args.batch(); i++) {
+ int key = r.nextRandom();
+
+ vals.put(key, key);
+ }
+
+ cache.getAll(vals.keySet());
+
+ cache.putAll(vals);
+
+ return null;
+ }
+ });
+
+ return true;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteCache<Integer, Integer> cache() {
+ return ignite().cache("tx");
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/847b616f/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteInvokeBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteInvokeBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteInvokeBenchmark.java
index 1a8ee14..2c4050b 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteInvokeBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteInvokeBenchmark.java
@@ -22,17 +22,13 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Callable;
-import javax.cache.CacheException;
import javax.cache.processor.EntryProcessorException;
import javax.cache.processor.MutableEntry;
-import org.apache.ignite.Ignite;
import org.apache.ignite.cache.CacheEntryProcessor;
-import org.apache.ignite.cluster.ClusterTopologyException;
-import org.apache.ignite.transactions.Transaction;
-import org.apache.ignite.transactions.TransactionRollbackException;
import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
+import static org.apache.ignite.yardstick.IgniteBenchmarkUtils.doInTransaction;
import static org.yardstickframework.BenchmarkUtils.println;
/**
@@ -63,7 +59,7 @@ public class IgniteTransactionalWriteInvokeBenchmark extends IgniteFailoverAbstr
final int scenario = nextRandom(2);
- return doInTransaction(ignite(), new Callable<Boolean>() {
+ return doInTransaction(ignite().transactions(), PESSIMISTIC, REPEATABLE_READ, new Callable<Boolean>() {
@Override public Boolean call() throws Exception {
final int timeout = args.cacheOperationTimeoutMillis();
@@ -127,39 +123,6 @@ public class IgniteTransactionalWriteInvokeBenchmark extends IgniteFailoverAbstr
});
}
- /**
- * @param ignite Ignite instance.
- * @param clo Closure.
- * @return Result of closure execution.
- * @throws Exception
- */
- public static <T> T doInTransaction(Ignite ignite, Callable<T> clo) throws Exception {
- while (true) {
- try (Transaction tx = ignite.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
- T res = clo.call();
-
- tx.commit();
-
- return res;
- }
- catch (CacheException e) {
- if (e.getCause() instanceof ClusterTopologyException) {
- ClusterTopologyException topEx = (ClusterTopologyException)e.getCause();
-
- topEx.retryReadyFuture().get();
- }
- else
- throw e;
- }
- catch (ClusterTopologyException e) {
- e.retryReadyFuture().get();
- }
- catch (TransactionRollbackException ignore) {
- // Safe to retry right away.
- }
- }
- }
-
/** {@inheritDoc} */
@Override protected String cacheName() {
return "tx-write-invoke";
http://git-wip-us.apache.org/repos/asf/ignite/blob/847b616f/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteReadBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteReadBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteReadBenchmark.java
index c962749..f278e8a 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteReadBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteReadBenchmark.java
@@ -22,14 +22,10 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Callable;
-import javax.cache.CacheException;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.cluster.ClusterTopologyException;
-import org.apache.ignite.transactions.Transaction;
-import org.apache.ignite.transactions.TransactionRollbackException;
import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
+import static org.apache.ignite.yardstick.IgniteBenchmarkUtils.doInTransaction;
import static org.yardstickframework.BenchmarkUtils.println;
/**
@@ -51,7 +47,7 @@ public class IgniteTransactionalWriteReadBenchmark extends IgniteFailoverAbstrac
for (int i = 0; i < keys.length; i++)
keys[i] = "key-" + k + "-" + i;
- return doInTransaction(ignite(), new Callable<Boolean>() {
+ return doInTransaction(ignite().transactions(), PESSIMISTIC, REPEATABLE_READ, new Callable<Boolean>() {
@Override public Boolean call() throws Exception {
Map<String, Long> map = new HashMap<>();
@@ -101,39 +97,6 @@ public class IgniteTransactionalWriteReadBenchmark extends IgniteFailoverAbstrac
});
}
- /**
- * @param ignite Ignite instance.
- * @param clo Closure.
- * @return Result of closure execution.
- * @throws Exception
- */
- public static <T> T doInTransaction(Ignite ignite, Callable<T> clo) throws Exception {
- while (true) {
- try (Transaction tx = ignite.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
- T res = clo.call();
-
- tx.commit();
-
- return res;
- }
- catch (CacheException e) {
- if (e.getCause() instanceof ClusterTopologyException) {
- ClusterTopologyException topEx = (ClusterTopologyException)e.getCause();
-
- topEx.retryReadyFuture().get();
- }
- else
- throw e;
- }
- catch (ClusterTopologyException e) {
- e.retryReadyFuture().get();
- }
- catch (TransactionRollbackException ignore) {
- // Safe to retry right away.
- }
- }
- }
-
/** {@inheritDoc} */
@Override protected String cacheName() {
return "tx-write-read";
[04/10] ignite git commit: IGNITE-1681: loadAll threshold is not
configurable for CacheStoreBalancingWrapper
Posted by sb...@apache.org.
IGNITE-1681: loadAll threshold is not configurable for CacheStoreBalancingWrapper
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/967cfcbb
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/967cfcbb
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/967cfcbb
Branch: refs/heads/ignite-1758-debug
Commit: 967cfcbb5b87e172a48e619b18e3988f4ef2e428
Parents: 92881e0
Author: Michael Griggs <en...@gmail.com>
Authored: Wed Nov 11 13:45:48 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Wed Nov 11 13:45:48 2015 +0300
----------------------------------------------------------------------
.../configuration/CacheConfiguration.java | 37 ++++++++++++++
.../cache/CacheStoreBalancingWrapper.java | 5 +-
.../store/GridCacheStoreManagerAdapter.java | 3 +-
.../store/GridCacheBalancingStoreSelfTest.java | 53 +++++++++++++++++---
4 files changed, 88 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/967cfcbb/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
index b7276c9..1b8d41c 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
@@ -174,9 +174,15 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
/** Default size for onheap SQL row cache size. */
public static final int DFLT_SQL_ONHEAP_ROW_CACHE_SIZE = 10 * 1024;
+ /** Default threshold for concurrent loading of keys from {@link CacheStore}. */
+ public static final int DFLT_CONCURRENT_LOAD_ALL_THRESHOLD = 5;
+
/** Cache name. */
private String name;
+ /** Threshold for concurrent loading of keys from {@link CacheStore}. */
+ private int storeConcurrentLoadAllThreshold = DFLT_CONCURRENT_LOAD_ALL_THRESHOLD;
+
/** Rebalance thread pool size. */
@Deprecated
private int rebalancePoolSize = DFLT_REBALANCE_THREAD_POOL_SIZE;
@@ -834,6 +840,37 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
}
/**
+ * Gets the threshold used in cases when values for multiple keys are being loaded from an underlying
+ * {@link CacheStore} in parallel. In the situation when several threads load the same or intersecting set of keys
+ * and the total number of keys to load is less or equal to this threshold then there will be no a second call to
+ * the storage in order to load a key from thread A if the same key is already being loaded by thread B.
+ *
+ * The threshold should be controlled wisely. On the one hand if it's set to a big value then the interaction with
+ * a storage during the load of missing keys will be minimal. On the other hand the big value may result in
+ * significant performance degradation because it is needed to check for every key whether it's being loaded or not.
+ *
+ * When not set, default value is {@link #DFLT_CONCURRENT_LOAD_ALL_THRESHOLD}.
+ *
+ * @return The concurrent load-all threshold.
+ */
+ public int getStoreConcurrentLoadAllThreshold() {
+ return storeConcurrentLoadAllThreshold;
+ }
+
+ /**
+ * Sets the concurrent load-all threshold used for cases when keys' values are being loaded from {@link CacheStore}
+ * in parallel.
+ *
+ * @param storeConcurrentLoadAllThreshold The concurrent load-all threshold.
+ * @return {@code this} for chaining.
+ */
+ public CacheConfiguration<K, V> setStoreConcurrentLoadAllThreshold(int storeConcurrentLoadAllThreshold) {
+ this.storeConcurrentLoadAllThreshold = storeConcurrentLoadAllThreshold;
+
+ return this;
+ }
+
+ /**
* Gets key topology resolver to provide mapping from keys to nodes.
*
* @return Key topology resolver to provide mapping from keys to nodes.
http://git-wip-us.apache.org/repos/asf/ignite/blob/967cfcbb/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheStoreBalancingWrapper.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheStoreBalancingWrapper.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheStoreBalancingWrapper.java
index 93075f3..8992326 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheStoreBalancingWrapper.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheStoreBalancingWrapper.java
@@ -28,6 +28,7 @@ import javax.cache.integration.CacheLoaderException;
import javax.cache.integration.CacheWriterException;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.cache.store.CacheStore;
+import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.internal.util.future.GridFutureAdapter;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.lang.IgniteBiInClosure;
@@ -39,7 +40,7 @@ import org.jsr166.ConcurrentHashMap8;
*/
public class CacheStoreBalancingWrapper<K, V> implements CacheStore<K, V> {
/** */
- public static final int DFLT_LOAD_ALL_THRESHOLD = 5;
+ public static final int DFLT_LOAD_ALL_THRESHOLD = CacheConfiguration.DFLT_CONCURRENT_LOAD_ALL_THRESHOLD;
/** Delegate store. */
private CacheStore<K, V> delegate;
@@ -306,4 +307,4 @@ public class CacheStoreBalancingWrapper<K, V> implements CacheStore<K, V> {
return get().get(key);
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/967cfcbb/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
index dd54da5..6bfafd4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
@@ -112,7 +112,8 @@ public abstract class GridCacheStoreManagerAdapter extends GridCacheManagerAdapt
store = cacheStoreWrapper(ctx, cfgStore, cfg);
- singleThreadGate = store == null ? null : new CacheStoreBalancingWrapper<>(store);
+ singleThreadGate = store == null ? null : new CacheStoreBalancingWrapper<>(store,
+ cfg.getStoreConcurrentLoadAllThreshold());
ThreadLocal<SessionData> sesHolder0 = null;
http://git-wip-us.apache.org/repos/asf/ignite/blob/967cfcbb/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheBalancingStoreSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheBalancingStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheBalancingStoreSelfTest.java
index 1e3e4b4..bfbb08c 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheBalancingStoreSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheBalancingStoreSelfTest.java
@@ -32,6 +32,7 @@ import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import javax.cache.Cache;
+import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.internal.IgniteInterruptedCheckedException;
import org.apache.ignite.internal.processors.cache.CacheStoreBalancingWrapper;
@@ -127,15 +128,35 @@ public class GridCacheBalancingStoreSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testConcurrentLoad() throws Exception {
- int threads = 5;
+ CacheConfiguration cfg = new CacheConfiguration();
- final int keys = 50;
+ assertEquals(CacheStoreBalancingWrapper.DFLT_LOAD_ALL_THRESHOLD, cfg.getStoreConcurrentLoadAllThreshold());
+ doTestConcurrentLoad(5, 50, CacheStoreBalancingWrapper.DFLT_LOAD_ALL_THRESHOLD);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testConcurrentLoadCustomThreshold() throws Exception {
+ CacheConfiguration cfg = new CacheConfiguration();
+
+ cfg.setStoreConcurrentLoadAllThreshold(15);
+
+ assertEquals(15, cfg.getStoreConcurrentLoadAllThreshold());
+
+ doTestConcurrentLoad(5, 50, cfg.getStoreConcurrentLoadAllThreshold());
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ private void doTestConcurrentLoad(int threads, final int keys, int threshold) throws Exception {
final CyclicBarrier beforeBarrier = new CyclicBarrier(threads);
ConcurrentVerifyStore store = new ConcurrentVerifyStore(keys);
- final CacheStoreBalancingWrapper<Integer, Integer> wrapper =new CacheStoreBalancingWrapper<>(store);
+ final CacheStoreBalancingWrapper<Integer, Integer> wrapper = new CacheStoreBalancingWrapper<>(store, threshold);
GridTestUtils.runMultiThreaded(new Runnable() {
@Override public void run() {
@@ -159,17 +180,35 @@ public class GridCacheBalancingStoreSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testConcurrentLoadAll() throws Exception {
- int threads = 5;
+ CacheConfiguration cfg = new CacheConfiguration();
- final int threshold = 5;
+ assertEquals(CacheStoreBalancingWrapper.DFLT_LOAD_ALL_THRESHOLD, cfg.getStoreConcurrentLoadAllThreshold());
- final int keysCnt = 100;
+ doTestConcurrentLoadAll(5, CacheStoreBalancingWrapper.DFLT_LOAD_ALL_THRESHOLD, 150);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testConcurrentLoadAllCustomThreshold() throws Exception {
+ CacheConfiguration cfg = new CacheConfiguration();
+
+ cfg.setStoreConcurrentLoadAllThreshold(15);
+ assertEquals(15, cfg.getStoreConcurrentLoadAllThreshold());
+
+ doTestConcurrentLoadAll(5, cfg.getStoreConcurrentLoadAllThreshold(), 150);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ private void doTestConcurrentLoadAll(int threads, final int threshold, final int keysCnt) throws Exception {
final CyclicBarrier beforeBarrier = new CyclicBarrier(threads);
ConcurrentVerifyStore store = new ConcurrentVerifyStore(keysCnt);
- final CacheStoreBalancingWrapper<Integer, Integer> wrapper = new CacheStoreBalancingWrapper<>(store);
+ final CacheStoreBalancingWrapper<Integer, Integer> wrapper = new CacheStoreBalancingWrapper<>(store, threshold);
GridTestUtils.runMultiThreaded(new Runnable() {
@Override public void run() {
[09/10] ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-1.5' into ignite-1758-debug
Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-1.5' into ignite-1758-debug
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/52bb9597
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/52bb9597
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/52bb9597
Branch: refs/heads/ignite-1758-debug
Commit: 52bb959730449fca33f76073db85c580a3e1d1b6
Parents: 70ed06e 1f5a409
Author: sboikov <sb...@gridgain.com>
Authored: Thu Nov 12 10:52:04 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Nov 12 10:52:04 2015 +0300
----------------------------------------------------------------------
.../configuration/CacheConfiguration.java | 37 +++++++++
.../cache/CacheStoreBalancingWrapper.java | 5 +-
.../store/GridCacheStoreManagerAdapter.java | 3 +-
.../store/GridCacheBalancingStoreSelfTest.java | 53 ++++++++++--
...gniteCachePutRetryTransactionalSelfTest.java | 10 +++
modules/yardstick/README.txt | 16 ++--
.../config/benchmark-multicast.properties | 5 +-
.../yardstick/config/benchmark-store.properties | 86 ++++++++++++--------
.../ignite/yardstick/IgniteBenchmarkUtils.java | 75 +++++++++++++++++
.../org/apache/ignite/yardstick/IgniteNode.java | 23 ++++--
.../IgniteAccountSerializableTxBenchmark.java | 11 ++-
.../cache/IgniteAccountTxBenchmark.java | 11 ++-
.../cache/IgniteGetAllPutAllTxBenchmark.java | 73 +++++++++++++++++
...IgniteTransactionalWriteInvokeBenchmark.java | 41 +---------
.../IgniteTransactionalWriteReadBenchmark.java | 41 +---------
15 files changed, 339 insertions(+), 151 deletions(-)
----------------------------------------------------------------------
[06/10] ignite git commit: Added tx-getAll PutAll benchmarks (fix in
properties)
Posted by sb...@apache.org.
Added tx-getAll PutAll benchmarks (fix in properties)
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/8cc9fa4f
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/8cc9fa4f
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/8cc9fa4f
Branch: refs/heads/ignite-1758-debug
Commit: 8cc9fa4ff51926190d4d75b5b41f07b20e910144
Parents: 847b616
Author: ashutak <as...@gridgain.com>
Authored: Wed Nov 11 18:55:25 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Wed Nov 11 18:55:25 2015 +0300
----------------------------------------------------------------------
modules/yardstick/config/benchmark-multicast.properties | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/8cc9fa4f/modules/yardstick/config/benchmark-multicast.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-multicast.properties b/modules/yardstick/config/benchmark-multicast.properties
index 577d611..c508471 100644
--- a/modules/yardstick/config/benchmark-multicast.properties
+++ b/modules/yardstick/config/benchmark-multicast.properties
@@ -111,7 +111,7 @@ CONFIGS="\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 100 -dn IgnitePutAllBenchmark -sn IgniteNode -ds ${ver}atomic-putAll-1-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 100 -dn IgnitePutAllTxBenchmark -sn IgniteNode -ds ${ver}tx-putAll-1-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 100 -dn IgnitePutAllSerializableTxBenchmark -sn IgniteNode -ds ${ver}tx-putAllSerializable-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 10 -txc OPTIMISTIC -dn IgniteGetAllPutAllTxBenchmark -sn IgniteNode -ds tx-optimistic-getAllPutAll-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 10 -txc PESSIMISTIC -dn IgniteGetAllPutAllTxBenchmark -sn IgniteNode -ds tx-pessimistic-getAllPutAll-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 10 -txc OPTIMISTIC -txi SERIALIZABLE -dn IgniteGetAllPutAllTxBenchmark -sn IgniteNode -ds tx-opt-serializable-getAllPutAll-1-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 10 -txc OPTIMISTIC -dn IgniteGetAllPutAllTxBenchmark -sn IgniteNode -ds tx-optimistic-getAllPutAll-1-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 10 -txc PESSIMISTIC -dn IgniteGetAllPutAllTxBenchmark -sn IgniteNode -ds tx-pessimistic-getAllPutAll-1-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 10 -txc OPTIMISTIC -txi SERIALIZABLE -dn IgniteGetAllPutAllTxBenchmark -sn IgniteNode -ds tx-opt-serializable-getAllPutAll-1-backup,\
"