You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2015/11/16 10:38:28 UTC
[1/6] ignite git commit: IGNITE-1890 Fixed Visor Console log command
help.
Repository: ignite
Updated Branches:
refs/heads/ignite-perftest-merge 4c9afe22b -> b9ea3fc99
IGNITE-1890 Fixed Visor Console log command help.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/7a403644
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/7a403644
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/7a403644
Branch: refs/heads/ignite-perftest-merge
Commit: 7a403644b60771b2bb76238f1c6d955bea9a608a
Parents: 5887ae4
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Fri Nov 13 16:59:27 2015 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Fri Nov 13 16:59:27 2015 +0700
----------------------------------------------------------------------
.../src/main/scala/org/apache/ignite/visor/visor.scala | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/7a403644/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
index 28ef0d7..986089b 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
@@ -507,8 +507,7 @@ object visor extends VisorTag {
"If logging is already stopped - it's no-op."
),
"-dl" -> Seq(
- "Disables collecting of job and task fail events, licence violation events, cache rebalance events" +
- " from remote nodes."
+ "Disables collecting of job and task fail events, cache rebalance events from remote nodes."
)
),
examples = Seq(
[6/6] ignite git commit: Perf - Fixed compatibility
Posted by ag...@apache.org.
Perf - Fixed compatibility
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b9ea3fc9
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b9ea3fc9
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b9ea3fc9
Branch: refs/heads/ignite-perftest-merge
Commit: b9ea3fc9903f3b5172b766bcbe2a6fa5aed40700
Parents: ca15153
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Mon Nov 16 12:38:19 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Mon Nov 16 12:38:19 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/managers/discovery/GridDiscoveryManager.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/b9ea3fc9/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index cd2f49c..4880338 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -2136,7 +2136,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
customEvt.node(ctx.discovery().localNode());
customEvt.eventNode(node);
customEvt.type(type);
- customEvt.topologySnapshot(topVer.topologyVersion(), null);
+ customEvt.topologySnapshot(topVer.topologyVersion(), evt.get4());
customEvt.affinityTopologyVersion(topVer);
customEvt.customMessage(evt.get5());
[3/6] ignite git commit: Improve IgnitePutGetTxBenchmark
Posted by ag...@apache.org.
Improve IgnitePutGetTxBenchmark
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5a116cb2
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5a116cb2
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5a116cb2
Branch: refs/heads/ignite-perftest-merge
Commit: 5a116cb264a8834840fde8e5e8a60d06023d6b1a
Parents: c9cea76
Author: ashutak <as...@gridgain.com>
Authored: Fri Nov 13 16:23:56 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Fri Nov 13 16:23:56 2015 +0300
----------------------------------------------------------------------
.../config/benchmark-multicast.properties | 4 +-
.../yardstick/IgniteBenchmarkArguments.java | 2 +-
.../cache/IgnitePutGetTxBenchmark.java | 41 +++++++++++++++-----
3 files changed, 35 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/5a116cb2/modules/yardstick/config/benchmark-multicast.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-multicast.properties b/modules/yardstick/config/benchmark-multicast.properties
index c508471..85f6c11 100644
--- a/modules/yardstick/config/benchmark-multicast.properties
+++ b/modules/yardstick/config/benchmark-multicast.properties
@@ -90,7 +90,9 @@ CONFIGS="\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutBenchmark -sn IgniteNode -ds ${ver}atomic-put-1-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-1-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxBenchmark -sn IgniteNode -ds ${ver}tx-put-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetTxBenchmark -sn IgniteNode -ds ${ver}tx-put-get-1-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -txc OPTIMISTIC -dn IgnitePutGetTxBenchmark -sn IgniteNode -ds ${ver}tx-optim-repRead-put-get-1-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -txc PESSIMISTIC -dn IgnitePutGetTxBenchmark -sn IgniteNode -ds ${ver}tx-pessim-repRead-put-get-1-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -txc OPTIMISTIC -txi SERIALIZABLE -dn IgnitePutGetTxBenchmark -sn IgniteNode -ds ${ver}tx-opt-serial-put-get-1-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryBenchmark -sn IgniteNode -ds ${ver}sql-query-1-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryJoinBenchmark -sn IgniteNode -ds ${ver}sql-query-join-1-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryPutBenchmark -sn IgniteNode -ds ${ver}sql-query-put-1-backup,\
http://git-wip-us.apache.org/repos/asf/ignite/blob/5a116cb2/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
index 74b1da9..1ecfa0f 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
@@ -62,7 +62,7 @@ public class IgniteBenchmarkArguments {
/** */
@Parameter(names = {"-txc", "--txConcurrency"}, description = "Transaction concurrency")
- private TransactionConcurrency txConcurrency = TransactionConcurrency.OPTIMISTIC;
+ private TransactionConcurrency txConcurrency = TransactionConcurrency.PESSIMISTIC;
/** */
@Parameter(names = {"-txi", "--txIsolation"}, description = "Transaction isolation")
http://git-wip-us.apache.org/repos/asf/ignite/blob/5a116cb2/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetTxBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetTxBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetTxBenchmark.java
index 5afe0b2..3235721 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetTxBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetTxBenchmark.java
@@ -18,28 +18,49 @@
package org.apache.ignite.yardstick.cache;
import java.util.Map;
+import java.util.concurrent.Callable;
import org.apache.ignite.IgniteCache;
-import org.apache.ignite.transactions.Transaction;
+import org.apache.ignite.IgniteTransactions;
import org.apache.ignite.yardstick.cache.model.SampleValue;
+import org.yardstickframework.BenchmarkConfiguration;
+
+import static org.apache.ignite.yardstick.IgniteBenchmarkUtils.doInTransaction;
/**
* Ignite benchmark that performs transactional put and get operations.
*/
public class IgnitePutGetTxBenchmark extends IgniteCacheAbstractBenchmark<Integer, Object> {
+ /** */
+ private IgniteTransactions txs;
+
+ /** */
+ private Callable<Void> clo;
+
/** {@inheritDoc} */
- @Override public boolean test(Map<Object, Object> ctx) throws Exception {
- int key = nextRandom(0, args.range() / 2);
+ @Override public void setUp(BenchmarkConfiguration cfg) throws Exception {
+ super.setUp(cfg);
+
+ txs = ignite().transactions();
- try (Transaction tx = ignite().transactions().txStart()) {
- Object val = cache.get(key);
+ clo = new Callable<Void>() {
+ @Override public Void call() throws Exception {
+ int key = nextRandom(0, args.range() / 2);
- if (val != null)
- key = nextRandom(args.range() / 2, args.range());
+ Object val = cache.get(key);
- cache.put(key, new SampleValue(key));
+ if (val != null)
+ key = nextRandom(args.range() / 2, args.range());
- tx.commit();
- }
+ cache.put(key, new SampleValue(key));
+
+ return null;
+ }
+ };
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean test(Map<Object, Object> ctx) throws Exception {
+ doInTransaction(txs, args.txConcurrency(), args.txIsolation(), clo);
return true;
}
[4/6] ignite git commit: Perf - Minor cleanup
Posted by ag...@apache.org.
Perf - Minor cleanup
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4936c04f
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4936c04f
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4936c04f
Branch: refs/heads/ignite-perftest-merge
Commit: 4936c04f2728812ea9ab4e3bc46eaa5627b552d7
Parents: 4c9afe2
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Mon Nov 16 11:56:51 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Mon Nov 16 11:56:51 2015 +0300
----------------------------------------------------------------------
.../distributed/GridDistributedBaseMessage.java | 56 --------------------
.../distributed/GridDistributedLockRequest.java | 6 ---
.../GridDistributedLockResponse.java | 32 +----------
.../distributed/dht/GridDhtLockRequest.java | 2 +-
.../dht/GridDhtTransactionalCacheAdapter.java | 3 --
.../cache/distributed/dht/GridDhtTxMapping.java | 29 +++++-----
.../distributed/dht/GridDhtTxPrepareFuture.java | 14 +----
.../distributed/near/GridNearLockRequest.java | 4 +-
.../near/GridNearTransactionalCache.java | 7 +--
.../near/GridNearTxPrepareRequest.java | 2 +-
10 files changed, 21 insertions(+), 134 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4936c04f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java
index f4a16dc..ebbc9ae 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java
@@ -21,13 +21,10 @@ import java.io.Externalizable;
import java.nio.ByteBuffer;
import java.util.Collection;
import java.util.Collections;
-import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.internal.GridDirectCollection;
import org.apache.ignite.internal.GridDirectTransient;
import org.apache.ignite.internal.processors.cache.GridCacheDeployable;
import org.apache.ignite.internal.processors.cache.GridCacheMessage;
-import org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate;
-import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersionable;
import org.apache.ignite.internal.util.tostring.GridToStringExclude;
@@ -49,15 +46,6 @@ public abstract class GridDistributedBaseMessage extends GridCacheMessage implem
@GridToStringInclude
protected GridCacheVersion ver;
- /**
- * Candidates for every key ordered in the order of keys. These
- * can be either local-only candidates in case of lock acquisition,
- * or pending candidates in case of transaction commit.
- */
- @GridToStringInclude
- @GridDirectTransient
- private Collection<GridCacheMvccCandidate>[] candsByIdx;
-
/** */
@GridToStringExclude
private byte[] candsByIdxBytes;
@@ -108,23 +96,6 @@ public abstract class GridDistributedBaseMessage extends GridCacheMessage implem
this.ver = ver;
}
- /** {@inheritDoc}
- * @param ctx*/
- @Override public void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException {
- super.prepareMarshal(ctx);
-
- if (candsByIdx != null)
- candsByIdxBytes = ctx.marshaller().marshal(candsByIdx);
- }
-
- /** {@inheritDoc} */
- @Override public void finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException {
- super.finishUnmarshal(ctx, ldr);
-
- if (candsByIdxBytes != null)
- candsByIdx = ctx.marshaller().unmarshal(candsByIdxBytes, ldr);
- }
-
/** {@inheritDoc} */
@Override public boolean addDeploymentInfo() {
return addDepInfo;
@@ -169,33 +140,6 @@ public abstract class GridDistributedBaseMessage extends GridCacheMessage implem
}
/**
- * @param idx Key index.
- * @param candsByIdx List of candidates for that key.
- */
- @SuppressWarnings({"unchecked"})
- public void candidatesByIndex(int idx, Collection<GridCacheMvccCandidate> candsByIdx) {
- assert idx < cnt;
-
- // If nothing to add.
- if (candsByIdx == null || candsByIdx.isEmpty())
- return;
-
- if (this.candsByIdx == null)
- this.candsByIdx = new Collection[cnt];
-
- this.candsByIdx[idx] = candsByIdx;
- }
-
- /**
- * @param idx Key index.
- * @return Candidates for given key.
- */
- public Collection<GridCacheMvccCandidate> candidatesByIndex(int idx) {
- return candsByIdx == null ||
- candsByIdx[idx] == null ? Collections.<GridCacheMvccCandidate>emptyList() : candsByIdx[idx];
- }
-
- /**
* @return Count of keys referenced in candidates array (needed only locally for optimization).
*/
public int keysCount() {
http://git-wip-us.apache.org/repos/asf/ignite/blob/4936c04f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
index 2899e25..b584f8a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
@@ -19,14 +19,12 @@ package org.apache.ignite.internal.processors.cache.distributed;
import java.nio.ByteBuffer;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.List;
import java.util.UUID;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.internal.GridDirectCollection;
import org.apache.ignite.internal.GridDirectTransient;
import org.apache.ignite.internal.processors.cache.GridCacheContext;
-import org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate;
import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
import org.apache.ignite.internal.processors.cache.KeyCacheObject;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
@@ -261,14 +259,12 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage {
*
* @param key Key.
* @param retVal Flag indicating whether value should be returned.
- * @param cands Candidates.
* @param ctx Context.
* @throws IgniteCheckedException If failed.
*/
public void addKeyBytes(
KeyCacheObject key,
boolean retVal,
- @Nullable Collection<GridCacheMvccCandidate> cands,
GridCacheContext ctx
) throws IgniteCheckedException {
if (keys == null)
@@ -276,8 +272,6 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage {
keys.add(key);
- candidatesByIndex(idx, cands);
-
retVals[idx] = retVal;
idx++;
http://git-wip-us.apache.org/repos/asf/ignite/blob/4936c04f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
index cdd58b5..bb3f9ff 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
@@ -26,7 +26,6 @@ import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.internal.GridDirectCollection;
import org.apache.ignite.internal.GridDirectTransient;
import org.apache.ignite.internal.processors.cache.CacheObject;
-import org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate;
import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
import org.apache.ignite.internal.util.tostring.GridToStringInclude;
@@ -156,34 +155,11 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage {
}
/**
- * @param idx Index of locked flag.
- * @return Value of locked flag at given index.
- */
- public boolean isCurrentlyLocked(int idx) {
- assert idx >= 0;
-
- Collection<GridCacheMvccCandidate> cands = candidatesByIndex(idx);
-
- for (GridCacheMvccCandidate cand : cands)
- if (cand.owner())
- return true;
-
- return false;
- }
-
- /**
- * @param idx Candidates index.
- * @param cands Collection of candidates.
* @param committedVers Committed versions relative to lock version.
* @param rolledbackVers Rolled back versions relative to lock version.
*/
- public void setCandidates(int idx, Collection<GridCacheMvccCandidate> cands,
- Collection<GridCacheVersion> committedVers, Collection<GridCacheVersion> rolledbackVers) {
- assert idx >= 0;
-
+ public void setCandidates(Collection<GridCacheVersion> committedVers, Collection<GridCacheVersion> rolledbackVers) {
completedVersions(committedVers, rolledbackVers);
-
- candidatesByIndex(idx, cands);
}
/**
@@ -218,9 +194,6 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage {
prepareMarshalCacheObjects(vals, ctx.cacheContext(cacheId));
-// if (F.isEmpty(valBytes) && !F.isEmpty(vals))
-// valBytes = marshalValuesCollection(vals, ctx);
-
if (err != null)
errBytes = ctx.marshaller().marshal(err);
}
@@ -231,9 +204,6 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage {
finishUnmarshalCacheObjects(vals, ctx.cacheContext(cacheId), ldr);
-// if (F.isEmpty(vals) && !F.isEmpty(valBytes))
-// vals = unmarshalValueBytesCollection(valBytes, ctx, ldr);
-
if (errBytes != null)
err = ctx.marshaller().unmarshal(errBytes, ldr);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/4936c04f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
index 91ab1ca..18281d0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
@@ -236,7 +236,7 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
) throws IgniteCheckedException {
invalidateEntries.set(idx, invalidateEntry);
- addKeyBytes(key, false, null, ctx);
+ addKeyBytes(key, false, ctx);
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/4936c04f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
index 1ba1c0d..f3f9d2b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
@@ -39,7 +39,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheContext;
import org.apache.ignite.internal.processors.cache.GridCacheEntryEx;
import org.apache.ignite.internal.processors.cache.GridCacheEntryInfo;
import org.apache.ignite.internal.processors.cache.GridCacheEntryRemovedException;
-import org.apache.ignite.internal.processors.cache.GridCacheFilterFailedException;
import org.apache.ignite.internal.processors.cache.GridCacheLockTimeoutException;
import org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate;
import org.apache.ignite.internal.processors.cache.GridCacheReturn;
@@ -187,8 +186,6 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
IgniteTxKey txKey = ctx.txKey(key);
- assert F.isEmpty(req.candidatesByIndex(i));
-
if (log.isDebugEnabled())
log.debug("Unmarshalled key: " + key);
http://git-wip-us.apache.org/repos/asf/ignite/blob/4936c04f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxMapping.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxMapping.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxMapping.java
index 55cbe96..5668f83 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxMapping.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxMapping.java
@@ -52,22 +52,25 @@ public class GridDhtTxMapping {
public void addMapping(List<ClusterNode> nodes) {
ClusterNode primary = F.first(nodes);
- Collection<ClusterNode> backups = F.view(nodes, F.notEqualTo(primary));
-
if (last == null || !last.primary.equals(primary.id())) {
- last = new TxMapping(primary, backups);
+ last = new TxMapping(primary);
mappings.add(last);
}
- else
- last.add(backups);
Collection<UUID> storedBackups = txNodes.get(last.primary);
if (storedBackups == null)
txNodes.put(last.primary, storedBackups = new HashSet<>());
- storedBackups.addAll(last.backups);
+ // Add backups.
+ for (int i = 1; i < nodes.size(); i++) {
+ ClusterNode backup = nodes.get(i);
+
+ last.add(backup);
+
+ storedBackups.add(backup.id());
+ }
}
/**
@@ -153,22 +156,18 @@ public class GridDhtTxMapping {
/**
* @param primary Primary node.
- * @param backups Backup nodes.
*/
- private TxMapping(ClusterNode primary, Iterable<ClusterNode> backups) {
+ private TxMapping(ClusterNode primary) {
this.primary = primary.id();
- this.backups = new HashSet<>();
-
- add(backups);
+ backups = new HashSet<>();
}
/**
- * @param backups Backup nodes.
+ * @param backup Backup node.
*/
- private void add(Iterable<ClusterNode> backups) {
- for (ClusterNode n : backups)
- this.backups.add(n.id());
+ private void add(ClusterNode backup) {
+ backups.add(backup.id());
}
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/4936c04f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
index e2939b8..b1e3f22 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
@@ -1111,18 +1111,6 @@ public final class GridDhtTxPrepareFuture extends GridCompoundFuture<IgniteInter
GridCacheContext<?, ?> cacheCtx = cached.context();
- if (entry.explicitVersion() == null) {
- GridCacheMvccCandidate added = cached.candidate(version());
-
- assert added != null : "Null candidate for non-group-lock entry " +
- "[added=" + added + ", entry=" + entry + ']';
- assert added.dhtLocal() : "Got non-dht-local candidate for prepare future" +
- "[added=" + added + ", entry=" + entry + ']';
-
- if (added != null && added.ownerVersion() != null)
- req.owned(entry.txKey(), added.ownerVersion());
- }
-
// Do not invalidate near entry on originating transaction node.
req.invalidateNearEntry(idx, !tx.nearNodeId().equals(n.id()) &&
cached.readerId(n.id()) != null);
@@ -1131,7 +1119,7 @@ public final class GridDhtTxPrepareFuture extends GridCompoundFuture<IgniteInter
List<ClusterNode> owners = cacheCtx.topology().owners(cached.partition(),
tx != null ? tx.topologyVersion() : cacheCtx.affinity().affinityTopologyVersion());
- // Do not preload if local node is partition owner.
+ // Do not preload if local node is a partition owner.
if (!owners.contains(cctx.localNode()))
req.markKeyForPreload(idx);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/4936c04f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
index 165da84..805a6a2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
@@ -20,13 +20,11 @@ package org.apache.ignite.internal.processors.cache.distributed.near;
import java.io.Externalizable;
import java.nio.ByteBuffer;
import java.util.Arrays;
-import java.util.Collection;
import java.util.UUID;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.CacheEntryPredicate;
import org.apache.ignite.internal.processors.cache.GridCacheContext;
-import org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate;
import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
import org.apache.ignite.internal.processors.cache.KeyCacheObject;
import org.apache.ignite.internal.processors.cache.distributed.GridDistributedLockRequest;
@@ -300,7 +298,7 @@ public class GridNearLockRequest extends GridDistributedLockRequest {
dhtVers[idx] = dhtVer;
// Delegate to super.
- addKeyBytes(key, retVal, (Collection<GridCacheMvccCandidate>)null, ctx);
+ addKeyBytes(key, retVal, ctx);
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/4936c04f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
index 5ab85b2..9706baf 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
@@ -273,7 +273,7 @@ public class GridNearTransactionalCache<K, V> extends GridNearCacheAdapter<K, V>
* @throws IgniteCheckedException If failed.
* @throws GridDistributedLockCancelledException If lock has been cancelled.
*/
- @SuppressWarnings({"RedundantTypeArguments"})
+ @SuppressWarnings({"RedundantTypeArguments", "ForLoopReplaceableByForEach"})
@Nullable public GridNearTxRemote startRemoteTx(UUID nodeId, GridDhtLockRequest req)
throws IgniteCheckedException, GridDistributedLockCancelledException {
List<KeyCacheObject> nearKeys = req.nearKeys();
@@ -285,6 +285,7 @@ public class GridNearTransactionalCache<K, V> extends GridNearCacheAdapter<K, V>
if (ldr != null) {
Collection<IgniteTxKey> evicted = null;
+ // Avoid iterator creation.
for (int i = 0; i < nearKeys.size(); i++) {
KeyCacheObject key = nearKeys.get(i);
@@ -293,8 +294,6 @@ public class GridNearTransactionalCache<K, V> extends GridNearCacheAdapter<K, V>
IgniteTxKey txKey = ctx.txKey(key);
- Collection<GridCacheMvccCandidate> cands = req.candidatesByIndex(i);
-
if (log.isDebugEnabled())
log.debug("Unmarshalled key: " + key);
@@ -357,8 +356,6 @@ public class GridNearTransactionalCache<K, V> extends GridNearCacheAdapter<K, V>
req.owned(entry.key())
);
- assert cands.isEmpty() : "Received non-empty candidates in dht lock request: " + cands;
-
if (!req.inTx())
ctx.evicts().touch(entry, req.topologyVersion());
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/4936c04f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
index 5a006d6..ceafaff 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
@@ -71,7 +71,7 @@ public class GridNearTxPrepareRequest extends GridDistributedTxPrepareRequest {
/** Implicit single flag. */
private boolean implicitSingle;
- /** Explicit lock flag. Set to true if at leat one entry was explicitly locked. */
+ /** Explicit lock flag. Set to true if at least one entry was explicitly locked. */
private boolean explicitLock;
/** Subject ID. */
[5/6] ignite git commit: Merge branch 'ignite-1.5' of
https://git-wip-us.apache.org/repos/asf/ignite into ignite-perftest-merge
Posted by ag...@apache.org.
Merge branch 'ignite-1.5' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-perftest-merge
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ca151536
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ca151536
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ca151536
Branch: refs/heads/ignite-perftest-merge
Commit: ca151536b322fdba12927a52724f3df26f90de57
Parents: 4936c04 5a116cb
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Mon Nov 16 12:01:39 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Mon Nov 16 12:01:39 2015 +0300
----------------------------------------------------------------------
.../dht/preloader/GridDhtPartitionSupplier.java | 3 ++
.../scala/org/apache/ignite/visor/visor.scala | 3 +-
.../config/benchmark-multicast.properties | 4 +-
.../yardstick/IgniteBenchmarkArguments.java | 2 +-
.../cache/IgnitePutGetTxBenchmark.java | 41 +++++++++++++++-----
5 files changed, 39 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
[2/6] ignite git commit: Ignite-1093 Backward compatibility fix.
Posted by ag...@apache.org.
Ignite-1093 Backward compatibility fix.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c9cea766
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c9cea766
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c9cea766
Branch: refs/heads/ignite-perftest-merge
Commit: c9cea76656fb00c03811350260bd158ffdf8739a
Parents: 7a40364
Author: Anton Vinogradov <av...@apache.org>
Authored: Fri Nov 13 14:19:13 2015 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Fri Nov 13 14:19:13 2015 +0300
----------------------------------------------------------------------
.../cache/distributed/dht/preloader/GridDhtPartitionSupplier.java | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/c9cea766/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java
index 865bad8..4e33d8e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java
@@ -759,6 +759,9 @@ class GridDhtPartitionSupplier {
ClusterNode node = cctx.node(id);
+ if (node == null)
+ return;
+
long preloadThrottle = cctx.config().getRebalanceThrottle();
boolean ack = false;