You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/09/09 10:52:59 UTC
[01/43] ignite git commit: fixed
CacheConfiguration.keepPortableInStore initialization when a config is
transferred between nodes with different versions
Repository: ignite
Updated Branches:
refs/heads/master 5ec703d8e -> fba01d61b
fixed CacheConfiguration.keepPortableInStore initialization when a config is transferred between nodes with different versions
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b1f119fd
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b1f119fd
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b1f119fd
Branch: refs/heads/master
Commit: b1f119fd84455cbbce3f131f92a2bd821f91675c
Parents: 1fe7e95
Author: Denis Magda <dm...@gridgain.com>
Authored: Mon Sep 7 17:51:29 2015 +0300
Committer: dmagda <ma...@gmail.com>
Committed: Mon Sep 7 17:51:29 2015 +0300
----------------------------------------------------------------------
.../java/org/apache/ignite/configuration/CacheConfiguration.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/b1f119fd/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 85eed47..643804f 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
@@ -383,7 +383,8 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
invalidate = cc.isInvalidate();
isReadThrough = cc.isReadThrough();
isWriteThrough = cc.isWriteThrough();
- keepPortableInStore = cc.isKeepPortableInStore();
+ keepPortableInStore = cc.isKeepPortableInStore() != null ? cc.isKeepPortableInStore() :
+ DFLT_KEEP_PORTABLE_IN_STORE;
listenerConfigurations = cc.listenerConfigurations;
loadPrevVal = cc.isLoadPreviousValue();
longQryWarnTimeout = cc.getLongQueryWarningTimeout();
[24/43] ignite git commit: IGNITE-1388: Minor refactoring for
platform invoke/invokeAll.
Posted by vo...@apache.org.
IGNITE-1388: Minor refactoring for platform invoke/invokeAll.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b2b6ce6c
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b2b6ce6c
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b2b6ce6c
Branch: refs/heads/master
Commit: b2b6ce6c22734a47d1f41ffed56a525a5c025faa
Parents: 4dc4171
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Tue Sep 8 13:32:37 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Sep 8 13:32:37 2015 +0300
----------------------------------------------------------------------
.../processors/platform/cache/PlatformCache.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/b2b6ce6c/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
index 0829617..ecdfc2c 100644
--- a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
+++ b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
@@ -186,10 +186,10 @@ public class PlatformCache extends PlatformAbstractTarget {
private static final GetAllWriter WRITER_GET_ALL = new GetAllWriter();
/** */
- private static final EntryProcessorExceptionWriter WRITER_PROC_ERR = new EntryProcessorExceptionWriter();
+ private static final EntryProcessorInvokeWriter WRITER_INVOKE = new EntryProcessorInvokeWriter();
/** */
- private static final EntryProcessorResultsWriter WRITER_INVOKE_ALL = new EntryProcessorResultsWriter();
+ private static final EntryProcessorInvokeAllWriter WRITER_INVOKE_ALL = new EntryProcessorInvokeAllWriter();
/** Map with currently active locks. */
private final ConcurrentMap<Long, Lock> lockMap = GridConcurrentFactory.newMap();
@@ -694,7 +694,7 @@ public class PlatformCache extends PlatformAbstractTarget {
return WRITER_GET_ALL;
if (opId == OP_INVOKE)
- return WRITER_PROC_ERR;
+ return WRITER_INVOKE;
if (opId == OP_INVOKE_ALL)
return WRITER_INVOKE_ALL;
@@ -981,16 +981,16 @@ public class PlatformCache extends PlatformAbstractTarget {
/**
* Writes error with EntryProcessorException cause.
*/
- private static class EntryProcessorExceptionWriter implements PlatformFutureUtils.Writer {
+ private static class EntryProcessorInvokeWriter implements PlatformFutureUtils.Writer {
/** <inheritDoc /> */
@Override public void write(PortableRawWriterEx writer, Object obj, Throwable err) {
if (err == null) {
- writer.writeBoolean(true); // success
+ writer.writeBoolean(false); // No error.
writer.writeObjectDetached(obj);
}
else {
- writer.writeBoolean(false); // failure
+ writer.writeBoolean(true); // Error.
writeError(writer, (Exception) err);
}
@@ -1005,7 +1005,7 @@ public class PlatformCache extends PlatformAbstractTarget {
/**
* Writes results of InvokeAll method.
*/
- private static class EntryProcessorResultsWriter implements PlatformFutureUtils.Writer {
+ private static class EntryProcessorInvokeAllWriter implements PlatformFutureUtils.Writer {
/** <inheritDoc /> */
@Override public void write(PortableRawWriterEx writer, Object obj, Throwable err) {
writeInvokeAllResult(writer, (Map)obj);
[11/43] ignite git commit: Merge remote-tracking branch
'origin/ignite-1.4' into ignite-1.4
Posted by vo...@apache.org.
Merge remote-tracking branch 'origin/ignite-1.4' into ignite-1.4
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/65922082
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/65922082
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/65922082
Branch: refs/heads/master
Commit: 659220820dbc91b3001bfedb42d80b5f0f03df14
Parents: fc362fb aa35e36
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 12:14:10 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 12:14:10 2015 +0300
----------------------------------------------------------------------
.../util/ipc/shmem/IpcSharedMemoryCrashDetectionSelfTest.java | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
[28/43] ignite git commit: Enabled test.
Posted by vo...@apache.org.
Enabled test.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4ae40944
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4ae40944
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4ae40944
Branch: refs/heads/master
Commit: 4ae409444a931a06a58c2856a1ad667841b0a3af
Parents: 55db6f0
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 14:13:29 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 14:13:29 2015 +0300
----------------------------------------------------------------------
.../cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java | 2 --
1 file changed, 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4ae40944/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java
index 811bdc8..74c9a4f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java
@@ -88,8 +88,6 @@ public abstract class GridCacheSetFailoverAbstractSelfTest extends IgniteCollect
*/
@SuppressWarnings("WhileLoopReplaceableByForEach")
public void testNodeRestart() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-170");
-
IgniteSet<Integer> set = grid(0).set(SET_NAME, config(false));
final int ITEMS = 10_000;
[17/43] ignite git commit: Merge remote-tracking branch
'origin/ignite-1.4' into ignite-1.4
Posted by vo...@apache.org.
Merge remote-tracking branch 'origin/ignite-1.4' into ignite-1.4
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/483dde7f
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/483dde7f
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/483dde7f
Branch: refs/heads/master
Commit: 483dde7f6a1ec3e7ba3fc0f52b8125d9ae188277
Parents: a96849d 4c917c8
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 12:42:49 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 12:42:49 2015 +0300
----------------------------------------------------------------------
.../portable/datagrid/CacheClientPortableQueryExample.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
[39/43] ignite git commit: Fixed
GridCommonAbstractTest.awaitPartitionMapExchange.
Posted by vo...@apache.org.
Fixed GridCommonAbstractTest.awaitPartitionMapExchange.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b295bc5b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b295bc5b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b295bc5b
Branch: refs/heads/master
Commit: b295bc5bc1a0e98bf4a9fb6c28d7db32ff75aa6f
Parents: e4e39af
Author: sboikov <sb...@gridgain.com>
Authored: Wed Sep 9 09:39:27 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Sep 9 09:39:27 2015 +0300
----------------------------------------------------------------------
.../junits/common/GridCommonAbstractTest.java | 59 +++++++++++++-------
1 file changed, 40 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/b295bc5b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
index 13ec665..44ca051 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
@@ -284,6 +284,7 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest {
* @param replaceExistingValues Replace existing values.
* @throws Exception If failed.
*/
+ @SuppressWarnings("unchecked")
protected static <K> void loadAll(Cache<K, ?> cache, final Set<K> keys, final boolean replaceExistingValues) throws Exception {
IgniteCache<K, Object> cacheCp = (IgniteCache<K, Object>)cache;
@@ -425,33 +426,54 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest {
long start = 0;
for (int i = 0; ; i++) {
- // Must map on updated version of topology.
- Collection<ClusterNode> affNodes =
- g0.affinity(cfg.getName()).mapPartitionToPrimaryAndBackups(p);
+ boolean match = false;
+
+ AffinityTopologyVersion readyVer = dht.context().shared().exchange().readyAffinityVersion();
+
+ if (readyVer.topologyVersion() > 0 && dht.context().started()) {
+ // Must map on updated version of topology.
+ Collection<ClusterNode> affNodes =
+ g0.affinity(cfg.getName()).mapPartitionToPrimaryAndBackups(p);
- int exp = affNodes.size();
+ int exp = affNodes.size();
- GridDhtTopologyFuture topFut = top.topologyVersionFuture();
+ GridDhtTopologyFuture topFut = top.topologyVersionFuture();
- Collection<ClusterNode> owners = (topFut != null && topFut.isDone()) ?
- top.nodes(p, AffinityTopologyVersion.NONE) : Collections.<ClusterNode>emptyList();
+ Collection<ClusterNode> owners = (topFut != null && topFut.isDone()) ?
+ top.nodes(p, AffinityTopologyVersion.NONE) : Collections.<ClusterNode>emptyList();
- int actual = owners.size();
+ int actual = owners.size();
- if (affNodes.size() != owners.size() || !affNodes.containsAll(owners)) {
+ if (affNodes.size() != owners.size() || !affNodes.containsAll(owners)) {
+ LT.warn(log(), null, "Waiting for topology map update [" +
+ "grid=" + g.name() +
+ ", cache=" + cfg.getName() +
+ ", cacheId=" + dht.context().cacheId() +
+ ", topVer=" + top.topologyVersion() +
+ ", topFut=" + topFut +
+ ", p=" + p +
+ ", affNodesCnt=" + exp +
+ ", ownersCnt=" + actual +
+ ", affNodes=" + affNodes +
+ ", owners=" + owners +
+ ", locNode=" + g.cluster().localNode() + ']');
+ }
+ else
+ match = true;
+ }
+ else {
LT.warn(log(), null, "Waiting for topology map update [" +
"grid=" + g.name() +
", cache=" + cfg.getName() +
", cacheId=" + dht.context().cacheId() +
", topVer=" + top.topologyVersion() +
- ", topFut=" + topFut +
+ ", started=" + dht.context().started() +
", p=" + p +
- ", affNodesCnt=" + exp +
- ", ownersCnt=" + actual +
- ", affNodes=" + affNodes +
- ", owners=" + owners +
+ ", readVer=" + readyVer +
", locNode=" + g.cluster().localNode() + ']');
+ }
+ if (!match) {
if (i == 0)
start = System.currentTimeMillis();
@@ -461,12 +483,8 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest {
", cache=" + cfg.getName() +
", cacheId=" + dht.context().cacheId() +
", topVer=" + top.topologyVersion() +
- ", topFut=" + topFut +
", p=" + p +
- ", affNodesCnt=" + exp +
- ", ownersCnt=" + actual +
- ", affNodes=" + affNodes +
- ", owners=" + owners +
+ ", readVer=" + readyVer +
", locNode=" + g.cluster().localNode() + ']');
Thread.sleep(200); // Busy wait.
@@ -540,6 +558,7 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest {
* @param startFrom Start value for keys search.
* @return Collection of keys for which given cache is primary.
*/
+ @SuppressWarnings("unchecked")
protected List<Integer> primaryKeys(IgniteCache<?, ?> cache, int cnt, int startFrom) {
assert cnt > 0 : cnt;
@@ -591,6 +610,7 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest {
* @param startFrom Start value for keys search.
* @return Collection of keys for which given cache is backup.
*/
+ @SuppressWarnings("unchecked")
protected List<Integer> backupKeys(IgniteCache<?, ?> cache, int cnt, int startFrom) {
assert cnt > 0 : cnt;
@@ -621,6 +641,7 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest {
* @return Collection of keys for which given cache is neither primary nor backup.
* @throws IgniteCheckedException If failed.
*/
+ @SuppressWarnings("unchecked")
protected List<Integer> nearKeys(IgniteCache<?, ?> cache, int cnt, int startFrom)
throws IgniteCheckedException {
assert cnt > 0 : cnt;
[31/43] ignite git commit: Ignite-805 (cherry picked from commit
cc53981)
Posted by vo...@apache.org.
Ignite-805
(cherry picked from commit cc53981)
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/de6e7d9b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/de6e7d9b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/de6e7d9b
Branch: refs/heads/master
Commit: de6e7d9b02890f9813c87954645e523e97951c8d
Parents: 069653b
Author: Anton Vinogradov <av...@apache.org>
Authored: Tue Sep 8 16:46:41 2015 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Tue Sep 8 16:47:50 2015 +0300
----------------------------------------------------------------------
.../cache/GridCacheAbstractFullApiMultithreadedSelfTest.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/de6e7d9b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
index 2959b34..e89288f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
@@ -19,10 +19,10 @@ package org.apache.ignite.internal.processors.cache;
import com.google.common.collect.ImmutableSet;
import java.util.Collection;
-import java.util.HashSet;
import java.util.Map;
import java.util.Random;
import java.util.Set;
+import java.util.TreeSet;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import javax.cache.Cache;
@@ -59,7 +59,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
private static final String READ_THREAD_NAME = "read-thread";
/** */
- private static final int PUT_CNT = 100;
+ private static final int PUT_CNT = 1000;
/** */
private final AtomicInteger cnt = new AtomicInteger();
@@ -152,7 +152,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
* @return Range of keys.
*/
private Set<String> rangeKeys(int fromIncl, int toExcl) {
- return new HashSet<>(F.transform(F.range(fromIncl, toExcl), new C1<Integer, String>() {
+ return new TreeSet<>(F.transform(F.range(fromIncl, toExcl), new C1<Integer, String>() {
@Override public String apply(Integer i) {
return "key" + i;
}
[29/43] ignite git commit: More info in assert.
Posted by vo...@apache.org.
More info in assert.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e5b06e39
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e5b06e39
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e5b06e39
Branch: refs/heads/master
Commit: e5b06e39d97a363786f405d7de526ad79048c742
Parents: 4ae4094
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 14:39:47 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 14:39:47 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/processors/cache/GridCacheMvccCandidate.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/e5b06e39/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccCandidate.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccCandidate.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccCandidate.java
index 2df103d..e784f42 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccCandidate.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccCandidate.java
@@ -531,7 +531,7 @@ public class GridCacheMvccCandidate implements Externalizable,
* @param prev Lock that comes before in the same thread.
*/
public void previous(GridCacheMvccCandidate prev) {
- assert threadId == prev.threadId;
+ assert threadId == prev.threadId : "Invalid threadId [this=" + this + ", prev=" + prev + ']';
this.prev = prev;
}
[07/43] ignite git commit: Merge branch 'ignite-1.4' of
https://git-wip-us.apache.org/repos/asf/ignite into ignite-1.4-main
Posted by vo...@apache.org.
Merge branch 'ignite-1.4' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1.4-main
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/97fe836b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/97fe836b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/97fe836b
Branch: refs/heads/master
Commit: 97fe836b9a83227e4e87043227da02e4834fea70
Parents: 1a4d193 bbfee45
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Sep 8 10:41:34 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Sep 8 10:41:34 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheAdapter.java | 11 +-
.../processors/cache/GridCacheEntryEx.java | 12 +-
.../cache/GridCacheEvictionManager.java | 2 +
.../processors/cache/GridCacheMapEntry.java | 11 +-
.../cache/GridCacheMvccCandidate.java | 6 +-
.../cache/GridCacheSharedContext.java | 7 +
.../processors/cache/GridCacheSwapManager.java | 2 +-
.../distributed/dht/GridDhtCacheAdapter.java | 14 +-
.../distributed/dht/GridDhtLocalPartition.java | 23 +-
.../distributed/dht/GridDhtLockFuture.java | 6 +-
.../distributed/dht/GridDhtTxLocalAdapter.java | 22 +-
.../distributed/dht/GridDhtTxPrepareFuture.java | 3 +
.../colocated/GridDhtColocatedLockFuture.java | 14 +-
.../dht/preloader/GridDhtPreloader.java | 20 +-
.../distributed/near/GridNearLockFuture.java | 14 +-
.../near/GridNearOptimisticTxPrepareFuture.java | 7 +-
.../distributed/near/GridNearTxRemote.java | 6 +-
.../transactions/IgniteTxLocalAdapter.java | 20 +-
.../cache/CacheAffinityCallSelfTest.java | 16 +-
.../cache/CacheSwapUnswapGetTest.java | 234 +++++++++++++++++++
.../processors/cache/GridCacheMvccSelfTest.java | 29 +--
.../IgniteCacheFailoverTestSuite2.java | 3 +
.../testsuites/IgniteCacheTestSuite4.java | 3 +
23 files changed, 410 insertions(+), 75 deletions(-)
----------------------------------------------------------------------
[37/43] ignite git commit: ignite-1261 App context should be
transient.
Posted by vo...@apache.org.
ignite-1261 App context should be transient.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b8db248e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b8db248e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b8db248e
Branch: refs/heads/master
Commit: b8db248e6bca8dc1247867fbf5ecb27639dd7f68
Parents: 9f59c3f
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 17:35:27 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 17:35:27 2015 +0300
----------------------------------------------------------------------
.../apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/b8db248e/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
index d258600..c90a69b 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
@@ -72,7 +72,7 @@ public class CacheJdbcPojoStoreFactory<K, V> implements Factory<CacheJdbcPojoSto
/** Application context. */
@SpringApplicationContextResource
- private Object appContext;
+ private transient Object appContext;
/** {@inheritDoc} */
@Override public CacheJdbcPojoStore<K, V> create() {
[14/43] ignite git commit: IGNITE-1369: properly fixed example javadoc
Posted by vo...@apache.org.
IGNITE-1369: properly fixed example javadoc
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c315cb08
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c315cb08
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c315cb08
Branch: refs/heads/master
Commit: c315cb08acb37a67e6f6b37bbb064ce3edc05521
Parents: aa35e36
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Sep 8 12:35:05 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Sep 8 12:35:05 2015 +0300
----------------------------------------------------------------------
.../portable/datagrid/CacheClientPortableQueryExample.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/c315cb08/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortableQueryExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortableQueryExample.java b/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortableQueryExample.java
index c77a6b2..3170864 100644
--- a/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortableQueryExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortableQueryExample.java
@@ -45,8 +45,8 @@ import org.apache.ignite.portable.PortableObject;
* This example demonstrates use of portable objects with cache queries.
* The example populates cache with sample data and runs several SQL and full text queries over this data.
* <p>
- * Remote nodes should always be started with special configuration file which
- * enables the portable marshaller: {@code 'ignite.{sh|bat} examples/config/portable/example-ignite-portable.xml'}.
+ * Remote nodes should always be started with {@link ExamplePortableNodeStartup} which starts a node with
+ * {@code examples/config/portable/example-ignite-portable.xml} configuration.
*/
public class CacheClientPortableQueryExample {
/** Organization cache name. */
[33/43] ignite git commit: Merge remote-tracking branch
'origin/ignite-1.4' into ignite-1.4
Posted by vo...@apache.org.
Merge remote-tracking branch 'origin/ignite-1.4' into ignite-1.4
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e08205d6
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e08205d6
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e08205d6
Branch: refs/heads/master
Commit: e08205d60f09ed58707358b077b5d1f132cafa2e
Parents: b5eeb3b de6e7d9
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 16:52:29 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 16:52:29 2015 +0300
----------------------------------------------------------------------
.../cache/GridCacheAbstractFullApiMultithreadedSelfTest.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
[40/43] ignite git commit: Fixed test.
Posted by vo...@apache.org.
Fixed test.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/8389a7a6
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/8389a7a6
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/8389a7a6
Branch: refs/heads/master
Commit: 8389a7a6f4cebf722c74a163ebdc80b373f42d79
Parents: b295bc5
Author: sboikov <sb...@gridgain.com>
Authored: Wed Sep 9 09:57:47 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Sep 9 09:57:47 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheStopSelfTest.java | 49 ++++++++++----------
1 file changed, 24 insertions(+), 25 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/8389a7a6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java
index 6054fbc..59c899d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java
@@ -21,8 +21,9 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.concurrent.Callable;
import java.util.concurrent.CountDownLatch;
+import javax.cache.CacheException;
import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteException;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.IgniteInternalFuture;
@@ -43,12 +44,11 @@ import static org.apache.ignite.cache.CacheMode.REPLICATED;
public class GridCacheStopSelfTest extends GridCommonAbstractTest {
/** {@inheritDoc} */
@Override protected void beforeTest() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-257");
+ fail("https://issues.apache.org/jira/browse/IGNITE-1393");
}
/** */
- private static final String EXPECTED_MSG = "Grid is in invalid state to perform this operation. " +
- "It either not started yet or has already being or have stopped";
+ private static final String EXPECTED_MSG = "Cache has been closed or destroyed";
/** */
private boolean atomic;
@@ -153,23 +153,31 @@ public class GridCacheStopSelfTest extends GridCommonAbstractTest {
putFuts.add(GridTestUtils.runAsync(new Callable<Void>() {
@Override public Void call() throws Exception {
- if (startTx) {
- try (Transaction tx = grid(0).transactions().txStart()) {
- cache.put(key, key);
+ try {
+ if (startTx) {
+ try (Transaction tx = grid(0).transactions().txStart()) {
+ cache.put(key, key);
+
+ readyLatch.countDown();
+
+ stopLatch.await();
+ tx.commit();
+ }
+ }
+ else {
readyLatch.countDown();
stopLatch.await();
- tx.commit();
+ cache.put(key, key);
}
}
- else {
- readyLatch.countDown();
-
- stopLatch.await();
-
- cache.put(key, key);
+ catch (CacheException | IgniteException e) {
+ log.info("Ignore error: " + e);
+ }
+ catch (IllegalStateException e) {
+ assertTrue(e.getMessage().startsWith(EXPECTED_MSG));
}
return null;
@@ -183,17 +191,8 @@ public class GridCacheStopSelfTest extends GridCommonAbstractTest {
stopGrid(0);
- for (IgniteInternalFuture<?> fut : putFuts) {
- try {
- fut.get();
- }
- catch (IgniteCheckedException e) {
- if (!e.getMessage().startsWith(EXPECTED_MSG))
- e.printStackTrace();
-
- assertTrue("Unexpected error message: " + e.getMessage(), e.getMessage().startsWith(EXPECTED_MSG));
- }
- }
+ for (IgniteInternalFuture<?> fut : putFuts)
+ fut.get();
try {
cache.put(1, 1);
[43/43] ignite git commit: Merge branch 'ignite-1.4'
Posted by vo...@apache.org.
Merge branch 'ignite-1.4'
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/fba01d61
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/fba01d61
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/fba01d61
Branch: refs/heads/master
Commit: fba01d61b2622f6aae4ae3f7df96285ee0cfcb49
Parents: 5ec703d 60a76bc
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Wed Sep 9 11:50:41 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Wed Sep 9 11:50:41 2015 +0300
----------------------------------------------------------------------
.../CacheClientPortableQueryExample.java | 4 +-
.../store/jdbc/CacheJdbcPojoStoreFactory.java | 2 +-
.../configuration/CacheConfiguration.java | 3 +-
.../ignite/internal/GridUpdateNotifier.java | 82 +++++--
.../apache/ignite/internal/IgniteKernal.java | 5 +-
.../affinity/GridAffinityProcessor.java | 8 +-
.../processors/cache/GridCacheAdapter.java | 11 +-
.../processors/cache/GridCacheEntryEx.java | 12 +-
.../cache/GridCacheEvictionManager.java | 2 +
.../processors/cache/GridCacheMapEntry.java | 11 +-
.../cache/GridCacheMvccCandidate.java | 6 +-
.../cache/GridCacheSharedContext.java | 7 +
.../processors/cache/GridCacheSwapManager.java | 2 +-
.../distributed/dht/GridDhtCacheAdapter.java | 14 +-
.../distributed/dht/GridDhtLocalPartition.java | 23 +-
.../distributed/dht/GridDhtLockFuture.java | 6 +-
.../distributed/dht/GridDhtTxLocalAdapter.java | 22 +-
.../distributed/dht/GridDhtTxPrepareFuture.java | 3 +
.../colocated/GridDhtColocatedLockFuture.java | 14 +-
.../dht/preloader/GridDhtPreloader.java | 20 +-
.../distributed/near/GridNearLockFuture.java | 14 +-
.../near/GridNearOptimisticTxPrepareFuture.java | 7 +-
.../distributed/near/GridNearTxRemote.java | 6 +-
.../transactions/IgniteTxLocalAdapter.java | 20 +-
.../processors/igfs/IgfsDataManager.java | 14 +-
.../ignite/GridSuppressedExceptionSelfTest.java | 22 --
.../ignite/internal/GridStartStopSelfTest.java | 13 +-
.../internal/GridUpdateNotifierSelfTest.java | 23 +-
.../ignite/internal/GridVersionSelfTest.java | 20 +-
.../cache/CacheAffinityCallSelfTest.java | 16 +-
.../cache/CacheSwapUnswapGetTest.java | 234 +++++++++++++++++++
.../processors/cache/GridCacheMvccSelfTest.java | 29 +--
.../processors/cache/GridCacheStopSelfTest.java | 49 ++--
...gniteCacheTransactionalStopBusySelfTest.java | 5 -
...GridCacheQueueMultiNodeAbstractSelfTest.java | 34 +--
...dCacheQueueMultiNodeConsistencySelfTest.java | 58 +++--
.../GridCacheSetFailoverAbstractSelfTest.java | 2 -
.../IgniteCacheMessageRecoveryAbstractTest.java | 14 +-
.../IgniteCacheTxMessageRecoveryTest.java | 5 -
...CachePartitionedTxMultiThreadedSelfTest.java | 2 +-
.../IpcSharedMemoryCrashDetectionSelfTest.java | 2 +
.../unsafe/GridUnsafeMemoryPerformanceTest.java | 65 ++++++
.../unsafe/GridUnsafeMemorySelfTest.java | 38 ---
.../tcp/TcpDiscoveryMultiThreadedTest.java | 2 +
.../junits/common/GridCommonAbstractTest.java | 59 +++--
.../IgniteCacheFailoverTestSuite2.java | 3 +
.../testsuites/IgniteCacheTestSuite4.java | 3 +
.../h2/GridIndexingSpiAbstractSelfTest.java | 13 --
.../query/h2/sql/BaseH2CompareQueryTest.java | 5 -
.../platform/cache/PlatformCache.java | 23 +-
.../cache/PlatformCacheEntryProcessorImpl.java | 4 +-
scripts/apply-pull-request.sh | 141 ++++++++---
52 files changed, 834 insertions(+), 368 deletions(-)
----------------------------------------------------------------------
[21/43] ignite git commit: IGNITE-1388 Platform .Net: cache.Invoke
result in async mode should have an error flag
Posted by vo...@apache.org.
IGNITE-1388 Platform .Net: cache.Invoke result in async mode should have an error flag
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/57555af6
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/57555af6
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/57555af6
Branch: refs/heads/master
Commit: 57555af62c93bdc8e012c1be7b6c6edd4d9d2ebe
Parents: 2326bb5
Author: ptupitsyn <pt...@gridgain.com>
Authored: Tue Sep 8 13:25:18 2015 +0300
Committer: ptupitsyn <pt...@gridgain.com>
Committed: Tue Sep 8 13:25:18 2015 +0300
----------------------------------------------------------------------
.../processors/platform/cache/PlatformCache.java | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/57555af6/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
index 27af344..0829617 100644
--- a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
+++ b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
@@ -984,14 +984,21 @@ public class PlatformCache extends PlatformAbstractTarget {
private static class EntryProcessorExceptionWriter implements PlatformFutureUtils.Writer {
/** <inheritDoc /> */
@Override public void write(PortableRawWriterEx writer, Object obj, Throwable err) {
- EntryProcessorException entryEx = (EntryProcessorException) err;
+ if (err == null) {
+ writer.writeBoolean(true); // success
- writeError(writer, entryEx);
+ writer.writeObjectDetached(obj);
+ }
+ else {
+ writer.writeBoolean(false); // failure
+
+ writeError(writer, (Exception) err);
+ }
}
/** <inheritDoc /> */
@Override public boolean canWrite(Object obj, Throwable err) {
- return err instanceof EntryProcessorException;
+ return true;
}
}
[41/43] ignite git commit: Enabled test.
Posted by vo...@apache.org.
Enabled test.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/857ab7e3
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/857ab7e3
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/857ab7e3
Branch: refs/heads/master
Commit: 857ab7e31954e88e93d5c8b40fa0d19856ff9678
Parents: 8389a7a
Author: sboikov <sb...@gridgain.com>
Authored: Wed Sep 9 10:01:49 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Sep 9 10:01:49 2015 +0300
----------------------------------------------------------------------
.../cache/IgniteCacheTransactionalStopBusySelfTest.java | 5 -----
1 file changed, 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/857ab7e3/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTransactionalStopBusySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTransactionalStopBusySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTransactionalStopBusySelfTest.java
index f2b4ad0..06e6045 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTransactionalStopBusySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTransactionalStopBusySelfTest.java
@@ -24,11 +24,6 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPr
*/
public class IgniteCacheTransactionalStopBusySelfTest extends IgniteCacheAbstractStopBusySelfTest {
/** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-257");
- }
-
- /** {@inheritDoc} */
@Override public void testPut() throws Exception {
bannedMsg.set(GridNearTxPrepareRequest.class);
[23/43] ignite git commit: Fixed test.
Posted by vo...@apache.org.
Fixed test.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/45ced671
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/45ced671
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/45ced671
Branch: refs/heads/master
Commit: 45ced671788bc804ca01ce17872316152dfe6acd
Parents: 86f8037
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 13:31:56 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 13:31:56 2015 +0300
----------------------------------------------------------------------
...GridCacheQueueMultiNodeAbstractSelfTest.java | 34 ++++++++++----------
1 file changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/45ced671/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java
index 1dca379..097181c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java
@@ -466,8 +466,6 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends IgniteColl
* @throws Exception If failed.
*/
public void testIterator() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-583");
-
final String queueName = UUID.randomUUID().toString();
info("Queue name: " + queueName);
@@ -475,35 +473,37 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends IgniteColl
try (IgniteQueue<Integer> queue = grid(0).queue(queueName, QUEUE_CAPACITY, config(false))) {
assertTrue(queue.isEmpty());
- grid(0).compute().call(new AddAllJob(queueName, RETRIES));
+ grid(0).compute().broadcast(new AddAllJob(queueName, RETRIES));
assertEquals(GRID_CNT * RETRIES, queue.size());
Collection<ClusterNode> nodes = grid(0).cluster().nodes();
for (ClusterNode node : nodes) {
- Collection<Integer> queueElements = compute(grid(0).cluster().forNode(node)).call(new IgniteCallable<Collection<Integer>>() {
- @IgniteInstanceResource
- private Ignite grid;
+ Collection<Integer> queueElements = compute(grid(0).cluster().forNode(node)).call(
+ new IgniteCallable<Collection<Integer>>() {
+ @IgniteInstanceResource
+ private Ignite grid;
- /** {@inheritDoc} */
- @Override public Collection<Integer> call() throws Exception {
- Collection<Integer> values = new ArrayList<>();
+ /** {@inheritDoc} */
+ @Override public Collection<Integer> call() throws Exception {
+ Collection<Integer> values = new ArrayList<>();
- grid.log().info("Running job [node=" + grid.cluster().localNode().id() + ", job=" + this + "]");
+ grid.log().info("Running job [node=" + grid.cluster().localNode().id() + "]");
- IgniteQueue<Integer> locQueue = grid.queue(queueName, 0, null);
+ IgniteQueue<Integer> locQueue = grid.queue(queueName, 0, null);
- grid.log().info("Queue size " + locQueue.size());
+ grid.log().info("Queue size " + locQueue.size());
- for (Integer element : locQueue)
- values.add(element);
+ for (Integer element : locQueue)
+ values.add(element);
- grid.log().info("Returning: " + values);
+ grid.log().info("Returning: " + values);
- return values;
+ return values;
+ }
}
- });
+ );
assertTrue(F.eqOrdered(queue, queueElements));
}
[15/43] ignite git commit: Merge branch 'ignite-1.4' of
https://git-wip-us.apache.org/repos/asf/ignite into ignite-1.4-main
Posted by vo...@apache.org.
Merge branch 'ignite-1.4' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1.4-main
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4c917c82
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4c917c82
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4c917c82
Branch: refs/heads/master
Commit: 4c917c8229d6cb00c3fc7edec53433266092f572
Parents: c315cb0 d8cd7ba
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Sep 8 12:35:32 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Sep 8 12:35:32 2015 +0300
----------------------------------------------------------------------
.../apache/ignite/internal/GridStartStopSelfTest.java | 13 +++++++------
.../query/h2/sql/BaseH2CompareQueryTest.java | 5 -----
2 files changed, 7 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
[25/43] ignite git commit: Merge remote-tracking branch
'origin/ignite-1.4' into ignite-1.4
Posted by vo...@apache.org.
Merge remote-tracking branch 'origin/ignite-1.4' into ignite-1.4
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/db827cfd
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/db827cfd
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/db827cfd
Branch: refs/heads/master
Commit: db827cfdfb521eb2233424f56a99e7e3830d4e35
Parents: 45ced67 b2b6ce6
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 13:35:39 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 13:35:39 2015 +0300
----------------------------------------------------------------------
.../platform/cache/PlatformCache.java | 23 +++++++++++++-------
.../cache/PlatformCacheEntryProcessorImpl.java | 4 ++--
2 files changed, 17 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
[10/43] ignite git commit: Enabled test.
Posted by vo...@apache.org.
Enabled test.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/fc362fb4
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/fc362fb4
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/fc362fb4
Branch: refs/heads/master
Commit: fc362fb4d530695e1a487386fd391995e9667473
Parents: 5264ec7
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 12:13:54 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 12:13:54 2015 +0300
----------------------------------------------------------------------
.../processors/query/h2/sql/BaseH2CompareQueryTest.java | 5 -----
1 file changed, 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/fc362fb4/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
index 1e89855..46076a9 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
@@ -444,20 +444,15 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
* @throws Exception If failed.
*/
public void testCrossCache() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-829");
-
- //TODO Investigate (should be 20 results instead of 0).
compareQueryRes0("select firstName, lastName" +
" from \"part\".Person, \"part\".Purchase" +
" where Person.id = Purchase.personId");
- //TODO Investigate.
compareQueryRes0("select concat(firstName, ' ', lastName), Product.name " +
" from \"part\".Person, \"part\".Purchase, \"repl\".Product " +
" where Person.id = Purchase.personId and Purchase.productId = Product.id" +
" group by Product.id");
- //TODO Investigate.
compareQueryRes0("select concat(firstName, ' ', lastName), count (Product.id) " +
" from \"part\".Person, \"part\".Purchase, \"repl\".Product " +
" where Person.id = Purchase.personId and Purchase.productId = Product.id" +
[03/43] ignite git commit: ignite-971 Fix swap/unswap,
added tests (do not call unswap for obsolete entry).
Posted by vo...@apache.org.
ignite-971 Fix swap/unswap, added tests (do not call unswap for obsolete entry).
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/18b5be3a
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/18b5be3a
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/18b5be3a
Branch: refs/heads/master
Commit: 18b5be3a7f33ac382c3ea9777327c3246e247e9c
Parents: 35bc5ec
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 09:51:49 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 09:51:49 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheEntryEx.java | 12 +-
.../cache/GridCacheEvictionManager.java | 2 +
.../processors/cache/GridCacheMapEntry.java | 11 +-
.../processors/cache/GridCacheSwapManager.java | 2 +-
.../distributed/dht/GridDhtCacheAdapter.java | 14 +-
.../distributed/dht/GridDhtLocalPartition.java | 23 +-
.../distributed/dht/GridDhtLockFuture.java | 6 +-
.../distributed/dht/GridDhtTxLocalAdapter.java | 22 +-
.../dht/preloader/GridDhtPreloader.java | 20 +-
.../distributed/near/GridNearTxRemote.java | 6 +-
.../transactions/IgniteTxLocalAdapter.java | 20 +-
.../cache/CacheAffinityCallSelfTest.java | 16 +-
.../cache/CacheSwapUnswapGetTest.java | 234 +++++++++++++++++++
.../testsuites/IgniteCacheTestSuite4.java | 3 +
14 files changed, 343 insertions(+), 48 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/18b5be3a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
index 698d043..98e86ed 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
@@ -641,8 +641,10 @@ public interface GridCacheEntryEx {
*
* @return Versioned entry.
* @throws IgniteCheckedException In case of error.
+ * @throws GridCacheEntryRemovedException If entry was removed.
*/
- public <K, V> GridCacheVersionedEntryEx<K, V> versionedEntry() throws IgniteCheckedException;
+ public <K, V> GridCacheVersionedEntryEx<K, V> versionedEntry()
+ throws IgniteCheckedException, GridCacheEntryRemovedException;
/**
* Sets new value if passed in version matches the current version
@@ -867,8 +869,10 @@ public interface GridCacheEntryEx {
/**
* @return Value.
* @throws IgniteCheckedException If failed to read from swap storage.
+ * @throws GridCacheEntryRemovedException If entry was removed.
*/
- @Nullable public CacheObject unswap() throws IgniteCheckedException;
+ @Nullable public CacheObject unswap()
+ throws IgniteCheckedException, GridCacheEntryRemovedException;
/**
* Unswap ignoring flags.
@@ -876,8 +880,10 @@ public interface GridCacheEntryEx {
* @param needVal If {@code false} then do not need to deserialize value during unswap.
* @return Value.
* @throws IgniteCheckedException If failed.
+ * @throws GridCacheEntryRemovedException If entry was removed.
*/
- @Nullable public CacheObject unswap(boolean needVal) throws IgniteCheckedException;
+ @Nullable public CacheObject unswap(boolean needVal)
+ throws IgniteCheckedException, GridCacheEntryRemovedException;
/**
* Tests whether or not given metadata is set.
http://git-wip-us.apache.org/repos/asf/ignite/blob/18b5be3a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
index b2fa2dd..f60c0eb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
@@ -994,6 +994,8 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter {
notRemove = new HashSet<>();
notRemove.add(entry);
+
+ continue;
}
if (obsoleteVer == null)
http://git-wip-us.apache.org/repos/asf/ignite/blob/18b5be3a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index e4882e5..eb4d864 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -433,7 +433,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
}
/** {@inheritDoc} */
- @Override public CacheObject unswap() throws IgniteCheckedException {
+ @Override public CacheObject unswap() throws IgniteCheckedException, GridCacheEntryRemovedException {
return unswap(true);
}
@@ -444,13 +444,16 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
* @return Value.
* @throws IgniteCheckedException If failed.
*/
- @Nullable @Override public CacheObject unswap(boolean needVal) throws IgniteCheckedException {
+ @Nullable @Override public CacheObject unswap(boolean needVal)
+ throws IgniteCheckedException, GridCacheEntryRemovedException {
boolean swapEnabled = cctx.swap().swapEnabled();
if (!swapEnabled && !cctx.isOffHeapEnabled())
return null;
synchronized (this) {
+ checkObsolete();
+
if (isStartVersion() && ((flags & IS_UNSWAPPED_MASK) == 0)) {
GridCacheSwapEntry e;
@@ -3056,7 +3059,8 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
}
/** {@inheritDoc} */
- @Override public synchronized GridCacheVersionedEntryEx versionedEntry() throws IgniteCheckedException {
+ @Override public synchronized GridCacheVersionedEntryEx versionedEntry()
+ throws IgniteCheckedException, GridCacheEntryRemovedException {
boolean isNew = isStartVersion();
CacheObject val = isNew ? unswap(true) : rawGetOrUnmarshalUnlocked(false);
@@ -3757,6 +3761,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
throws IgniteCheckedException {
assert Thread.holdsLock(this);
assert cctx.isSwapOrOffheapEnabled();
+ assert !obsolete();
GridCacheBatchSwapEntry ret = null;
http://git-wip-us.apache.org/repos/asf/ignite/blob/18b5be3a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
index 6a8a11a..7fd6013 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
@@ -151,7 +151,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
cctx.cache().metrics0().onOffHeapEvict();
}
catch (IgniteCheckedException e) {
- log.error("Failed to unmarshal off-heap entry [part=" + part + ", hash=" + hash + ']', e);
+ U.error(log, "Failed to unmarshal off-heap entry [part=" + part + ", hash=" + hash + ']', e);
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/18b5be3a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
index ee56b16..3ce9ee9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
@@ -839,9 +839,19 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
try {
if (swap) {
- entry = cache.entryEx(keys.get(i));
+ while (true) {
+ try {
+ entry = cache.entryEx(keys.get(i));
- entry.unswap(false);
+ entry.unswap(false);
+
+ break;
+ }
+ catch (GridCacheEntryRemovedException e) {
+ if (log.isDebugEnabled())
+ log.debug("Got removed entry: " + entry);
+ }
+ }
}
else
entry = cache.peekEx(keys.get(i));
http://git-wip-us.apache.org/repos/asf/ignite/blob/18b5be3a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
index 6d22dc7..215a1b5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
@@ -34,6 +34,7 @@ import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.internal.IgniteInterruptedCheckedException;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.GridCacheEntryRemovedException;
import org.apache.ignite.internal.processors.cache.GridCacheSwapEntry;
import org.apache.ignite.internal.processors.cache.KeyCacheObject;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPreloader;
@@ -717,17 +718,23 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
byte[] keyBytes = entry.getKey();
- try {
- KeyCacheObject key = cctx.toCacheKeyObject(keyBytes);
+ while (true) {
+ try {
+ KeyCacheObject key = cctx.toCacheKeyObject(keyBytes);
- lastEntry = (GridDhtCacheEntry)cctx.cache().entryEx(key, false);
+ lastEntry = (GridDhtCacheEntry)cctx.cache().entryEx(key, false);
- lastEntry.unswap(true);
+ lastEntry.unswap(true);
- return lastEntry;
- }
- catch (IgniteCheckedException e) {
- throw new CacheException(e);
+ return lastEntry;
+ }
+ catch (GridCacheEntryRemovedException e) {
+ if (log.isDebugEnabled())
+ log.debug("Got removed entry: " + lastEntry);
+ }
+ catch (IgniteCheckedException e) {
+ throw new CacheException(e);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/18b5be3a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
index 4275623..2c16534 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
@@ -872,12 +872,12 @@ public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean>
for (ListIterator<GridDhtCacheEntry> it = dhtMapping.listIterator(); it.hasNext();) {
GridDhtCacheEntry e = it.next();
- // Must unswap entry so that isNewLocked returns correct value.
- e.unswap(false);
-
boolean needVal = false;
try {
+ // Must unswap entry so that isNewLocked returns correct value.
+ e.unswap(false);
+
needVal = e.isNewLocked();
if (needVal) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/18b5be3a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
index 194da15..762d26f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
@@ -622,11 +622,27 @@ public abstract class GridDhtTxLocalAdapter extends IgniteTxLocalAdapter {
// First time access.
if (txEntry == null) {
- GridDhtCacheEntry cached = dhtCache.entryExx(key, topVer);
+ GridDhtCacheEntry cached;
- addActiveCache(dhtCache.context());
+ if (dhtCache.context().isSwapOrOffheapEnabled()) {
+ while (true) {
+ try {
+ cached = dhtCache.entryExx(key, topVer);
+
+ cached.unswap(read);
+
+ break;
+ }
+ catch (GridCacheEntryRemovedException e) {
+ if (log.isDebugEnabled())
+ log.debug("Get removed entry: " + key);
+ }
+ }
+ }
+ else
+ cached = dhtCache.entryExx(key, topVer);
- cached.unswap(read);
+ addActiveCache(dhtCache.context());
txEntry = addEntry(NOOP,
null,
http://git-wip-us.apache.org/repos/asf/ignite/blob/18b5be3a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
index 501d624..36c80a9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
@@ -35,6 +35,7 @@ import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
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.GridCachePreloaderAdapter;
import org.apache.ignite.internal.processors.cache.KeyCacheObject;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtAffinityAssignmentRequest;
@@ -378,9 +379,19 @@ public class GridDhtPreloader extends GridCachePreloaderAdapter {
GridCacheEntryEx entry;
if (cctx.isSwapOrOffheapEnabled()) {
- entry = cctx.dht().entryEx(k, true);
-
- entry.unswap();
+ while (true) {
+ try {
+ entry = cctx.dht().entryEx(k);
+
+ entry.unswap();
+
+ break;
+ }
+ catch (GridCacheEntryRemovedException ignore) {
+ if (log.isDebugEnabled())
+ log.debug("Got removed entry: " + k);
+ }
+ }
}
else
entry = cctx.dht().peekEx(k);
@@ -393,6 +404,9 @@ public class GridDhtPreloader extends GridCachePreloaderAdapter {
if (info != null && !info.isNew())
res.addInfo(info);
+
+ if (cctx.isSwapOrOffheapEnabled())
+ cctx.evicts().touch(entry, msg.topologyVersion());
}
else if (log.isDebugEnabled())
log.debug("Key is not present in DHT cache: " + k);
http://git-wip-us.apache.org/repos/asf/ignite/blob/18b5be3a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java
index fff6dde..4395198 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java
@@ -280,9 +280,9 @@ public class GridNearTxRemote extends GridDistributedTxRemoteAdapter {
return false;
}
else {
- cached.unswap();
-
try {
+ cached.unswap();
+
CacheObject val = cached.peek(true, false, false, null);
if (val == null && cached.evictInternal(false, xidVer, null)) {
@@ -313,7 +313,9 @@ public class GridNearTxRemote extends GridDistributedTxRemoteAdapter {
}
/**
+ * @param cacheCtx Cache context.
* @param key Key to add to read set.
+ * @param op Operation.
* @param val Value.
* @param drVer Data center replication version.
* @param skipStore Skip store flag.
http://git-wip-us.apache.org/repos/asf/ignite/blob/18b5be3a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index 97e88a7..7d32401 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -2159,20 +2159,20 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
// First time access.
if (txEntry == null) {
while (true) {
- GridCacheEntryEx entry;
+ GridCacheEntryEx entry = null;
- if (cached != null) {
- entry = cached;
+ try {
+ if (cached != null) {
+ entry = cached;
- cached = null;
- }
- else {
- entry = entryEx(cacheCtx, txKey, topologyVersion());
+ cached = null;
+ }
+ else {
+ entry = entryEx(cacheCtx, txKey, topologyVersion());
- entry.unswap(false);
- }
+ entry.unswap(false);
+ }
- try {
// Check if lock is being explicitly acquired by the same thread.
if (!implicit && cctx.kernalContext().config().isCacheSanityCheckEnabled() &&
entry.lockedByThread(threadId, xidVer))
http://git-wip-us.apache.org/repos/asf/ignite/blob/18b5be3a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java
index c25bc7c..b9ff46c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java
@@ -21,15 +21,13 @@ import java.util.concurrent.Callable;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteCompute;
-import org.apache.ignite.cluster.ClusterGroupEmptyException;
import org.apache.ignite.cluster.ClusterNode;
-import org.apache.ignite.compute.ComputeTaskCancelledException;
+import org.apache.ignite.cluster.ClusterTopologyException;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.internal.IgniteKernal;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
-import org.apache.ignite.internal.processors.affinity.GridAffinityProcessor;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.lang.IgniteCallable;
import org.apache.ignite.lang.IgniteRunnable;
@@ -147,7 +145,7 @@ public class CacheAffinityCallSelfTest extends GridCommonAbstractTest {
final IgniteInternalFuture<Object> fut = GridTestUtils.runAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
for (int i = 0; i < SERVERS_COUNT; ++i)
- stopGrid(i);
+ stopGrid(i, false);
return null;
}
@@ -157,14 +155,12 @@ public class CacheAffinityCallSelfTest extends GridCommonAbstractTest {
while (!fut.isDone())
client.compute().affinityCall(CACHE_NAME, key, new CheckCallable(key));
}
- catch (ComputeTaskCancelledException e) {
- assertTrue("Unexpected error: " + e, e.getMessage().contains("stopping"));
+ catch (ClusterTopologyException ignore) {
+ log.info("Expected error: " + ignore);
}
- catch(ClusterGroupEmptyException e) {
- assertTrue("Unexpected error: " + e, e.getMessage().contains("Topology projection is empty"));
+ finally {
+ stopAllGrids();
}
-
- stopAllGrids();
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/18b5be3a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSwapUnswapGetTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSwapUnswapGetTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSwapUnswapGetTest.java
new file mode 100644
index 0000000..271d8b1
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSwapUnswapGetTest.java
@@ -0,0 +1,234 @@
+/*
+ * 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.internal.processors.cache;
+
+import java.util.Collections;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ThreadLocalRandom;
+import java.util.concurrent.atomic.AtomicBoolean;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.CacheMemoryMode;
+import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.util.typedef.CAX;
+import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.spi.swapspace.file.FileSwapSpaceSpi;
+import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.eclipse.jetty.util.ConcurrentHashSet;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
+
+/**
+ *
+ */
+public class CacheSwapUnswapGetTest extends GridCommonAbstractTest {
+ /** */
+ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
+
+ /** */
+ private static final long DURATION = 30_000;
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
+
+ cfg.setSwapSpaceSpi(new FileSwapSpaceSpi());
+
+ return cfg;
+ }
+
+ /**
+ * @param atomicityMode Cache atomicity mode.
+ * @param memMode Cache memory mode.
+ * @param swap {@code True} if swap enabled.
+ * @return Cache configuration.
+ */
+ private CacheConfiguration<Integer, String> cacheConfiguration(CacheAtomicityMode atomicityMode,
+ CacheMemoryMode memMode,
+ boolean swap) {
+ CacheConfiguration<Integer, String> ccfg = new CacheConfiguration<>();
+
+ ccfg.setAtomicityMode(atomicityMode);
+ ccfg.setWriteSynchronizationMode(FULL_SYNC);
+ ccfg.setMemoryMode(memMode);
+
+ if (memMode == CacheMemoryMode.ONHEAP_TIERED) {
+ LruEvictionPolicy plc = new LruEvictionPolicy();
+ plc.setMaxSize(100);
+
+ ccfg.setEvictionPolicy(plc);
+ }
+
+ if (swap) {
+ ccfg.setSwapEnabled(true);
+
+ ccfg.setOffHeapMaxMemory(1000);
+ }
+ else
+ ccfg.setOffHeapMaxMemory(0);
+
+ return ccfg;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void beforeTestsStarted() throws Exception {
+ super.beforeTestsStarted();
+
+ startGrid(0);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTestsStopped() throws Exception {
+ super.afterTestsStopped();
+
+ stopAllGrids();
+ }
+
+ /** {@inheritDoc} */
+ @Override protected long getTestTimeout() {
+ return DURATION + 60_000;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testTxCacheOffheapEvict() throws Exception {
+ swapUnswap(TRANSACTIONAL, CacheMemoryMode.ONHEAP_TIERED, false);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testTxCacheOffheapTiered() throws Exception {
+ swapUnswap(TRANSACTIONAL, CacheMemoryMode.OFFHEAP_TIERED, false);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testAtomicCacheOffheapEvict() throws Exception {
+ swapUnswap(ATOMIC, CacheMemoryMode.ONHEAP_TIERED, false);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testAtomicCacheOffheapTiered() throws Exception {
+ swapUnswap(ATOMIC, CacheMemoryMode.OFFHEAP_TIERED, false);
+ }
+
+ /**
+ * @param atomicityMode Cache atomicity mode.
+ * @param memMode Cache memory mode.
+ * @param swap {@code True} if swap enabled.
+ * @throws Exception If failed.
+ */
+ private void swapUnswap(CacheAtomicityMode atomicityMode, CacheMemoryMode memMode, boolean swap) throws Exception {
+ log.info("Start test [mode=" + atomicityMode + ", swap=" + swap + ']');
+
+ int threadCnt = 20;
+ final int keyCnt = 1000;
+ final int valCnt = 10000;
+
+ final Ignite g = grid(0);
+
+ final ConcurrentHashSet<Integer> keys = new ConcurrentHashSet<>();
+
+ final AtomicBoolean done = new AtomicBoolean();
+
+ g.destroyCache(null);
+
+ final IgniteCache<Integer, String> cache = g.createCache(cacheConfiguration(atomicityMode, memMode, swap));
+
+ try {
+ IgniteInternalFuture<?> fut = multithreadedAsync(new CAX() {
+ @Override public void applyx() throws IgniteCheckedException {
+ ThreadLocalRandom rnd = ThreadLocalRandom.current();
+
+ while (!done.get()) {
+ Integer key = rnd.nextInt(keyCnt);
+
+ switch (rnd.nextInt(3)) {
+ case 0:
+ cache.put(key, String.valueOf(rnd.nextInt(valCnt)));
+
+ keys.add(key);
+
+ break;
+
+ case 1:
+ cache.localEvict(Collections.singletonList(key));
+
+ break;
+
+ case 2:
+ if (keys.contains(key)) {
+ String val = cache.get(key);
+
+ assertNotNull(val);
+ }
+
+ break;
+
+ default:
+ assert false;
+ }
+ }
+ }
+ }, threadCnt, "update-thread");
+
+ IgniteInternalFuture<?> getFut = GridTestUtils.runAsync(new Callable<Void>() {
+ @Override public Void call() throws Exception {
+ Thread.currentThread().setName("get-thread");
+
+ while (!done.get()) {
+ for (Integer key : keys) {
+ String val = cache.get(key);
+
+ assertNotNull(val);
+ }
+ }
+
+ return null;
+ }
+ });
+
+ Thread.sleep(DURATION);
+
+ done.set(true);
+
+ fut.get();
+ getFut.get();
+ }
+ finally {
+ done.set(true);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/18b5be3a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
index f8ef097..88977fb 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
@@ -34,6 +34,7 @@ import org.apache.ignite.internal.processors.cache.CacheStoreUsageMultinodeDynam
import org.apache.ignite.internal.processors.cache.CacheStoreUsageMultinodeDynamicStartTxTest;
import org.apache.ignite.internal.processors.cache.CacheStoreUsageMultinodeStaticStartAtomicTest;
import org.apache.ignite.internal.processors.cache.CacheStoreUsageMultinodeStaticStartTxTest;
+import org.apache.ignite.internal.processors.cache.CacheSwapUnswapGetTest;
import org.apache.ignite.internal.processors.cache.GridCacheMarshallingNodeJoinSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheMultinodeUpdateAtomicNearEnabledSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheMultinodeUpdateAtomicSelfTest;
@@ -256,6 +257,8 @@ public class IgniteCacheTestSuite4 extends TestSuite {
suite.addTestSuite(CacheVersionedEntryReplicatedAtomicOffHeapSelfTest.class);
suite.addTestSuite(CacheVersionedEntryReplicatedTransactionalOffHeapSelfTest.class);
+ suite.addTestSuite(CacheSwapUnswapGetTest.class);
+
return suite;
}
}
\ No newline at end of file
[20/43] ignite git commit: Merge branch 'ignite-1387' of
https://github.com/ptupitsyn/ignite into ignite-1.4
Posted by vo...@apache.org.
Merge branch 'ignite-1387' of https://github.com/ptupitsyn/ignite into ignite-1.4
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a91f386e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a91f386e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a91f386e
Branch: refs/heads/master
Commit: a91f386e1b6df163090e48ecd97384b0411a2f9d
Parents: 86f8037 2326bb5
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Tue Sep 8 13:23:16 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Sep 8 13:23:16 2015 +0300
----------------------------------------------------------------------
.../platform/cache/PlatformCacheEntryProcessorImpl.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
[36/43] ignite git commit: ignite-1383: Fixed.
Posted by vo...@apache.org.
ignite-1383: Fixed.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/108dd8f9
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/108dd8f9
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/108dd8f9
Branch: refs/heads/master
Commit: 108dd8f9721b80a5355bd0b472037276ad7d4c5f
Parents: db827cf
Author: ashutak <as...@gridgain.com>
Authored: Tue Sep 8 17:30:15 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Tue Sep 8 17:30:15 2015 +0300
----------------------------------------------------------------------
scripts/apply-pull-request.sh | 141 ++++++++++++++++++++++++++++---------
1 file changed, 109 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/108dd8f9/scripts/apply-pull-request.sh
----------------------------------------------------------------------
diff --git a/scripts/apply-pull-request.sh b/scripts/apply-pull-request.sh
index d852d78..dd2b78c 100755
--- a/scripts/apply-pull-request.sh
+++ b/scripts/apply-pull-request.sh
@@ -19,66 +19,139 @@
#
# Pull request applier.
#
-echo 'Usage: scripts/apply-pull-request.sh <pull-request-id>'
-echo 'The script takes pull-request by given id and merges (with squash) all changes too master branch.'
-echo "Argument 'pull-request-id' is mandatory."
-echo
-IGNITE_HOME="$(dirname "$(cd "$(dirname "$0")"; "pwd")")";
+#
+# Start of Functions.
+#
+
+#
+# Prints usage.
+#
+usage () {
+ echo 'Usage: scripts/apply-pull-request.sh <pull-request-id> [-tb|--targetbranch <branch-name>]'
+ echo 'The script takes pull-request by given id and merges (with squash) all changes to target branch (master by default).'
+ echo "Argument 'pull-request-id' is mandatory."
+ echo "Target branch can be overwritten by using [-tb|--targetbranch <branch-name>] argument paramethers."
+}
+
+#
+# End of Functions.
+#
+
+if [ "${GIT_HOME}" = "" ]; then
+ GIT_HOME="$(dirname "$(cd "$(dirname "$0")"; "pwd")")";
+fi
-. ${IGNITE_HOME}/scripts/git-patch-functions.sh # Import patch functions.
+cd ${GIT_HOME}
-# Constants.
-APACHE_GIT="https://git-wip-us.apache.org/repos/asf/ignite"
-GITHUB_MIRROR="https://github.com/apache/ignite.git"
+if [ "${SCRIPTS_HOME}" = "" ]; then
+ SCRIPTS_HOME="${GIT_HOME}/scripts/"
+fi
+
+. ${SCRIPTS_HOME}/git-patch-functions.sh # Import patch functions.
-# Get paramethers.
PR_ID=$1
-# Initial checks.
+#
+# Start reading of command line params.
+#
if [ "${PR_ID}" = "" ]; then
echo $0", ERROR:"
echo >&2 "You have to specify 'pull-request-id'."
+ echo
+ usage
exit 1
fi
-requireCleanWorkTree ${IGNITE_HOME}
+if [ "${PR_ID}" = "-h" ]; then
+ usage
+ exit 0
+fi
+
+if [ "${PR_ID}" = "--help" ]; then
+ usage
+ exit 0
+fi
+
+
+while [[ $# > 2 ]]
+do
+ key="$2"
+
+ case $key in
+ -tb|--targetbranch)
+ TARGET_BRANCH="$3"
+ shift
+ ;;
+
+ *)
+ echo "Unknown parameter: ${key}"
+ echo
+ usage
+ ;;
+ esac
+ shift
+done
+#
+# Enf reading of command line params.
+#
+
+
+# Script variables.
+if [ "${APACHE_GIT}" = "" ]; then
+ APACHE_GIT="https://git-wip-us.apache.org/repos/asf/ignite"
+fi
+
+if [ "${GITHUB_MIRROR}" = "" ]; then
+ GITHUB_MIRROR="https://github.com/apache/ignite.git"
+fi
+
+if [ "${TARGET_BRANCH}" = "" ]; then
+ TARGET_BRANCH="master"
+fi
+
+requireCleanWorkTree ${GIT_HOME}
CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD`
-if [ "$CURRENT_BRANCH" != "master" ]; then
+if [ "$CURRENT_BRANCH" != "${TARGET_BRANCH}" ]; then
echo $0", ERROR:"
- echo "You have to be on master branch."
+ echo "You have to be on ${TARGET_BRANCH} branch."
exit 1
fi
-# Check that master is up-to-date.
-APACHE_GIT_MASTER_BRANCH="apache-git-master-tmp"
+# Check that target branch is up-to-date.
+APACHE_GIT_TARGET_BRANCH="apache-git-target-br-tmp"
-git fetch ${APACHE_GIT} master:${APACHE_GIT_MASTER_BRANCH} &> /dev/null
+git fetch ${APACHE_GIT} ${TARGET_BRANCH}:${APACHE_GIT_TARGET_BRANCH} &> /dev/null
+if test $? != 0; then
+ echo $0", ERROR:"
+ echo >&2 "Couldn't fetch '${TARGET_BRANCH}' branch from ${APACHE_GIT}."
+ exit 1
+fi
-LOCAL_MASTER_HASH=$(git rev-parse @)
-REMOTE_MASTER_HASH=$(git rev-parse ${APACHE_GIT_MASTER_BRANCH})
-BASE_HASH=$(git merge-base @ ${APACHE_GIT_MASTER_BRANCH})
+LOCAL_TARGET_BR_HASH=$(git rev-parse @)
+REMOTE_TARGET_BR_HASH=$(git rev-parse ${APACHE_GIT_TARGET_BRANCH})
+BASE_HASH=$(git merge-base @ ${APACHE_GIT_TARGET_BRANCH})
-git branch -D ${APACHE_GIT_MASTER_BRANCH} &> /dev/null
+git branch -D ${APACHE_GIT_TARGET_BRANCH} &> /dev/null
-if [ $LOCAL_MASTER_HASH != $REMOTE_MASTER_HASH ]; then
+if [ $LOCAL_TARGET_BR_HASH != $REMOTE_TARGET_BR_HASH ]; then
echo $0", ERROR:"
- if [ $LOCAL_MASTER_HASH = $BASE_HASH ]; then
- echo "Your local master branch is not up-to-date. You need to pull."
- elif [ $REMOTE_MASTER_HASH = $BASE_HASH ]; then
- echo "Your local master branch is ahead of master branch at Apache git. You need to push."
+ if [ $LOCAL_TARGET_BR_HASH = $BASE_HASH ]; then
+ echo "Your local ${TARGET_BRANCH} branch is not up-to-date. You need to pull."
+ elif [ $REMOTE_TARGET_BR_HASH = $BASE_HASH ]; then
+ echo "Your local ${TARGET_BRANCH} branch is ahead of ${TARGET_BRANCH} branch at Apache git. You need to push."
else
- echo "Your local master and Apache git master branches diverged. You need to pull, merge and pull."
+ echo "Your local ${TARGET_BRANCH} and Apache git ${TARGET_BRANCH} branches diverged. You need to pull, merge and pull."
fi
exit 1
fi
-echo "Local master is Up-to-date."
+echo "Local ${TARGET_BRANCH} is Up-to-date."
echo
# Checkout pull-request branch.
@@ -105,8 +178,8 @@ ORIG_COMMENT="$(git log -1 --pretty=%B)"
echo "Author of pull-request: '$AUTHOR'."
echo
-# Update local master.
-git checkout master &> /dev/null
+# Update local target branch.
+git checkout ${TARGET_BRANCH} &> /dev/null
# Take changes.
git merge --squash ${PR_BRANCH_NAME} &> /dev/null
@@ -114,7 +187,7 @@ if test $? != 0; then
git reset --hard &> /dev/null
echo $0", ERROR:"
- echo >&2 "Could not merge the pull-request to master without conflicts. All local changes have been discarded. You're on master branch."
+ echo >&2 "Could not merge the pull-request to ${TARGET_BRANCH} without conflicts. All local changes have been discarded. You're on ${TARGET_BRANCH} branch."
exit 1
fi
@@ -130,10 +203,14 @@ fi
COMMENT="${COMMENT} - Fixes #${PR_ID}."
+if [ "${EXCLUDE_SPECIAL_FILE}" = "true" ]; then
+ git checkout HEAD ignite-pull-request-id
+fi
+
git commit --author "${AUTHOR}" -a -s -m "${COMMENT}" &> /dev/null
echo "Squash commit for pull request with id='${PR_ID}' has been added. The commit has been added with comment '${COMMENT}'."
-echo "Now you can review changes of the last commit at master and push it to Ignite Apche git after."
+echo "Now you can review changes of the last commit at ${TARGET_BRANCH} and push it into ${APACHE_GIT} git after."
echo "If you want to decline changes, you can remove the last commit from your repo by 'git reset --hard HEAD^'."
echo
[34/43] ignite git commit: Moved performance test to separate class.
Posted by vo...@apache.org.
Moved performance test to separate class.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/21983810
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/21983810
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/21983810
Branch: refs/heads/master
Commit: 219838108e04583bd2126773ce1a84cd83522f3c
Parents: e08205d
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 16:59:09 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 16:59:09 2015 +0300
----------------------------------------------------------------------
.../unsafe/GridUnsafeMemoryPerformanceTest.java | 65 ++++++++++++++++++++
.../unsafe/GridUnsafeMemorySelfTest.java | 38 ------------
2 files changed, 65 insertions(+), 38 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/21983810/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemoryPerformanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemoryPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemoryPerformanceTest.java
new file mode 100644
index 0000000..b231a6f
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemoryPerformanceTest.java
@@ -0,0 +1,65 @@
+/*
+ * 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.internal.util.offheap.unsafe;
+
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.util.typedef.X;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+
+/**
+ *
+ */
+public class GridUnsafeMemoryPerformanceTest extends GridCommonAbstractTest {
+ /**
+ * @throws Exception If failed.
+ */
+ public void testGuardedOpsPerformance() throws Exception {
+ final GridUnsafeGuard guard = new GridUnsafeGuard();
+
+ final AtomicInteger i = new AtomicInteger();
+
+ final AtomicBoolean run = new AtomicBoolean(true);
+
+ IgniteInternalFuture<?> fut = multithreadedAsync(new Runnable() {
+ @Override public void run() {
+ int x = 0;
+
+ while (run.get()) {
+ guard.begin();
+ guard.end();
+
+ x++;
+ }
+
+ i.addAndGet(x);
+ }
+ }, 4);
+
+ int time = 60;
+
+ Thread.sleep(time * 1000);
+
+ run.set(false);
+
+ fut.get();
+
+ X.println("Op/sec: " + (float) i.get() / time);
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/21983810/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemorySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemorySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemorySelfTest.java
index 7a8c98d..600098b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemorySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemorySelfTest.java
@@ -259,44 +259,6 @@ public class GridUnsafeMemorySelfTest extends GridCommonAbstractTest {
}
/**
- * @throws Exception If failed.
- */
- public void testGuardedOpsPerformance() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-823");
-
- final GridUnsafeGuard guard = new GridUnsafeGuard();
-
- final AtomicInteger i = new AtomicInteger();
-
- final AtomicBoolean run = new AtomicBoolean(true);
-
- IgniteInternalFuture<?> fut = multithreadedAsync(new Runnable() {
- @Override public void run() {
- int x = 0;
-
- while (run.get()) {
- guard.begin();
- guard.end();
-
- x++;
- }
-
- i.addAndGet(x);
- }
- }, 4);
-
- int time = 60;
-
- Thread.sleep(time * 1000);
-
- run.set(false);
-
- fut.get();
-
- X.println("Op/sec: " + (float)i.get() / time);
- }
-
- /**
* @throws Exception if failed.
*/
public void testGuardedOps() throws Exception {
[26/43] ignite git commit: Fixed test.
Posted by vo...@apache.org.
Fixed test.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b7bdfe20
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b7bdfe20
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b7bdfe20
Branch: refs/heads/master
Commit: b7bdfe20c9e0bc6b3fa3883223ef978562e4f2d3
Parents: db827cf
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 13:46:40 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 13:46:40 2015 +0300
----------------------------------------------------------------------
...dCacheQueueMultiNodeConsistencySelfTest.java | 58 ++++++++++++--------
1 file changed, 34 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/b7bdfe20/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java
index e26c9ef..2d817be 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java
@@ -28,6 +28,8 @@ import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheMemoryMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.configuration.CollectionConfiguration;
+import org.apache.ignite.internal.IgniteKernal;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
import org.apache.ignite.lang.IgniteCallable;
import org.apache.ignite.resources.IgniteInstanceResource;
@@ -47,9 +49,6 @@ public class GridCacheQueueMultiNodeConsistencySelfTest extends IgniteCollection
/** */
protected static final int RETRIES = 20;
- /** */
- private static final int PRELOAD_DELAY = 200;
-
/** Indicates whether force repartitioning is needed or not. */
private boolean forceRepartition;
@@ -60,11 +59,6 @@ public class GridCacheQueueMultiNodeConsistencySelfTest extends IgniteCollection
private int backups;
/** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-583");
- }
-
- /** {@inheritDoc} */
@Override protected void beforeTestsStarted() throws Exception {
// No-op.
}
@@ -165,9 +159,23 @@ public class GridCacheQueueMultiNodeConsistencySelfTest extends IgniteCollection
if (stopRandomGrid)
stopGrid(1 + new Random().nextInt(GRID_CNT));
- if (forceRepartition)
- for (int i = 0; i < GRID_CNT; i++)
- jcache(i).rebalance();
+ if (forceRepartition) {
+ for (int i = 0; i < GRID_CNT; i++) {
+ IgniteKernal ignite = (IgniteKernal)grid(i);
+
+ boolean found = false;
+
+ for (GridCacheContext ctx : ignite.context().cache().context().cacheContexts()) {
+ if (ctx.name() != null && ctx.name().startsWith("datastructures")) {
+ ctx.cache().rebalance().get();
+
+ found = true;
+ }
+ }
+
+ assertTrue(found);
+ }
+ }
Ignite newIgnite = startGrid(GRID_CNT + 1);
@@ -175,26 +183,28 @@ public class GridCacheQueueMultiNodeConsistencySelfTest extends IgniteCollection
// IgniteQueue<Integer> newQueue = newGrid.cache().queue(queueName);
// assertTrue(CollectionUtils.isEqualCollection(queue0, newQueue));
- Collection<Integer> locQueueContent = compute(newIgnite.cluster().forLocal()).call(new IgniteCallable<Collection<Integer>>() {
- @IgniteInstanceResource
- private Ignite grid;
+ Collection<Integer> locQueueContent = compute(newIgnite.cluster().forLocal()).call(
+ new IgniteCallable<Collection<Integer>>() {
+ @IgniteInstanceResource
+ private Ignite grid;
- /** {@inheritDoc} */
- @Override public Collection<Integer> call() throws Exception {
- Collection<Integer> values = new ArrayList<>();
+ /** {@inheritDoc} */
+ @Override public Collection<Integer> call() throws Exception {
+ Collection<Integer> values = new ArrayList<>();
- grid.log().info("Running job [node=" + grid.cluster().localNode().id() + ", job=" + this + "]");
+ grid.log().info("Running job [node=" + grid.cluster().localNode().id() + ", job=" + this + "]");
- IgniteQueue<Integer> locQueue = grid.queue(queueName, QUEUE_CAPACITY, config(false));
+ IgniteQueue<Integer> locQueue = grid.queue(queueName, QUEUE_CAPACITY, config(false));
- grid.log().info("Queue size " + locQueue.size());
+ grid.log().info("Queue size " + locQueue.size());
- for (Integer element : locQueue)
- values.add(element);
+ for (Integer element : locQueue)
+ values.add(element);
- return values;
+ return values;
+ }
}
- });
+ );
assertTrue(CollectionUtils.isEqualCollection(queue0, locQueueContent));
[04/43] ignite git commit: ignite-1349 Cleanup thread local context
for system pool threads.
Posted by vo...@apache.org.
ignite-1349 Cleanup thread local context for system pool threads.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/bbfee454
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/bbfee454
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/bbfee454
Branch: refs/heads/master
Commit: bbfee45418587b6f04e2a6141ae275f133f65d05
Parents: 18b5be3
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 09:56:48 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 09:56:48 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheAdapter.java | 11 +++++++-
.../cache/GridCacheMvccCandidate.java | 6 ++--
.../cache/GridCacheSharedContext.java | 7 +++++
.../distributed/dht/GridDhtTxPrepareFuture.java | 3 ++
.../colocated/GridDhtColocatedLockFuture.java | 14 ++++++++--
.../distributed/near/GridNearLockFuture.java | 14 ++++++++--
.../near/GridNearOptimisticTxPrepareFuture.java | 7 ++++-
.../processors/cache/GridCacheMvccSelfTest.java | 29 +++++++-------------
.../IgniteCacheFailoverTestSuite2.java | 3 ++
9 files changed, 67 insertions(+), 27 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/bbfee454/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 68749b9..79c5e4b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -4235,6 +4235,9 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
throw e1;
}
+ finally {
+ ctx.shared().txContextReset();
+ }
}
});
}
@@ -4245,7 +4248,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
return f;
}
- IgniteInternalFuture<T> f = op.op(tx).chain(new CX1<IgniteInternalFuture<T>, T>() {
+ final IgniteInternalFuture<T> f = op.op(tx).chain(new CX1<IgniteInternalFuture<T>, T>() {
@Override public T applyx(IgniteInternalFuture<T> tFut) throws IgniteCheckedException {
try {
return tFut.get();
@@ -4255,6 +4258,9 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
throw e1;
}
+ finally {
+ ctx.shared().txContextReset();
+ }
}
});
@@ -4881,6 +4887,9 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
catch (IgniteCheckedException e) {
onDone(e);
}
+ finally {
+ ctx.shared().txContextReset();
+ }
}
});
http://git-wip-us.apache.org/repos/asf/ignite/blob/bbfee454/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccCandidate.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccCandidate.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccCandidate.java
index 0e75d3b..2df103d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccCandidate.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccCandidate.java
@@ -523,14 +523,16 @@ public class GridCacheMvccCandidate implements Externalizable,
/**
* @return Lock that comes before in the same thread, possibly <tt>null</tt>.
*/
- public GridCacheMvccCandidate previous() {
+ @Nullable public GridCacheMvccCandidate previous() {
return prev;
}
/**
- * @param prev Lock that comes before in the same thread, possibly <tt>null</tt>.
+ * @param prev Lock that comes before in the same thread.
*/
public void previous(GridCacheMvccCandidate prev) {
+ assert threadId == prev.threadId;
+
this.prev = prev;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/bbfee454/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
index beffdd1..90e0921 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
@@ -678,4 +678,11 @@ public class GridCacheSharedContext<K, V> {
return mgr;
}
+
+ /**
+ * Reset thread-local context for transactional cache.
+ */
+ public void txContextReset() {
+ mvccMgr.contextReset();
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/bbfee454/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 f1771d4..6e8460f 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
@@ -537,6 +537,9 @@ public final class GridDhtTxPrepareFuture extends GridCompoundFuture<IgniteInter
catch (IgniteCheckedException e) {
onError(e);
}
+ finally {
+ cctx.txContextReset();
+ }
}
});
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/bbfee454/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
index ce547b6..f7093b8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
@@ -635,7 +635,12 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
else {
fut.listen(new CI1<IgniteInternalFuture<AffinityTopologyVersion>>() {
@Override public void apply(IgniteInternalFuture<AffinityTopologyVersion> t) {
- mapOnTopology(remap, c);
+ try {
+ mapOnTopology(remap, c);
+ }
+ finally {
+ cctx.shared().txContextReset();
+ }
}
});
}
@@ -1312,7 +1317,12 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
if (affFut != null && !affFut.isDone()) {
affFut.listen(new CI1<IgniteInternalFuture<?>>() {
@Override public void apply(IgniteInternalFuture<?> fut) {
- remap();
+ try {
+ remap();
+ }
+ finally {
+ cctx.shared().txContextReset();
+ }
}
});
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/bbfee454/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
index 629dbb7..26276f0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
@@ -769,7 +769,12 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
else {
fut.listen(new CI1<IgniteInternalFuture<AffinityTopologyVersion>>() {
@Override public void apply(IgniteInternalFuture<AffinityTopologyVersion> t) {
- mapOnTopology(remap);
+ try {
+ mapOnTopology(remap);
+ }
+ finally {
+ cctx.shared().txContextReset();
+ }
}
});
}
@@ -1420,7 +1425,12 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
if (affFut != null && !affFut.isDone()) {
affFut.listen(new CI1<IgniteInternalFuture<?>>() {
@Override public void apply(IgniteInternalFuture<?> fut) {
- remap();
+ try {
+ remap();
+ }
+ finally {
+ cctx.shared().txContextReset();
+ }
}
});
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/bbfee454/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
index e825e70..529f29c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
@@ -324,7 +324,12 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearTxPrepareFutureAd
@Override public void apply(IgniteInternalFuture<AffinityTopologyVersion> t) {
cctx.kernalContext().closure().runLocalSafe(new GridPlainRunnable() {
@Override public void run() {
- prepareOnTopology(remap, c);
+ try {
+ prepareOnTopology(remap, c);
+ }
+ finally {
+ cctx.txContextReset();
+ }
}
});
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/bbfee454/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java
index c1bf2f1..f2bb8fa 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java
@@ -1349,14 +1349,20 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
ctx.mvcc().addNext(ctx, c1);
+ ctx.mvcc().contextReset();
+
GridCacheMvccCandidate c2 = entry.addLocal(2, ver2, 0, true, false);
ctx.mvcc().addNext(ctx, c2);
+ ctx.mvcc().contextReset();
+
GridCacheMvccCandidate c3 = entry.addLocal(3, ver3, 0, true, true);
ctx.mvcc().addNext(ctx, c3);
+ ctx.mvcc().contextReset();
+
checkLocal(entry.candidate(ver1), ver1, false, false, false);
checkLocal(entry.candidate(ver2), ver2, false, false, false);
checkLocal(entry.candidate(ver3), ver3, false, false, false);
@@ -1371,9 +1377,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
entry.removeLock(ver2);
assert c3 != null;
- assert c3.previous() == c2;
assert c2 != null;
- assert c2.previous() == c1;
checkLocal(c2, ver2, false, false, false, true);
@@ -1382,9 +1386,6 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
entry.removeLock(ver1);
- assert c3.previous() == c2;
- assert c2.previous() == c1;
-
checkLocal(entry.candidate(ver3), ver3, true, true, false);
GridCacheMvccCandidate c4 = entry.addLocal(4, ver4, 0, true, true);
@@ -1392,7 +1393,6 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
ctx.mvcc().addNext(ctx, c4);
assert c4 != null;
- assert c4.previous() == c3;
}
/**
@@ -1624,6 +1624,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
/**
* Links candidates.
*
+ * @param ctx Cache context.
* @param cands Candidates.
* @throws Exception If failed.
*/
@@ -1670,9 +1671,8 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
StringBuilder buf = new StringBuilder(eol);
- for (Object obj : objs) {
+ for (Object obj : objs)
buf.append(obj.toString()).append(eol);
- }
return buf.toString();
}
@@ -1686,9 +1686,8 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
StringBuilder buf = new StringBuilder(eol);
- for (Object obj : objs) {
+ for (Object obj : objs)
buf.append(obj.toString()).append(eol);
- }
return buf.toString();
}
@@ -1834,20 +1833,12 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
}
/**
- * @return Empty collection.
- */
- private Collection<GridCacheVersion> empty() {
- return Collections.emptyList();
- }
-
- /**
* @param cands Candidates to print.
*/
private void info(Iterable<GridCacheMvccCandidate> cands) {
info("Collection of candidates: ");
- for (GridCacheMvccCandidate c : cands) {
+ for (GridCacheMvccCandidate c : cands)
info(">>> " + c);
- }
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/bbfee454/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite2.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite2.java
index 20cc6b6..60ada78 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite2.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite2.java
@@ -22,6 +22,7 @@ import org.apache.ignite.internal.processors.cache.CacheGetFromJobTest;
import org.apache.ignite.internal.processors.cache.distributed.CacheAsyncOperationsFailoverAtomicTest;
import org.apache.ignite.internal.processors.cache.distributed.CacheAsyncOperationsFailoverTxTest;
import org.apache.ignite.internal.processors.cache.distributed.CachePutAllFailoverAtomicTest;
+import org.apache.ignite.internal.processors.cache.distributed.CachePutAllFailoverTxTest;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheColocatedFailoverSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.dht.IgniteCacheCrossCacheTxFailoverTest;
import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridCacheAtomicFailoverSelfTest;
@@ -57,7 +58,9 @@ public class IgniteCacheFailoverTestSuite2 {
suite.addTestSuite(CacheAsyncOperationsFailoverAtomicTest.class);
suite.addTestSuite(CacheAsyncOperationsFailoverTxTest.class);
+
suite.addTestSuite(CachePutAllFailoverAtomicTest.class);
+ suite.addTestSuite(CachePutAllFailoverTxTest.class);
return suite;
}
[02/43] ignite git commit: Stopping GridUpdateNotifier properly on
Ignite stopping.
Posted by vo...@apache.org.
Stopping GridUpdateNotifier properly on Ignite stopping.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/35bc5eca
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/35bc5eca
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/35bc5eca
Branch: refs/heads/master
Commit: 35bc5ecafd669ace8321774e39e49d6c3b88efe7
Parents: b1f119f
Author: ashutak <as...@gridgain.com>
Authored: Mon Sep 7 23:45:01 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Mon Sep 7 23:45:01 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/GridUpdateNotifier.java | 82 ++++++++++++++------
.../apache/ignite/internal/IgniteKernal.java | 5 +-
.../internal/GridUpdateNotifierSelfTest.java | 23 +++---
3 files changed, 70 insertions(+), 40 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/35bc5eca/modules/core/src/main/java/org/apache/ignite/internal/GridUpdateNotifier.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridUpdateNotifier.java b/modules/core/src/main/java/org/apache/ignite/internal/GridUpdateNotifier.java
index 448f87b..b6162ed 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridUpdateNotifier.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridUpdateNotifier.java
@@ -26,12 +26,12 @@ import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.StringReader;
import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLConnection;
import java.util.Collection;
-import java.util.Map;
-import java.util.concurrent.Executor;
import java.util.concurrent.RejectedExecutionException;
+import java.util.concurrent.atomic.AtomicReference;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
@@ -59,21 +59,24 @@ import static java.net.URLEncoder.encode;
* gracefully ignore any errors occurred during notification and verification process.
*/
class GridUpdateNotifier {
+ /** Default encoding. */
+ private static final String CHARSET = "UTF-8";
+
/** Access URL to be used to access latest version data. */
private static final String UPD_STATUS_PARAMS = IgniteProperties.get("ignite.update.status.params");
/** Throttling for logging out. */
private static final long THROTTLE_PERIOD = 24 * 60 * 60 * 1000; // 1 day.
+ /** Sleep milliseconds time for worker thread. */
+ public static final int WORKER_THREAD_SLEEP_TIME = 5000;
+
/** Grid version. */
private final String ver;
/** Site. */
private final String url;
- /** Asynchronous checked. */
- private GridWorker checker;
-
/** Latest version. */
private volatile String latestVer;
@@ -95,7 +98,8 @@ class GridUpdateNotifier {
/** System properties */
private final String vmProps;
- private final Map<String, String> pluginVers;
+ /** Plugins information for request */
+ private final String pluginsVers;
/** Kernal gateway */
private final GridKernalGateway gw;
@@ -103,6 +107,12 @@ class GridUpdateNotifier {
/** */
private long lastLog = -1;
+ /** Command for worker thread. */
+ private final AtomicReference<Runnable> cmd = new AtomicReference<>();
+
+ /** Worker thread to process http request. */
+ private final Thread workerThread;
+
/**
* Creates new notifier with default values.
*
@@ -136,18 +146,46 @@ class GridUpdateNotifier {
this.gridName = gridName == null ? "null" : gridName;
this.gw = gw;
- pluginVers = U.newHashMap(pluginProviders.size());
+ SB pluginsBuilder = new SB();
for (PluginProvider provider : pluginProviders)
- pluginVers.put(provider.name() + "-plugin-version", provider.version());
+ pluginsBuilder.a("&").a(provider.name() + "-plugin-version").a("=").
+ a(encode(provider.version(), CHARSET));
+
+ pluginsVers = pluginsBuilder.toString();
this.reportOnlyNew = reportOnlyNew;
vmProps = getSystemProperties();
+
+ workerThread = new Thread(new Runnable() {
+ @Override public void run() {
+ try {
+ while(!Thread.currentThread().isInterrupted()) {
+ Runnable cmd0 = cmd.getAndSet(null);
+
+ if (cmd0 != null)
+ cmd0.run();
+ else
+ Thread.sleep(WORKER_THREAD_SLEEP_TIME);
+ }
+ }
+ catch (InterruptedException ignore) {
+ // No-op.
+ }
+ }
+ }, "upd-ver-checker");
+
+ workerThread.setDaemon(true);
+
+ workerThread.start();
}
catch (ParserConfigurationException e) {
throw new IgniteCheckedException("Failed to create xml parser.", e);
}
+ catch (UnsupportedEncodingException e) {
+ throw new IgniteCheckedException("Failed to encode.", e);
+ }
}
/**
@@ -197,16 +235,15 @@ class GridUpdateNotifier {
/**
* Starts asynchronous process for retrieving latest version data.
*
- * @param exec Executor service.
* @param log Logger.
*/
- void checkForNewVersion(Executor exec, IgniteLogger log) {
+ void checkForNewVersion(IgniteLogger log) {
assert log != null;
log = log.getLogger(getClass());
try {
- exec.execute(checker = new UpdateChecker(log));
+ cmd.set(new UpdateChecker(log));
}
catch (RejectedExecutionException e) {
U.error(log, "Failed to schedule a thread due to execution rejection (safely ignoring): " +
@@ -224,10 +261,6 @@ class GridUpdateNotifier {
log = log.getLogger(getClass());
- // Don't join it to avoid any delays on update checker.
- // Checker thread will eventually exit.
- U.cancel(checker);
-
String latestVer = this.latestVer;
String downloadUrl = this.downloadUrl;
@@ -272,12 +305,16 @@ class GridUpdateNotifier {
}
/**
+ * Stops update notifier.
+ */
+ public void stop() {
+ workerThread.interrupt();
+ }
+
+ /**
* Asynchronous checker of the latest version available.
*/
private class UpdateChecker extends GridWorker {
- /** Default encoding. */
- private static final String CHARSET = "UTF-8";
-
/** Logger. */
private final IgniteLogger log;
@@ -297,18 +334,13 @@ class GridUpdateNotifier {
try {
String stackTrace = gw != null ? gw.userStackTrace() : null;
- SB plugins = new SB();
-
- for (Map.Entry<String, String> p : pluginVers.entrySet())
- plugins.a("&").a(p.getKey()).a("=").a(encode(p.getValue(), CHARSET));
-
String postParams =
"gridName=" + encode(gridName, CHARSET) +
(!F.isEmpty(UPD_STATUS_PARAMS) ? "&" + UPD_STATUS_PARAMS : "") +
(topSize > 0 ? "&topSize=" + topSize : "") +
(!F.isEmpty(stackTrace) ? "&stackTrace=" + encode(stackTrace, CHARSET) : "") +
(!F.isEmpty(vmProps) ? "&vmProps=" + encode(vmProps, CHARSET) : "") +
- plugins.toString();
+ pluginsVers;
URLConnection conn = new URL(url).openConnection();
@@ -419,4 +451,4 @@ class GridUpdateNotifier {
return obtainMeta("downloadUrl", node);
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/35bc5eca/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 14d7c14..f160d46 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -1839,6 +1839,9 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
if (updateNtfTimer != null)
updateNtfTimer.cancel();
+ if (verChecker != null)
+ verChecker.stop();
+
if (starveTask != null)
starveTask.close();
@@ -3220,7 +3223,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
verChecker.topologySize(kernal.cluster().nodes().size());
}
- verChecker.checkForNewVersion(execSvc, log);
+ verChecker.checkForNewVersion(log);
// Just wait for 10 secs.
Thread.sleep(PERIODIC_VER_CHECK_CONN_TIMEOUT);
http://git-wip-us.apache.org/repos/asf/ignite/blob/35bc5eca/modules/core/src/test/java/org/apache/ignite/internal/GridUpdateNotifierSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridUpdateNotifierSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridUpdateNotifierSelfTest.java
index b6109f7..61c2085 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridUpdateNotifierSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridUpdateNotifierSelfTest.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal;
import java.util.Collections;
import java.util.Properties;
-import java.util.concurrent.Executor;
import org.apache.ignite.IgniteSystemProperties;
import org.apache.ignite.internal.util.future.GridFutureAdapter;
import org.apache.ignite.internal.util.typedef.internal.U;
@@ -27,7 +26,6 @@ import org.apache.ignite.lang.IgniteProductVersion;
import org.apache.ignite.plugin.PluginProvider;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
-import org.jetbrains.annotations.NotNull;
/**
* Update notifier test.
@@ -74,10 +72,17 @@ public class GridUpdateNotifierSelfTest extends GridCommonAbstractTest {
GridUpdateNotifier ntf = new GridUpdateNotifier(null, nodeVer,
TEST_GATEWAY, Collections.<PluginProvider>emptyList(), false);
- ntf.checkForNewVersion(new SelfExecutor(), log);
+ ntf.checkForNewVersion(log);
String ver = ntf.latestVersion();
+ // Wait 60 sec for response.
+ for (int i = 0; ver == null && i < 600; i++) {
+ Thread.sleep(100);
+
+ ver = ntf.latestVersion();
+ }
+
info("Latest version: " + ver);
assertNotNull("Ignite latest version has not been detected.", ver);
@@ -93,16 +98,6 @@ public class GridUpdateNotifierSelfTest extends GridCommonAbstractTest {
}
/**
- * Executor that runs task in current thread.
- */
- private static class SelfExecutor implements Executor {
- /** {@inheritDoc} */
- @Override public void execute(@NotNull Runnable r) {
- r.run();
- }
- }
-
- /**
* Test kernal gateway that always return uninitialized user stack trace.
*/
private static final GridKernalGateway TEST_GATEWAY = new GridKernalGateway() {
@@ -138,4 +133,4 @@ public class GridUpdateNotifierSelfTest extends GridCommonAbstractTest {
// No-op.
}
};
-}
\ No newline at end of file
+}
[42/43] ignite git commit: Fixed
GridCommonAbstractTest.awaitPartitionMapExchange.
Posted by vo...@apache.org.
Fixed GridCommonAbstractTest.awaitPartitionMapExchange.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/60a76bc8
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/60a76bc8
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/60a76bc8
Branch: refs/heads/master
Commit: 60a76bc882cd5ecf8db05661a4d576fc4d09d9ab
Parents: 857ab7e
Author: sboikov <sb...@gridgain.com>
Authored: Wed Sep 9 10:13:25 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Sep 9 10:13:25 2015 +0300
----------------------------------------------------------------------
.../ignite/testframework/junits/common/GridCommonAbstractTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/60a76bc8/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
index 44ca051..4bcf51e 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
@@ -430,7 +430,7 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest {
AffinityTopologyVersion readyVer = dht.context().shared().exchange().readyAffinityVersion();
- if (readyVer.topologyVersion() > 0 && dht.context().started()) {
+ if (readyVer.topologyVersion() > 0 && c.context().started()) {
// Must map on updated version of topology.
Collection<ClusterNode> affNodes =
g0.affinity(cfg.getName()).mapPartitionToPrimaryAndBackups(p);
[16/43] ignite git commit: Fixed test (ignite-795).
Posted by vo...@apache.org.
Fixed test (ignite-795).
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a96849d1
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a96849d1
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a96849d1
Branch: refs/heads/master
Commit: a96849d1c28a40e339d8909bd916a05ee0f26d52
Parents: d8cd7ba
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 12:42:27 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 12:42:27 2015 +0300
----------------------------------------------------------------------
.../IgniteCacheMessageRecoveryAbstractTest.java | 14 +++++++++++---
.../distributed/IgniteCacheTxMessageRecoveryTest.java | 5 -----
2 files changed, 11 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/a96849d1/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java
index 63be871..16d7e5d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java
@@ -145,11 +145,15 @@ public abstract class IgniteCacheMessageRecoveryAbstractTest extends GridCommonA
});
try {
+ boolean closed = false;
+
for (int i = 0; i < 30; i++) {
Thread.sleep(1000);
- closeSessions();
+ closed |= closeSessions();
}
+
+ assertTrue(closed);
}
finally {
stop.set(true);
@@ -161,7 +165,7 @@ public abstract class IgniteCacheMessageRecoveryAbstractTest extends GridCommonA
/**
* @throws Exception If failed.
*/
- private void closeSessions() throws Exception {
+ private boolean closeSessions() throws Exception {
Ignite ignite = ignite(ThreadLocalRandom.current().nextInt(0, GRID_CNT));
log.info("Close sessions for: " + ignite.name());
@@ -170,7 +174,7 @@ public abstract class IgniteCacheMessageRecoveryAbstractTest extends GridCommonA
Map<UUID, GridCommunicationClient> clients = U.field(commSpi, "clients");
- assertTrue(clients.size() > 0);
+ boolean closed = false;
for (GridCommunicationClient client : clients.values()) {
GridTcpNioCommunicationClient client0 = (GridTcpNioCommunicationClient)client;
@@ -178,6 +182,10 @@ public abstract class IgniteCacheMessageRecoveryAbstractTest extends GridCommonA
GridNioSession ses = client0.session();
ses.close();
+
+ closed = true;
}
+
+ return closed;
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/a96849d1/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxMessageRecoveryTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxMessageRecoveryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxMessageRecoveryTest.java
index cad8607..65adfdd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxMessageRecoveryTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxMessageRecoveryTest.java
@@ -26,11 +26,6 @@ import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
*/
public class IgniteCacheTxMessageRecoveryTest extends IgniteCacheMessageRecoveryAbstractTest {
/** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-795");
- }
-
- /** {@inheritDoc} */
@Override protected CacheAtomicityMode atomicityMode() {
return TRANSACTIONAL;
}
[12/43] ignite git commit: IGNITE-1387 Platform .Net: cache.Invoke
does not work with portable objects without Java counterpart
Posted by vo...@apache.org.
IGNITE-1387 Platform .Net: cache.Invoke does not work with portable objects without Java counterpart
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/2326bb53
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/2326bb53
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/2326bb53
Branch: refs/heads/master
Commit: 2326bb53fd62104b8816fe6da6f388963dc268cd
Parents: 6592208
Author: ptupitsyn <pt...@gridgain.com>
Authored: Tue Sep 8 12:29:34 2015 +0300
Committer: ptupitsyn <pt...@gridgain.com>
Committed: Tue Sep 8 12:29:34 2015 +0300
----------------------------------------------------------------------
.../platform/cache/PlatformCacheEntryProcessorImpl.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/2326bb53/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCacheEntryProcessorImpl.java
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCacheEntryProcessorImpl.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCacheEntryProcessorImpl.java
index 16124fe..f59a63f 100644
--- a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCacheEntryProcessorImpl.java
+++ b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCacheEntryProcessorImpl.java
@@ -175,7 +175,7 @@ public class PlatformCacheEntryProcessorImpl implements PlatformCacheEntryProces
switch (state) {
case ENTRY_STATE_VALUE_SET:
- entry.setValue(reader.readObject());
+ entry.setValue(reader.readObjectDetached());
break;
@@ -205,7 +205,7 @@ public class PlatformCacheEntryProcessorImpl implements PlatformCacheEntryProces
assert state == ENTRY_STATE_INTACT;
}
- return reader.readObject();
+ return reader.readObjectDetached();
}
/** {@inheritDoc} */
[32/43] ignite git commit: Removed test.
Posted by vo...@apache.org.
Removed test.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b5eeb3bb
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b5eeb3bb
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b5eeb3bb
Branch: refs/heads/master
Commit: b5eeb3bbc874a8501373f3c1ae96a2b3a246bb09
Parents: 069653b
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 16:52:07 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 16:52:07 2015 +0300
----------------------------------------------------------------------
.../ignite/GridSuppressedExceptionSelfTest.java | 22 --------------------
1 file changed, 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/b5eeb3bb/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java
index 2485cbb..6e32249 100644
--- a/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/GridSuppressedExceptionSelfTest.java
@@ -88,28 +88,6 @@ public class GridSuppressedExceptionSelfTest extends TestCase {
}
/**
- * Made to demonstrate stack printing for {@link IgniteCheckedException}. Do not enable.
- *
- * @throws Exception If failed.
- */
- public void testStackTrace() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-818");
-
- IgniteCheckedException me = new IgniteCheckedException("Test message.");
-
- for (int i = 5; i < 20; i++) {
- try {
- generateException(i, null);
- }
- catch (IgniteCheckedException e) {
- me.addSuppressed(e);
- }
- }
-
- me.printStackTrace();
- }
-
- /**
* @return A multi exception with few nested causes and
* {@link IllegalAccessException} in hierarchy.
*/
[22/43] ignite git commit: Merge branch 'ignite-1388' of
https://github.com/ptupitsyn/ignite into ignite-1.4
Posted by vo...@apache.org.
Merge branch 'ignite-1388' of https://github.com/ptupitsyn/ignite into ignite-1.4
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4dc4171b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4dc4171b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4dc4171b
Branch: refs/heads/master
Commit: 4dc4171b666e0515ef657572352b6c53bf503a17
Parents: a91f386 57555af
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Tue Sep 8 13:28:37 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Sep 8 13:28:37 2015 +0300
----------------------------------------------------------------------
.../processors/platform/cache/PlatformCache.java | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
[18/43] ignite git commit: Enabled test.
Posted by vo...@apache.org.
Enabled test.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c6d4b461
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c6d4b461
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c6d4b461
Branch: refs/heads/master
Commit: c6d4b461d178087a833a1b9b044261f43f6a06a9
Parents: 483dde7
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 13:06:21 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 13:06:21 2015 +0300
----------------------------------------------------------------------
.../near/GridCachePartitionedTxMultiThreadedSelfTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/c6d4b461/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiThreadedSelfTest.java
index dbe5414..6ed25eb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiThreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiThreadedSelfTest.java
@@ -40,7 +40,7 @@ public class GridCachePartitionedTxMultiThreadedSelfTest extends IgniteTxMultiTh
private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
/** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
+ @Override public void testOptimisticSerializableCommitMultithreaded() throws Exception {
fail("https://issues.apache.org/jira/browse/IGNITE-806");
}
[27/43] ignite git commit: Removed tests (not valid anymore).
Posted by vo...@apache.org.
Removed tests (not valid anymore).
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/55db6f03
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/55db6f03
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/55db6f03
Branch: refs/heads/master
Commit: 55db6f03a45723aab1a8c940cae570f4b5aaedce
Parents: b7bdfe2
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 13:53:13 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 13:53:13 2015 +0300
----------------------------------------------------------------------
.../query/h2/GridIndexingSpiAbstractSelfTest.java | 13 -------------
1 file changed, 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/55db6f03/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
index eeddf54..acfe3b6 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
@@ -428,19 +428,6 @@ public abstract class GridIndexingSpiAbstractSelfTest extends GridCommonAbstract
}
}
- public void testResultReuse() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-828");
-
- final IgniteH2Indexing spi = getIndexing();
-
- multithreaded(new Callable<Object>() {
- @Override public Object call() throws Exception {
- return spi.queryFields(null, "SELECT sum(x) + sum(x) + sum(x) + sum(x) FROM SYSTEM_RANGE(?, ?)",
- F.<Object>asList(0, 7000000), null);
- }
- }, 5);
- }
-
/**
* Index descriptor.
*/
[19/43] ignite git commit: Increased test timeout.
Posted by vo...@apache.org.
Increased test timeout.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/86f80372
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/86f80372
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/86f80372
Branch: refs/heads/master
Commit: 86f80372a23e502b58649b1e36c8a8a84f035318
Parents: c6d4b46
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 13:21:39 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 13:21:39 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/GridVersionSelfTest.java | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/86f80372/modules/core/src/test/java/org/apache/ignite/internal/GridVersionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridVersionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridVersionSelfTest.java
index d383ad6..4751a0c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridVersionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridVersionSelfTest.java
@@ -17,8 +17,9 @@
package org.apache.ignite.internal;
-import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.util.lang.GridAbsPredicate;
import org.apache.ignite.lang.IgniteProductVersion;
+import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import static org.apache.ignite.IgniteSystemProperties.IGNITE_UPDATE_NOTIFIER;
@@ -36,20 +37,17 @@ public class GridVersionSelfTest extends GridCommonAbstractTest {
System.setProperty(IGNITE_UPDATE_NOTIFIER, "true");
try {
- IgniteEx ignite = (IgniteEx)startGrid();
+ final IgniteEx ignite = (IgniteEx)startGrid();
IgniteProductVersion currVer = ignite.version();
- String newVer = null;
+ GridTestUtils.waitForCondition(new GridAbsPredicate() {
+ @Override public boolean apply() {
+ return ignite.latestVersion() != null;
+ }
+ }, 2 * 60_000);
- for (int i = 0; i < 30; i++) {
- newVer = ignite.latestVersion();
-
- if (newVer != null)
- break;
-
- U.sleep(100);
- }
+ String newVer = ignite.latestVersion();
info("Versions [cur=" + currVer + ", latest=" + newVer + ']');
[09/43] ignite git commit: IGNITE-1386: Deliberately failing a test
that hangs because of a known bug
Posted by vo...@apache.org.
IGNITE-1386: Deliberately failing a test that hangs because of a known bug
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/aa35e365
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/aa35e365
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/aa35e365
Branch: refs/heads/master
Commit: aa35e365830bfe0bbd46d5311e0c4b83ba75e035
Parents: 5264ec7
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Sep 8 12:12:09 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Sep 8 12:12:09 2015 +0300
----------------------------------------------------------------------
.../util/ipc/shmem/IpcSharedMemoryCrashDetectionSelfTest.java | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/aa35e365/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryCrashDetectionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryCrashDetectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryCrashDetectionSelfTest.java
index ee4dabe..1aae999 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryCrashDetectionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryCrashDetectionSelfTest.java
@@ -118,6 +118,8 @@ public class IpcSharedMemoryCrashDetectionSelfTest extends GridCommonAbstractTes
* @throws Exception If failed.
*/
public void testIgfsClientServerInteractionsUponServerKilling() throws Exception {
+ fail("https://issues.apache.org/jira/browse/IGNITE-1386");
+
Collection<Integer> shmemIdsBeforeInteractions = IpcSharedMemoryUtils.sharedMemoryIds();
info("Shared memory IDs before starting server-client interactions: " + shmemIdsBeforeInteractions);
[35/43] ignite git commit: ignite-1349 Use cache proxy in
IgfsDataManager for tx thread-local context cleanup.
Posted by vo...@apache.org.
ignite-1349 Use cache proxy in IgfsDataManager for tx thread-local context cleanup.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9f59c3f5
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9f59c3f5
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9f59c3f5
Branch: refs/heads/master
Commit: 9f59c3f5e6503205525f7507c6d1e82f9de7b6c9
Parents: 2198381
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 17:26:52 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 17:26:52 2015 +0300
----------------------------------------------------------------------
.../internal/processors/igfs/IgfsDataManager.java | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/9f59c3f5/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDataManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDataManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDataManager.java
index c571f41..b1b51f9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDataManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDataManager.java
@@ -68,7 +68,6 @@ import org.apache.ignite.internal.IgniteInterruptedCheckedException;
import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
import org.apache.ignite.internal.managers.communication.GridMessageListener;
import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener;
-import org.apache.ignite.internal.processors.cache.GridCacheAdapter;
import org.apache.ignite.internal.processors.cache.IgniteInternalCache;
import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
import org.apache.ignite.internal.processors.datastreamer.DataStreamerCacheUpdaters;
@@ -239,16 +238,15 @@ public class IgfsDataManager extends IgfsManager {
}
/** {@inheritDoc} */
+ @SuppressWarnings("unchecked")
@Override protected void onKernalStart0() throws IgniteCheckedException {
- igfsCtx.kernalContext().cache().getOrStartCache(igfsCtx.configuration().getDataCacheName());
- dataCachePrj = igfsCtx.kernalContext().cache().internalCache(igfsCtx.configuration().getDataCacheName());
+ dataCachePrj = igfsCtx.kernalContext().cache().getOrStartCache(igfsCtx.configuration().getDataCacheName());
- igfsCtx.kernalContext().cache().getOrStartCache(igfsCtx.configuration().getDataCacheName());
- dataCache = igfsCtx.kernalContext().cache().internalCache(igfsCtx.configuration().getDataCacheName());
+ assert dataCachePrj != null;
- metrics = igfsCtx.igfs().localMetrics();
+ dataCache = (IgniteInternalCache)dataCachePrj;
- assert dataCachePrj != null;
+ metrics = igfsCtx.igfs().localMetrics();
AffinityKeyMapper mapper = igfsCtx.kernalContext().cache()
.internalCache(igfsCtx.configuration().getDataCacheName()).configuration().getAffinityMapper();
@@ -312,7 +310,7 @@ public class IgfsDataManager extends IgfsManager {
*/
public IgniteUuid nextAffinityKey(@Nullable IgniteUuid prevAffKey) {
// Do not generate affinity key for non-affinity nodes.
- if (!((GridCacheAdapter)dataCache).context().affinityNode())
+ if (!dataCache.context().affinityNode())
return null;
UUID nodeId = igfsCtx.kernalContext().localNodeId();
[30/43] ignite git commit: Ignite-805 (cherry picked from commit
adce9b9)
Posted by vo...@apache.org.
Ignite-805
(cherry picked from commit adce9b9)
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/069653b7
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/069653b7
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/069653b7
Branch: refs/heads/master
Commit: 069653b74856d99b2b7535443d15b8515d9bd15c
Parents: e5b06e3
Author: Anton Vinogradov <av...@apache.org>
Authored: Tue Sep 8 15:05:55 2015 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Tue Sep 8 15:12:26 2015 +0300
----------------------------------------------------------------------
...cheAbstractFullApiMultithreadedSelfTest.java | 63 +++++++++++++-------
...PartitionedFullApiMultithreadedSelfTest.java | 5 --
...eReplicatedFullApiMultithreadedSelfTest.java | 5 --
...dCacheLocalFullApiMultithreadedSelfTest.java | 5 --
4 files changed, 40 insertions(+), 38 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/069653b7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
index bfafe69..2959b34 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
@@ -163,7 +163,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
* @throws Exception In case of error.
*/
public void testContainsKey() throws Exception {
- runTest(new CI1<IgniteCache<String,Integer>>() {
+ runTest(new CI1<IgniteCache<String, Integer>>() {
@Override public void apply(IgniteCache<String, Integer> cache) {
assert cache.containsKey("key" + random());
assert !cache.containsKey("wrongKey");
@@ -175,7 +175,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
* @throws Exception In case of error.
*/
public void testGet() throws Exception {
- runTest(new CIX1<IgniteCache<String,Integer>>() {
+ runTest(new CIX1<IgniteCache<String, Integer>>() {
@Override public void applyx(IgniteCache<String, Integer> cache) {
int rnd = random();
@@ -189,7 +189,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
* @throws Exception In case of error.
*/
public void testGetAsync() throws Exception {
- runTest(new CIX1<IgniteCache<String,Integer>>() {
+ runTest(new CIX1<IgniteCache<String, Integer>>() {
@Override public void applyx(IgniteCache<String, Integer> cache) {
int rnd = random();
@@ -199,7 +199,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
assert cacheAsync.<Integer>future().get() == rnd;
- cache.get("wrongKey");
+ cacheAsync.get("wrongKey");
assert cacheAsync.future().get() == null;
}
@@ -210,7 +210,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
* @throws Exception In case of error.
*/
public void testGetAll() throws Exception {
- runTest(new CIX1<IgniteCache<String,Integer>>() {
+ runTest(new CIX1<IgniteCache<String, Integer>>() {
@Override public void applyx(IgniteCache<String, Integer> cache) {
int rnd1 = random();
int rnd2 = random();
@@ -224,17 +224,20 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
});
}
- /**
+ /**
* @throws Exception In case of error.
*/
public void testGetAllAsync() throws Exception {
- runTest(new CIX1<IgniteCache<String,Integer>>() {
+ runTest(new CIX1<IgniteCache<String, Integer>>() {
@Override public void applyx(IgniteCache<String, Integer> cache) {
int rnd1 = random();
int rnd2 = random();
- cache.withAsync().getAll(ImmutableSet.of("key" + rnd1, "key" + rnd2));
- Map<String, Integer> map = cache.withAsync().<Map<String, Integer>>future().get();
+ IgniteCache<String, Integer> cacheAsync = cache.withAsync();
+
+ cacheAsync.getAll(ImmutableSet.of("key" + rnd1, "key" + rnd2));
+
+ Map<String, Integer> map = cacheAsync.<Map<String, Integer>>future().get();
assert map.size() == (rnd1 != rnd2 ? 2 : 1);
assert map.get("key" + rnd1) == rnd1;
@@ -247,7 +250,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
* @throws Exception In case of error.
*/
public void testRemove() throws Exception {
- runTest(new CIX1<IgniteCache<String,Integer>>() {
+ runTest(new CIX1<IgniteCache<String, Integer>>() {
@Override public void applyx(IgniteCache<String, Integer> cache) {
int rnd1 = random();
int rnd2 = random();
@@ -255,13 +258,20 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
assert cache.getAndRemove("wrongKey") == null;
assert !cache.remove("key" + rnd1, -1);
- assert cache.localPeek("key" + rnd1, CachePeekMode.ONHEAP) == null || cache.localPeek("key" + rnd1, CachePeekMode.ONHEAP) == rnd1;
- assert cache.localPeek("key" + rnd2, CachePeekMode.ONHEAP) == null || cache.localPeek("key" + rnd2, CachePeekMode.ONHEAP) == rnd2;
+ Integer v1 = cache.localPeek("key" + rnd1, CachePeekMode.ONHEAP);
+ Integer v2 = cache.localPeek("key" + rnd2, CachePeekMode.ONHEAP);
+
+ assert v1 == null || v1 == rnd1;
+ assert v2 == null || v2 == rnd2;
+
+ v1 = cache.getAndRemove("key" + rnd1);
- assert cache.localPeek("key" + rnd1, CachePeekMode.ONHEAP) == null || cache.getAndRemove("key" + rnd1) == rnd1;
- assert cache.localPeek("key" + rnd2, CachePeekMode.ONHEAP) == null || cache.remove("key" + rnd2, rnd2);
+ assert cache.localPeek("key" + rnd1, CachePeekMode.ONHEAP) == null && (v1 == null || v1 == rnd1);
+
+ assert cache.getAndRemove("key" + rnd1) == null;
+
+ cache.remove("key" + rnd2, rnd2);
- assert cache.localPeek("key" + rnd1, CachePeekMode.ONHEAP) == null;
assert cache.localPeek("key" + rnd2, CachePeekMode.ONHEAP) == null;
}
});
@@ -271,7 +281,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
* @throws Exception In case of error.
*/
public void testRemoveAsync() throws Exception {
- runTest(new CIX1<IgniteCache<String,Integer>>() {
+ runTest(new CIX1<IgniteCache<String, Integer>>() {
@Override public void applyx(IgniteCache<String, Integer> cache) {
int rnd1 = random();
int rnd2 = random();
@@ -286,13 +296,20 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
assert !cacheAsync.<Boolean>future().get();
- assert cache.localPeek("key" + rnd1, CachePeekMode.ONHEAP) == null || cache.localPeek("key" + rnd1, CachePeekMode.ONHEAP) == rnd1;
- assert cache.localPeek("key" + rnd2, CachePeekMode.ONHEAP) == null || cache.localPeek("key" + rnd2, CachePeekMode.ONHEAP) == rnd2;
+ Integer v1 = cache.localPeek("key" + rnd1, CachePeekMode.ONHEAP);
+ Integer v2 = cache.localPeek("key" + rnd2, CachePeekMode.ONHEAP);
+
+ assert v1 == null || v1 == rnd1;
+ assert v2 == null || v2 == rnd2;
+
+ v1 = removeAsync(cache, "key" + rnd1);
+
+ assert cache.localPeek("key" + rnd1, CachePeekMode.ONHEAP) == null && (v1 == null || v1 == rnd1);
+
+ assert cache.getAndRemove("key" + rnd1) == null;
- assert cache.localPeek("key" + rnd1, CachePeekMode.ONHEAP) == null || removeAsync(cache, "key" + rnd1) == rnd1;
- assert cache.localPeek("key" + rnd2, CachePeekMode.ONHEAP) == null || removeAsync(cache, "key" + rnd2, rnd2);
+ removeAsync(cache, "key" + rnd2, rnd2);
- assert cache.localPeek("key" + rnd1, CachePeekMode.ONHEAP) == null;
assert cache.localPeek("key" + rnd2, CachePeekMode.ONHEAP) == null;
}
});
@@ -302,7 +319,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
* @throws Exception In case of error.
*/
public void testRemoveAll() throws Exception {
- runTest(new CIX1<IgniteCache<String,Integer>>() {
+ runTest(new CIX1<IgniteCache<String, Integer>>() {
@Override public void applyx(IgniteCache<String, Integer> cache) {
int rnd = random();
@@ -318,7 +335,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
* @throws Exception In case of error.
*/
public void testRemoveAllAsync() throws Exception {
- runTest(new CIX1<IgniteCache<String,Integer>>() {
+ runTest(new CIX1<IgniteCache<String, Integer>>() {
@Override public void applyx(IgniteCache<String, Integer> cache) {
int rnd = random();
http://git-wip-us.apache.org/repos/asf/ignite/blob/069653b7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiMultithreadedSelfTest.java
index 337febd..905996c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiMultithreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiMultithreadedSelfTest.java
@@ -27,11 +27,6 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED;
*/
public class GridCachePartitionedFullApiMultithreadedSelfTest extends GridCacheAbstractFullApiMultithreadedSelfTest {
/** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-805");
- }
-
- /** {@inheritDoc} */
@Override protected int gridCount() {
return 3;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/069653b7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFullApiMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFullApiMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFullApiMultithreadedSelfTest.java
index 81da1de..512713c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFullApiMultithreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFullApiMultithreadedSelfTest.java
@@ -27,11 +27,6 @@ import static org.apache.ignite.cache.CacheMode.REPLICATED;
*/
public class GridCacheReplicatedFullApiMultithreadedSelfTest extends GridCacheAbstractFullApiMultithreadedSelfTest {
/** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-805");
- }
-
- /** {@inheritDoc} */
@Override protected int gridCount() {
return 2;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/069653b7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiMultithreadedSelfTest.java
index fc97a59..27593a9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiMultithreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiMultithreadedSelfTest.java
@@ -27,11 +27,6 @@ import static org.apache.ignite.cache.CacheMode.LOCAL;
*/
public class GridCacheLocalFullApiMultithreadedSelfTest extends GridCacheAbstractFullApiMultithreadedSelfTest {
/** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-805");
- }
-
- /** {@inheritDoc} */
@Override protected int gridCount() {
return 1;
}
[13/43] ignite git commit: Enabled test.
Posted by vo...@apache.org.
Enabled test.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d8cd7ba2
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d8cd7ba2
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d8cd7ba2
Branch: refs/heads/master
Commit: d8cd7ba249e3ecea5508a387765ef12ddb6851f3
Parents: 6592208
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 12:30:21 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 12:30:21 2015 +0300
----------------------------------------------------------------------
.../apache/ignite/internal/GridStartStopSelfTest.java | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/d8cd7ba2/modules/core/src/test/java/org/apache/ignite/internal/GridStartStopSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridStartStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridStartStopSelfTest.java
index ce78c5f..a08db92 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridStartStopSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridStartStopSelfTest.java
@@ -18,6 +18,7 @@
package org.apache.ignite.internal;
import java.util.concurrent.CountDownLatch;
+import javax.cache.CacheException;
import org.apache.ignite.Ignite;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
@@ -69,14 +70,9 @@ public class GridStartStopSelfTest extends GridCommonAbstractTest {
}
/**
- * TODO: IGNITE-580.
- *
* @throws Exception If failed.
*/
public void testStopWhileInUse() throws Exception {
- // Test works too long.
- fail("https://issues.apache.org/jira/browse/IGNITE-580");
-
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setConnectorConfiguration(null);
@@ -132,7 +128,12 @@ public class GridStartStopSelfTest extends GridCommonAbstractTest {
info("Before remove.");
- g1.cache(null).remove(1);
+ try {
+ g1.cache(null).remove(1);
+ }
+ catch (CacheException ignore) {
+ // No-op.
+ }
}
/**
[38/43] ignite git commit: Merge remote-tracking branch
'apache/ignite-1.4' into ignite-1.4
Posted by vo...@apache.org.
Merge remote-tracking branch 'apache/ignite-1.4' into ignite-1.4
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e4e39af6
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e4e39af6
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e4e39af6
Branch: refs/heads/master
Commit: e4e39af68d1546b99d2ffe367ca1f3ba840db501
Parents: 108dd8f b8db248
Author: ashutak <as...@gridgain.com>
Authored: Tue Sep 8 19:34:08 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Tue Sep 8 19:34:08 2015 +0300
----------------------------------------------------------------------
.../store/jdbc/CacheJdbcPojoStoreFactory.java | 2 +-
.../cache/GridCacheMvccCandidate.java | 2 +-
.../processors/igfs/IgfsDataManager.java | 14 ++--
.../ignite/GridSuppressedExceptionSelfTest.java | 22 -------
...cheAbstractFullApiMultithreadedSelfTest.java | 69 ++++++++++++--------
...dCacheQueueMultiNodeConsistencySelfTest.java | 58 +++++++++-------
.../GridCacheSetFailoverAbstractSelfTest.java | 2 -
...PartitionedFullApiMultithreadedSelfTest.java | 5 --
...eReplicatedFullApiMultithreadedSelfTest.java | 5 --
...dCacheLocalFullApiMultithreadedSelfTest.java | 5 --
.../unsafe/GridUnsafeMemoryPerformanceTest.java | 65 ++++++++++++++++++
.../unsafe/GridUnsafeMemorySelfTest.java | 38 -----------
.../h2/GridIndexingSpiAbstractSelfTest.java | 13 ----
13 files changed, 150 insertions(+), 150 deletions(-)
----------------------------------------------------------------------
[08/43] ignite git commit: Merge remote-tracking branch
'origin/ignite-1.4' into ignite-1.4
Posted by vo...@apache.org.
Merge remote-tracking branch 'origin/ignite-1.4' into ignite-1.4
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5264ec73
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5264ec73
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5264ec73
Branch: refs/heads/master
Commit: 5264ec7385915fc0884afe31dba7e83a86335027
Parents: 02fc057 97fe836
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 11:14:36 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 11:14:36 2015 +0300
----------------------------------------------------------------------
.../ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
[06/43] ignite git commit: Deliberately failing a test that hangs
because of a known bug
Posted by vo...@apache.org.
Deliberately failing a test that hangs because of a known bug
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1a4d1939
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1a4d1939
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1a4d1939
Branch: refs/heads/master
Commit: 1a4d193957d803a399a44ec05c00c7998b6ce0ec
Parents: 35bc5ec
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Sep 8 10:38:45 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Sep 8 10:38:45 2015 +0300
----------------------------------------------------------------------
.../ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/1a4d1939/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 55a0804..16fa662 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
@@ -109,6 +109,8 @@ public class TcpDiscoveryMultiThreadedTest extends GridCommonAbstractTest {
* @throws Exception If any error occurs.
*/
public void testMultiThreadedClientsRestart() throws Exception {
+ fail("https://issues.apache.org/jira/browse/IGNITE-1123");
+
clientFlagGlobal = false;
info("Test timeout: " + (getTestTimeout() / (60 * 1000)) + " min.");
[05/43] ignite git commit: Partial fix for ignite-1355 to avoid
errors in tests setup.
Posted by vo...@apache.org.
Partial fix for ignite-1355 to avoid errors in tests setup.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/02fc057e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/02fc057e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/02fc057e
Branch: refs/heads/master
Commit: 02fc057ee885ef70ed645d993d7e3cd7488d3888
Parents: bbfee45
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 10:38:01 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 10:38:01 2015 +0300
----------------------------------------------------------------------
.../internal/processors/affinity/GridAffinityProcessor.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/02fc057e/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
index 090aca0..8f66dc1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
@@ -296,7 +296,7 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
* @throws IgniteCheckedException In case of error.
*/
@SuppressWarnings("ErrorNotRethrown")
- private AffinityInfo affinityCache(@Nullable final String cacheName, AffinityTopologyVersion topVer)
+ @Nullable private AffinityInfo affinityCache(@Nullable final String cacheName, AffinityTopologyVersion topVer)
throws IgniteCheckedException {
AffinityAssignmentKey key = new AffinityAssignmentKey(cacheName, topVer);
@@ -879,7 +879,9 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
ctx.gateway().readLock();
try {
- return cache().assignment().get(part);
+ AffinityInfo cache = cache();
+
+ return cache != null ? cache.assignment().get(part) : Collections.<ClusterNode>emptyList();
}
catch (IgniteCheckedException e) {
throw new IgniteException(e);
@@ -893,7 +895,7 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
* @return Affinity info for current topology version.
* @throws IgniteCheckedException If failed.
*/
- private AffinityInfo cache() throws IgniteCheckedException {
+ @Nullable private AffinityInfo cache() throws IgniteCheckedException {
return affinityCache(cacheName, new AffinityTopologyVersion(topologyVersion()));
}