You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2017/07/19 05:22:55 UTC

[1/9] ignite git commit: IGNITE-5762: LGPL modules are no longer deployed into Maven repository.

Repository: ignite
Updated Branches:
  refs/heads/ignite-5578-locJoin 5307bcb52 -> f006bfb88


IGNITE-5762: LGPL modules are no longer deployed into Maven repository.


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

Branch: refs/heads/ignite-5578-locJoin
Commit: 1a2dde91083a2d733e2ccc1c03bc9959caa921af
Parents: 3c1749d
Author: Oleg Ostanin <oo...@gridgain.com>
Authored: Mon Jul 17 15:10:36 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Mon Jul 17 15:10:36 2017 +0300

----------------------------------------------------------------------
 examples/pom.xml              |  7 +++++++
 modules/geospatial/pom.xml    | 24 ++++++++++++++++++++++++
 modules/hibernate-4.2/pom.xml | 24 ++++++++++++++++++++++++
 modules/hibernate-5.1/pom.xml | 24 ++++++++++++++++++++++++
 modules/schedule/pom.xml      | 24 ++++++++++++++++++++++++
 5 files changed, 103 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1a2dde91/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
index 58da342..6042781 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -312,6 +312,13 @@
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>

http://git-wip-us.apache.org/repos/asf/ignite/blob/1a2dde91/modules/geospatial/pom.xml
----------------------------------------------------------------------
diff --git a/modules/geospatial/pom.xml b/modules/geospatial/pom.xml
index c715ffa..488a4a4 100644
--- a/modules/geospatial/pom.xml
+++ b/modules/geospatial/pom.xml
@@ -83,6 +83,23 @@
         </dependency>
     </dependencies>
 
+    <profiles>
+        <profile>
+            <id>lgpl</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-deploy-plugin</artifactId>
+                        <configuration>
+                            <skip>false</skip>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
     <build>
         <plugins>
             <!-- Generate the OSGi MANIFEST.MF for this bundle.
@@ -99,6 +116,13 @@
                     </instructions>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/1a2dde91/modules/hibernate-4.2/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hibernate-4.2/pom.xml b/modules/hibernate-4.2/pom.xml
index adcf1b1..e40a550 100644
--- a/modules/hibernate-4.2/pom.xml
+++ b/modules/hibernate-4.2/pom.xml
@@ -132,6 +132,23 @@
         </dependency>
     </dependencies>
 
+    <profiles>
+        <profile>
+            <id>lgpl</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-deploy-plugin</artifactId>
+                        <configuration>
+                            <skip>false</skip>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
     <build>
         <testResources>
             <testResource>
@@ -154,6 +171,13 @@
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>

http://git-wip-us.apache.org/repos/asf/ignite/blob/1a2dde91/modules/hibernate-5.1/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hibernate-5.1/pom.xml b/modules/hibernate-5.1/pom.xml
index 8424806..a99408e 100644
--- a/modules/hibernate-5.1/pom.xml
+++ b/modules/hibernate-5.1/pom.xml
@@ -132,6 +132,23 @@
         </dependency>
     </dependencies>
 
+    <profiles>
+        <profile>
+            <id>lgpl</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-deploy-plugin</artifactId>
+                        <configuration>
+                            <skip>false</skip>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
     <build>
         <testResources>
             <testResource>
@@ -154,6 +171,13 @@
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>

http://git-wip-us.apache.org/repos/asf/ignite/blob/1a2dde91/modules/schedule/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schedule/pom.xml b/modules/schedule/pom.xml
index 22c2571..2686701 100644
--- a/modules/schedule/pom.xml
+++ b/modules/schedule/pom.xml
@@ -83,6 +83,23 @@
         </dependency>
     </dependencies>
 
+    <profiles>
+        <profile>
+            <id>lgpl</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-deploy-plugin</artifactId>
+                        <configuration>
+                            <skip>false</skip>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
     <build>
         <plugins>
             <!-- Generate the OSGi MANIFEST.MF for this fragment. It is a fragment because it contains internal processors
@@ -96,6 +113,13 @@
                     </instructions>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>


[9/9] ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-5578-locJoin

Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/master' into ignite-5578-locJoin

# Conflicts:
#	modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java


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

Branch: refs/heads/ignite-5578-locJoin
Commit: f006bfb88ae949de1509c01654aaf99566521b58
Parents: 5307bcb b3bce81
Author: sboikov <sb...@gridgain.com>
Authored: Wed Jul 19 08:22:38 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Jul 19 08:22:38 2017 +0300

----------------------------------------------------------------------
 examples/pom.xml                                |   7 +
 .../discovery/GridDiscoveryManager.java         |  38 ++++-
 .../cache/query/GridCacheQueryResponse.java     |   4 +-
 .../handlers/cache/GridCacheCommandHandler.java |   4 +-
 .../IgniteClusterActivateDeactivateTest.java    |   9 +-
 .../cache/IgniteDynamicCacheMultinodeTest.java  | 171 +++++++++++++++++++
 .../testsuites/IgniteCacheTestSuite4.java       |   2 +
 modules/geospatial/pom.xml                      |  24 +++
 modules/hibernate-4.2/pom.xml                   |  24 +++
 modules/hibernate-5.1/pom.xml                   |  24 +++
 modules/schedule/pom.xml                        |  24 +++
 11 files changed, 319 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f006bfb8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java
----------------------------------------------------------------------


[5/9] ignite git commit: Null cache shouldn't be mentioned in GridCacheCommandHandler error message when a cache is not found.

Posted by sb...@apache.org.
Null cache shouldn't be mentioned in GridCacheCommandHandler error message when a cache is not found.


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

Branch: refs/heads/ignite-5578-locJoin
Commit: 2a0d9d691d49c3ae82962684b3d114bb0079867c
Parents: 32f5cbc
Author: shroman <rs...@yahoo.com>
Authored: Tue Jul 18 21:25:12 2017 +0900
Committer: shroman <rs...@yahoo.com>
Committed: Tue Jul 18 21:25:12 2017 +0900

----------------------------------------------------------------------
 .../processors/rest/handlers/cache/GridCacheCommandHandler.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/2a0d9d69/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
index c2ca587..0006f4b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
@@ -338,7 +338,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
 
         if (cache == null)
             throw new IgniteCheckedException(
-                "Failed to find cache for given cache name (null for default cache): " + cacheName);
+                "Failed to find cache for given cache name: " + cacheName);
 
         return cache;
     }
@@ -756,7 +756,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
 
         if (cache == null)
             throw new IgniteCheckedException(
-                "Failed to find cache for given cache name (null for default cache): " + cacheName);
+                "Failed to find cache for given cache name: " + cacheName);
 
         return cache;
     }


[2/9] ignite git commit: Merge branch 'ignite-2.1'

Posted by sb...@apache.org.
Merge branch 'ignite-2.1'


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

Branch: refs/heads/ignite-5578-locJoin
Commit: 624b451b2daad843c50fe359e61759c78ea951de
Parents: 621b0ed 1a2dde9
Author: devozerov <vo...@gridgain.com>
Authored: Mon Jul 17 15:13:05 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Mon Jul 17 15:13:05 2017 +0300

----------------------------------------------------------------------
 examples/pom.xml              |  7 +++++++
 modules/geospatial/pom.xml    | 24 ++++++++++++++++++++++++
 modules/hibernate-4.2/pom.xml | 24 ++++++++++++++++++++++++
 modules/hibernate-5.1/pom.xml | 24 ++++++++++++++++++++++++
 modules/schedule/pom.xml      | 24 ++++++++++++++++++++++++
 5 files changed, 103 insertions(+)
----------------------------------------------------------------------



[8/9] ignite git commit: Fixed test.

Posted by sb...@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/b3bce81d
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b3bce81d
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b3bce81d

Branch: refs/heads/ignite-5578-locJoin
Commit: b3bce81d13c4a7d064f0a5edc0c364d39bb5096e
Parents: bd5e8a0
Author: sboikov <sb...@gridgain.com>
Authored: Wed Jul 19 07:25:21 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Jul 19 07:25:21 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/IgniteDynamicCacheMultinodeTest.java         | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b3bce81d/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheMultinodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheMultinodeTest.java
index d362189..28edb5e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheMultinodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheMultinodeTest.java
@@ -92,6 +92,7 @@ public class IgniteDynamicCacheMultinodeTest extends GridCommonAbstractTest {
     }
 
     /**
+     * @param op Operation to test.
      * @throws Exception If failed.
      */
     private void createCacheMultinode(final TestOp op) throws Exception {
@@ -135,6 +136,8 @@ public class IgniteDynamicCacheMultinodeTest extends GridCommonAbstractTest {
 
             for (String cache : ignite(0).cacheNames())
                 ignite(0).destroyCache(cache);
+
+            awaitPartitionMapExchange();
         }
     }
 


[6/9] ignite git commit: Fixed test IgniteClusterActivateDeactivateTestWithPersistence.

Posted by sb...@apache.org.
Fixed test IgniteClusterActivateDeactivateTestWithPersistence.


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

Branch: refs/heads/ignite-5578-locJoin
Commit: 54585ab3ea98b3236ac2635440ed496fb24742d8
Parents: 32f5cbc
Author: sboikov <sb...@gridgain.com>
Authored: Tue Jul 18 17:52:51 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Jul 18 17:52:51 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/query/GridCacheQueryResponse.java      | 4 ++--
 .../cache/IgniteClusterActivateDeactivateTest.java          | 9 +++++++--
 2 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/54585ab3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryResponse.java
index 521aacf..13e0915 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryResponse.java
@@ -130,10 +130,10 @@ public class GridCacheQueryResponse extends GridCacheIdMessage implements GridCa
         if (err != null && errBytes == null)
             errBytes = U.marshal(ctx, err);
 
-        if (metaDataBytes == null)
+        if (metaDataBytes == null && metadata != null)
             metaDataBytes = marshalCollection(metadata, cctx);
 
-        if (dataBytes == null)
+        if (dataBytes == null && data != null)
             dataBytes = marshalCollection(data, cctx);
 
         if (addDepInfo && !F.isEmpty(data)) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/54585ab3/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java
index 8a604be..cb7c274 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java
@@ -366,13 +366,18 @@ public class IgniteClusterActivateDeactivateTest extends GridCommonAbstractTest
 
         startWithCaches1(srvs, clients);
 
-        if (initiallyActive && persistenceEnabled())
+        int minorVer = 1;
+
+        if (initiallyActive && persistenceEnabled()) {
             ignite(0).active(true);
 
+            minorVer++;
+        }
+
         if (blockMsgNodes.length == 0)
             blockMsgNodes = new int[]{1};
 
-        final AffinityTopologyVersion STATE_CHANGE_TOP_VER = new AffinityTopologyVersion(srvs + clients, 1);
+        final AffinityTopologyVersion STATE_CHANGE_TOP_VER = new AffinityTopologyVersion(srvs + clients, minorVer);
 
         List<TestRecordingCommunicationSpi> spis = new ArrayList<>();
 


[7/9] ignite git commit: Merge remote-tracking branch 'origin/master'

Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/master'


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

Branch: refs/heads/ignite-5578-locJoin
Commit: bd5e8a02b25b8fa39d5a9c479498cf14bdb935cd
Parents: 54585ab 2a0d9d6
Author: sboikov <sb...@gridgain.com>
Authored: Tue Jul 18 17:53:08 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Jul 18 17:53:08 2017 +0300

----------------------------------------------------------------------
 .../processors/rest/handlers/cache/GridCacheCommandHandler.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[3/9] ignite git commit: ignite-5763 Race in concurrent client cache start

Posted by sb...@apache.org.
ignite-5763 Race in concurrent client cache start


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

Branch: refs/heads/ignite-5578-locJoin
Commit: 644c9f39cd980e8087438519b34a79986c82d8b4
Parents: 624b451
Author: sboikov <sb...@gridgain.com>
Authored: Mon Jul 17 17:06:55 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Jul 17 17:06:55 2017 +0300

----------------------------------------------------------------------
 .../discovery/GridDiscoveryManager.java         |  38 ++++-
 .../cache/IgniteDynamicCacheMultinodeTest.java  | 168 +++++++++++++++++++
 .../testsuites/IgniteCacheTestSuite4.java       |   2 +
 3 files changed, 202 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/644c9f39/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index 9f5bd3f..347f6fe 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -192,6 +192,9 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
         }
     };
 
+    /** */
+    private final Object discoEvtMux = new Object();
+
     /** Discovery event worker. */
     private final DiscoveryWorker discoWrk = new DiscoveryWorker();
 
@@ -551,6 +554,26 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
                 final ClusterNode node,
                 final Collection<ClusterNode> topSnapshot,
                 final Map<Long, Collection<ClusterNode>> snapshots,
+                @Nullable DiscoverySpiCustomMessage spiCustomMsg) {
+                synchronized (discoEvtMux) {
+                    onDiscovery0(type, topVer, node, topSnapshot, snapshots, spiCustomMsg);
+                }
+            }
+
+            /**
+             * @param type Event type.
+             * @param topVer Event topology version.
+             * @param node Event node.
+             * @param topSnapshot Topology snapsjot.
+             * @param snapshots Topology snapshots history.
+             * @param spiCustomMsg Custom event.
+             */
+            private void onDiscovery0(
+                final int type,
+                final long topVer,
+                final ClusterNode node,
+                final Collection<ClusterNode> topSnapshot,
+                final Map<Long, Collection<ClusterNode>> snapshots,
                 @Nullable DiscoverySpiCustomMessage spiCustomMsg
             ) {
                 DiscoveryCustomMessage customMsg = spiCustomMsg == null ? null
@@ -2062,12 +2085,15 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
     public void clientCacheStartEvent(UUID reqId,
         @Nullable Map<String, DynamicCacheChangeRequest> startReqs,
         @Nullable Set<String> cachesToClose) {
-        discoWrk.addEvent(EVT_DISCOVERY_CUSTOM_EVT,
-            AffinityTopologyVersion.NONE,
-            localNode(),
-            null,
-            Collections.<ClusterNode>emptyList(),
-            new ClientCacheChangeDummyDiscoveryMessage(reqId, startReqs, cachesToClose));
+        // Prevent race when discovery message was processed, but was passed to discoWrk.
+        synchronized (discoEvtMux) {
+            discoWrk.addEvent(EVT_DISCOVERY_CUSTOM_EVT,
+                AffinityTopologyVersion.NONE,
+                localNode(),
+                null,
+                Collections.<ClusterNode>emptyList(),
+                new ClientCacheChangeDummyDiscoveryMessage(reqId, startReqs, cachesToClose));
+        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/644c9f39/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheMultinodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheMultinodeTest.java
new file mode 100644
index 0000000..d362189
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheMultinodeTest.java
@@ -0,0 +1,168 @@
+/*
+ * 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.ArrayList;
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CyclicBarrier;
+import java.util.concurrent.ThreadLocalRandom;
+import java.util.concurrent.atomic.AtomicInteger;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+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.testframework.GridTestUtils;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+
+/**
+ *
+ */
+public class IgniteDynamicCacheMultinodeTest extends GridCommonAbstractTest {
+    /** */
+    private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
+
+    /** */
+    private static final int NODES = 6;
+
+    /** */
+    private boolean client;
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
+
+        ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
+
+        cfg.setClientMode(client);
+
+        return cfg;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTestsStarted() throws Exception {
+        super.beforeTestsStarted();
+
+        startGridsMultiThreaded(NODES - 2);
+
+        client = true;
+
+        startGridsMultiThreaded(NODES - 2, 2);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTestsStopped() throws Exception {
+        stopAllGrids();
+
+        super.afterTestsStopped();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testGetOrCreateCache() throws Exception {
+        createCacheMultinode(TestOp.GET_OR_CREATE_CACHE);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testGetOrCreateCaches() throws Exception {
+        createCacheMultinode(TestOp.GET_OR_CREATE_CACHES);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    private void createCacheMultinode(final TestOp op) throws Exception {
+        final int THREADS = NODES * 3;
+
+        for (int i = 0; i < 10; i++) {
+            log.info("Iteration: " + i);
+
+            final CyclicBarrier b = new CyclicBarrier(THREADS);
+
+            final AtomicInteger idx = new AtomicInteger();
+
+            final int iter = i;
+
+            GridTestUtils.runMultiThreaded(new Callable<Void>() {
+                @Override public Void call() throws Exception {
+                    Ignite node = ignite(idx.incrementAndGet() % NODES);
+
+                    b.await();
+
+                    boolean sleep = iter % 2 == 0;
+
+                    if (sleep)
+                        Thread.sleep(ThreadLocalRandom.current().nextLong(100) + 1);
+
+                    switch (op) {
+                        case GET_OR_CREATE_CACHE:
+                            node.getOrCreateCache(new CacheConfiguration<>(DEFAULT_CACHE_NAME));
+
+                            break;
+
+                        case GET_OR_CREATE_CACHES:
+                            node.getOrCreateCaches(cacheConfigurations());
+
+                            break;
+                    }
+
+                    return null;
+                }
+            }, THREADS, "start-cache");
+
+            for (String cache : ignite(0).cacheNames())
+                ignite(0).destroyCache(cache);
+        }
+    }
+
+    /**
+     * @return Cache configurations.
+     */
+    private List<CacheConfiguration> cacheConfigurations() {
+        List<CacheConfiguration> ccfgs = new ArrayList<>();
+
+        for (int i = 0; i < 10; i++) {
+            CacheConfiguration ccfg = new CacheConfiguration("cache-" + i);
+
+            ccfg.setAtomicityMode(i % 2 == 0 ? ATOMIC : TRANSACTIONAL);
+
+            ccfgs.add(ccfg);
+        }
+
+        return ccfgs;
+    }
+
+    /**
+     *
+     */
+    enum TestOp {
+        /** */
+        GET_OR_CREATE_CACHE,
+
+        /** */
+        GET_OR_CREATE_CACHES
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/644c9f39/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 e7f38be..d931ea9 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
@@ -74,6 +74,7 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheTxPreloadNoWriteTe
 import org.apache.ignite.internal.processors.cache.IgniteCacheTxReplicatedPeekModesTest;
 import org.apache.ignite.internal.processors.cache.IgniteClientCacheInitializationFailTest;
 import org.apache.ignite.internal.processors.cache.IgniteDynamicCacheFilterTest;
+import org.apache.ignite.internal.processors.cache.IgniteDynamicCacheMultinodeTest;
 import org.apache.ignite.internal.processors.cache.IgniteDynamicCacheStartNoExchangeTimeoutTest;
 import org.apache.ignite.internal.processors.cache.IgniteDynamicCacheStartSelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteDynamicCacheStartStopConcurrentTest;
@@ -219,6 +220,7 @@ public class IgniteCacheTestSuite4 extends TestSuite {
         suite.addTestSuite(IgniteCacheTxPreloadNoWriteTest.class);
 
         suite.addTestSuite(IgniteDynamicCacheStartSelfTest.class);
+        suite.addTestSuite(IgniteDynamicCacheMultinodeTest.class);
         suite.addTestSuite(IgniteDynamicCacheWithConfigStartSelfTest.class);
         suite.addTestSuite(IgniteCacheDynamicStopSelfTest.class);
         suite.addTestSuite(IgniteDynamicCacheStartStopConcurrentTest.class);


[4/9] ignite git commit: Added test in suite.

Posted by sb...@apache.org.
Added test in suite.


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

Branch: refs/heads/ignite-5578-locJoin
Commit: 32f5cbc30228129c238dcb3a15394d9a438985c3
Parents: 644c9f3
Author: sboikov <sb...@gridgain.com>
Authored: Tue Jul 18 12:15:46 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Jul 18 12:15:46 2017 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/32f5cbc3/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java
index f09973b..5b562c3 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java
@@ -18,11 +18,12 @@
 package org.apache.ignite.testsuites;
 
 import junit.framework.TestSuite;
+import org.apache.ignite.internal.processors.cache.IgniteClusterActivateDeactivateTestWithPersistence;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsClientNearCachePutGetTest;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsDynamicCacheTest;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsSingleNodePutGetPersistenceTest;
-import org.apache.ignite.internal.processors.cache.persistence.db.file.IgnitePdsEvictionTest;
 import org.apache.ignite.internal.processors.cache.persistence.db.file.IgnitePdsCheckpointSimulationWithRealCpDisabledTest;
+import org.apache.ignite.internal.processors.cache.persistence.db.file.IgnitePdsEvictionTest;
 import org.apache.ignite.internal.processors.cache.persistence.pagemem.BPlusTreePageMemoryImplTest;
 import org.apache.ignite.internal.processors.cache.persistence.pagemem.BPlusTreeReuseListPageMemoryImplTest;
 import org.apache.ignite.internal.processors.cache.persistence.pagemem.MetadataStoragePageMemoryImplTest;
@@ -71,6 +72,8 @@ public class IgnitePdsTestSuite extends TestSuite {
         suite.addTestSuite(IgnitePdsDynamicCacheTest.class);
         suite.addTestSuite(IgnitePdsClientNearCachePutGetTest.class);
 
+        suite.addTestSuite(IgniteClusterActivateDeactivateTestWithPersistence.class);
+
         return suite;
     }
 }