You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2015/11/02 13:17:27 UTC
[1/5] ignite git commit: Muted test (IGNITE-1824).
Repository: ignite
Updated Branches:
refs/heads/ignite-1833 7fc82a2b2 -> 37c03e0bd
Muted test (IGNITE-1824).
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4c1b9d2d
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4c1b9d2d
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4c1b9d2d
Branch: refs/heads/ignite-1833
Commit: 4c1b9d2d78381f59ce0a52b8c7b4e77a50731ecd
Parents: 6ea3b56
Author: ashutak <as...@gridgain.com>
Authored: Fri Oct 30 20:31:54 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Fri Oct 30 20:31:54 2015 +0300
----------------------------------------------------------------------
.../processors/cache/IgniteCacheTxNearPeekModesTest.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4c1b9d2d/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java
index 599a2e8..c32052b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java
@@ -25,4 +25,9 @@ public class IgniteCacheTxNearPeekModesTest extends IgniteCacheTxPeekModesTest {
@Override protected boolean hasNearCache() {
return true;
}
-}
\ No newline at end of file
+
+ /** {@inheritDoc} */
+ @Override public void testLocalPeek() throws Exception {
+ fail("https://issues.apache.org/jira/browse/IGNITE-1824");
+ }
+}
[3/5] ignite git commit: Merge remote-tracking branch 'apache/master'
Posted by ak...@apache.org.
Merge remote-tracking branch 'apache/master'
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/747c6848
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/747c6848
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/747c6848
Branch: refs/heads/ignite-1833
Commit: 747c68488ef71b54d124a54ffdccbe4229f1d899
Parents: 4c1b9d2 195cd57
Author: ashutak <as...@gridgain.com>
Authored: Mon Nov 2 14:56:46 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Mon Nov 2 14:56:46 2015 +0300
----------------------------------------------------------------------
.../distributed/GridCacheTxRecoveryFuture.java | 13 +-
.../distributed/dht/GridDhtTxPrepareFuture.java | 44 +--
...arOptimisticSerializableTxPrepareFuture.java | 12 +-
.../cache/transactions/IgniteTxManager.java | 4 +-
.../service/GridServiceProcessor.java | 31 +-
.../CacheSerializableTransactionsTest.java | 313 ++++++++++++-------
.../GridServiceProcessorStopSelfTest.java | 103 ++++++
.../testsuites/IgniteKernalSelfTestSuite.java | 2 +
8 files changed, 376 insertions(+), 146 deletions(-)
----------------------------------------------------------------------
[4/5] ignite git commit: Merge branches 'ignite-1833' and 'master' of
https://git-wip-us.apache.org/repos/asf/ignite into ignite-1833
Posted by ak...@apache.org.
Merge branches 'ignite-1833' and 'master' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1833
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/617fb1f4
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/617fb1f4
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/617fb1f4
Branch: refs/heads/ignite-1833
Commit: 617fb1f4bab24f664de0db77df87a2aa310cd06b
Parents: 7fc82a2 747c684
Author: AKuznetsov <ak...@gridgain.com>
Authored: Mon Nov 2 19:14:33 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Mon Nov 2 19:14:33 2015 +0700
----------------------------------------------------------------------
.../service/GridServiceProcessor.java | 31 +++---
.../cache/IgniteCacheTxNearPeekModesTest.java | 7 +-
.../GridServiceProcessorStopSelfTest.java | 103 +++++++++++++++++++
.../testsuites/IgniteKernalSelfTestSuite.java | 2 +
4 files changed, 130 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
[5/5] ignite git commit: IGNITE-1833 Minor.
Posted by ak...@apache.org.
IGNITE-1833 Minor.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/37c03e0b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/37c03e0b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/37c03e0b
Branch: refs/heads/ignite-1833
Commit: 37c03e0bdb2ebf8f2d2d41a8a0adc935259470de
Parents: 617fb1f
Author: AKuznetsov <ak...@gridgain.com>
Authored: Mon Nov 2 19:17:09 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Mon Nov 2 19:17:09 2015 +0700
----------------------------------------------------------------------
.../ignite/internal/processors/cache/GridCacheAffinityManager.java | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/37c03e0b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
index 867271d..5c43205 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
@@ -305,7 +305,6 @@ public class GridCacheAffinityManager extends GridCacheManagerAdapter {
assert !F.isEmpty(nodes);
return nodes.indexOf(n) > 0;
-
}
/**
[2/5] ignite git commit: ignite-1820 Deployment service hangs when
node is being stopped
Posted by ak...@apache.org.
ignite-1820 Deployment service hangs when node is being stopped
Signed-off-by: agura <ag...@gridgain.com>
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/195cd57f
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/195cd57f
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/195cd57f
Branch: refs/heads/ignite-1833
Commit: 195cd57fb6362220d2ea664046bcdd92d024d871
Parents: fff4e45
Author: agura <ag...@gridgain.com>
Authored: Mon Nov 2 13:26:27 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Mon Nov 2 13:26:27 2015 +0300
----------------------------------------------------------------------
.../service/GridServiceProcessor.java | 31 +++---
.../GridServiceProcessorStopSelfTest.java | 103 +++++++++++++++++++
.../testsuites/IgniteKernalSelfTestSuite.java | 2 +
3 files changed, 124 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/195cd57f/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
index 7e8669a..ed54f00 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
@@ -242,28 +242,35 @@ public class GridServiceProcessor extends GridProcessorAdapter {
U.shutdownNow(GridServiceProcessor.class, depExe, log);
+ Exception err = new IgniteCheckedException("Operation has been cancelled (node is stopping).");
+
+ cancelFutures(depFuts, err);
+ cancelFutures(undepFuts, err);
+
if (log.isDebugEnabled())
log.debug("Stopped service processor.");
}
/** {@inheritDoc} */
@Override public void onDisconnected(IgniteFuture<?> reconnectFut) throws IgniteCheckedException {
- for (Map.Entry<String, GridServiceDeploymentFuture> e : depFuts.entrySet()) {
- GridServiceDeploymentFuture fut = e.getValue();
-
- fut.onDone(new IgniteClientDisconnectedCheckedException(ctx.cluster().clientReconnectFuture(),
- "Failed to deploy service, client node disconnected."));
+ cancelFutures(depFuts, new IgniteClientDisconnectedCheckedException(ctx.cluster().clientReconnectFuture(),
+ "Failed to deploy service, client node disconnected."));
- depFuts.remove(e.getKey(), fut);
- }
+ cancelFutures(undepFuts, new IgniteClientDisconnectedCheckedException(ctx.cluster().clientReconnectFuture(),
+ "Failed to undeploy service, client node disconnected."));
+ }
- for (Map.Entry<String, GridFutureAdapter<?>> e : undepFuts.entrySet()) {
- GridFutureAdapter fut = e.getValue();
+ /**
+ * @param futs Futs.
+ * @param err Exception.
+ */
+ private void cancelFutures(ConcurrentMap<String, ? extends GridFutureAdapter<?>> futs, Exception err) {
+ for (Map.Entry<String, ? extends GridFutureAdapter<?>> entry : futs.entrySet()) {
+ GridFutureAdapter fut = entry.getValue();
- fut.onDone(new IgniteClientDisconnectedCheckedException(ctx.cluster().clientReconnectFuture(),
- "Failed to undeploy service, client node disconnected."));
+ fut.onDone(err);
- undepFuts.remove(e.getKey(), fut);
+ futs.remove(entry.getKey(), fut);
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/195cd57f/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java
new file mode 100644
index 0000000..16ea5e4
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java
@@ -0,0 +1,103 @@
+/*
+ * 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.service;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.IgniteServices;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.services.Service;
+import org.apache.ignite.services.ServiceContext;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+
+/**
+ * Tests that {@link GridServiceProcessor} completes deploy/undeploy futures during node stop.
+ */
+public class GridServiceProcessorStopSelfTest extends GridCommonAbstractTest {
+ /**
+ * @throws Exception If failed.
+ */
+ public void testStopDuringDeployment() throws Exception {
+ final CountDownLatch depLatch = new CountDownLatch(1);
+
+ final CountDownLatch finishLatch = new CountDownLatch(1);
+
+ final Ignite ignite = startGrid(0);
+
+ Thread t = new Thread(new Runnable() {
+ @Override public void run() {
+ IgniteServices svcs = ignite.services();
+
+ IgniteServices services = svcs.withAsync();
+
+ services.deployClusterSingleton("myClusterSingletonService", new TestServiceImpl());
+
+ depLatch.countDown();
+
+ try {
+ services.future().get();
+ }
+ catch (IgniteException e) {
+ finishLatch.countDown();
+ }
+ catch (Throwable e) {
+ log.error("Service deployment error: ", e);
+ }
+ }
+ });
+
+ t.start();
+
+ depLatch.await();
+
+ Ignition.stopAll(true);
+
+ assertTrue("Deploy future isn't completed", finishLatch.await(15, TimeUnit.SECONDS));
+ }
+
+ /**
+ * Simple map service.
+ */
+ public interface TestService {
+ }
+
+ /**
+ *
+ */
+ public class TestServiceImpl implements Service, TestService {
+ /** Serial version UID. */
+ private static final long serialVersionUID = 0L;
+
+ /** {@inheritDoc} */
+ @Override public void cancel(ServiceContext ctx) {
+ // No-op.
+ }
+
+ /** {@inheritDoc} */
+ @Override public void init(ServiceContext ctx) throws Exception {
+ // No-op.
+ }
+
+ /** {@inheritDoc} */
+ @Override public void execute(ServiceContext ctx) throws Exception {
+ // No-op.
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/195cd57f/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java
index 2a24c66..a41859e 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java
@@ -50,6 +50,7 @@ import org.apache.ignite.internal.processors.service.GridServiceProcessorMultiNo
import org.apache.ignite.internal.processors.service.GridServiceProcessorMultiNodeSelfTest;
import org.apache.ignite.internal.processors.service.GridServiceProcessorProxySelfTest;
import org.apache.ignite.internal.processors.service.GridServiceProcessorSingleNodeSelfTest;
+import org.apache.ignite.internal.processors.service.GridServiceProcessorStopSelfTest;
import org.apache.ignite.internal.processors.service.GridServiceReassignmentSelfTest;
import org.apache.ignite.internal.util.GridStartupWithSpecifiedWorkDirectorySelfTest;
import org.apache.ignite.internal.util.GridStartupWithUndefinedIgniteHomeSelfTest;
@@ -115,6 +116,7 @@ public class IgniteKernalSelfTestSuite extends TestSuite {
suite.addTestSuite(GridServiceProcessorProxySelfTest.class);
suite.addTestSuite(GridServiceReassignmentSelfTest.class);
suite.addTestSuite(GridServiceClientNodeTest.class);
+ suite.addTestSuite(GridServiceProcessorStopSelfTest.class);
return suite;
}