ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [38/38] ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-5075-cacheStart' into ignite-5075
Date Thu, 11 May 2017 10:19:23 GMT
Merge remote-tracking branch 'remotes/origin/ignite-5075-cacheStart' into ignite-5075

# Conflicts:
#	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryInfo.java
#	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
#	modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java


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

Branch: refs/heads/ignite-5075
Commit: 038c00f494f1230dd32ebbaf2cca2f26f5fecaa4
Parents: eeb215f b324c13
Author: sboikov <sboikov@gridgain.com>
Authored: Thu May 11 13:18:23 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu May 11 13:18:23 2017 +0300

----------------------------------------------------------------------
 .../store/cassandra/CassandraCacheStore.java    |  16 +-
 .../session/LoadCacheCustomQueryWorker.java     |  26 +-
 .../ignite/tests/IgnitePersistentStoreTest.java |  30 +-
 .../tests/persistence/blob/ignite-config.xml    |   4 +-
 .../tests/persistence/pojo/ignite-config.xml    |   4 +-
 .../persistence/primitive/ignite-config.xml     |   4 +-
 .../primitive/ignite-remote-server-config.xml   |   4 +-
 .../processors/rest/TestMemcacheClient.java     |   2 +-
 .../org/apache/ignite/IgniteJdbcDriver.java     |  69 +--
 .../apache/ignite/IgniteSystemProperties.java   |   3 +
 .../store/jdbc/CacheAbstractJdbcStore.java      |  71 ++-
 .../internal/jdbc/JdbcDriverPropertyInfo.java   |  37 ++
 .../affinity/GridAffinityProcessor.java         |   3 +-
 .../cache/CacheJoinNodeDiscoveryData.java       |  15 +-
 .../processors/cache/ClusterCachesInfo.java     |  34 +-
 .../processors/cache/GridCacheContext.java      |   7 +
 .../processors/cache/GridCacheProcessor.java    |  56 +-
 .../processors/cache/IgniteCacheProxy.java      |  41 +-
 .../cache/database/MemoryMetricsImpl.java       |   8 +-
 .../continuous/CacheContinuousQueryManager.java |   2 +-
 .../internal/processors/odbc/IgniteTypes.java   |  69 ---
 .../processors/odbc/OdbcBufferedParser.java     |  81 ---
 .../processors/odbc/OdbcColumnMeta.java         | 110 ----
 .../processors/odbc/OdbcHandshakeRequest.java   |  83 ---
 .../processors/odbc/OdbcHandshakeResult.java    |  73 ---
 .../processors/odbc/OdbcMessageParser.java      | 320 ----------
 .../processors/odbc/OdbcNioListener.java        | 153 +++--
 .../processors/odbc/OdbcNioServerBuffer.java    | 114 ----
 .../internal/processors/odbc/OdbcProcessor.java |   2 +-
 .../processors/odbc/OdbcProtocolVersion.java    | 125 ----
 .../processors/odbc/OdbcQueryCloseRequest.java  |  49 --
 .../processors/odbc/OdbcQueryCloseResult.java   |  40 --
 .../odbc/OdbcQueryExecuteRequest.java           |  78 ---
 .../processors/odbc/OdbcQueryExecuteResult.java |  54 --
 .../processors/odbc/OdbcQueryFetchRequest.java  |  61 --
 .../processors/odbc/OdbcQueryFetchResult.java   |  66 --
 .../odbc/OdbcQueryGetColumnsMetaRequest.java    |   4 +-
 .../odbc/OdbcQueryGetColumnsMetaResult.java     |   6 +-
 .../odbc/OdbcQueryGetParamsMetaRequest.java     |   4 +-
 .../odbc/OdbcQueryGetTablesMetaRequest.java     |   4 +-
 .../internal/processors/odbc/OdbcRequest.java   |  61 --
 .../processors/odbc/OdbcRequestHandler.java     | 532 -----------------
 .../internal/processors/odbc/OdbcResponse.java  |  96 ---
 .../internal/processors/odbc/OdbcUtils.java     |  30 +-
 .../odbc/SqlListenerBufferedParser.java         |  81 +++
 .../processors/odbc/SqlListenerColumnMeta.java  | 110 ++++
 .../odbc/SqlListenerConnectionContext.java      |  56 ++
 .../processors/odbc/SqlListenerDataTypes.java   |  69 +++
 .../odbc/SqlListenerMessageParser.java          |  39 ++
 .../odbc/SqlListenerNioServerBuffer.java        | 114 ++++
 .../odbc/SqlListenerProtocolVersion.java        | 116 ++++
 .../odbc/SqlListenerQueryCloseRequest.java      |  49 ++
 .../odbc/SqlListenerQueryCloseResult.java       |  40 ++
 .../odbc/SqlListenerQueryExecuteRequest.java    |  78 +++
 .../odbc/SqlListenerQueryExecuteResult.java     |  54 ++
 .../odbc/SqlListenerQueryFetchRequest.java      |  61 ++
 .../odbc/SqlListenerQueryFetchResult.java       |  66 ++
 .../processors/odbc/SqlListenerRequest.java     |  78 +++
 .../odbc/SqlListenerRequestHandler.java         |  31 +
 .../processors/odbc/SqlListenerResponse.java    |  96 +++
 .../odbc/escape/OdbcEscapeParseResult.java      |  73 ---
 .../processors/odbc/escape/OdbcEscapeToken.java |  61 --
 .../processors/odbc/escape/OdbcEscapeType.java  | 112 ----
 .../processors/odbc/escape/OdbcEscapeUtils.java | 440 --------------
 .../processors/odbc/odbc/OdbcMessageParser.java | 279 +++++++++
 .../odbc/odbc/OdbcRequestHandler.java           | 513 ++++++++++++++++
 .../odbc/odbc/escape/OdbcEscapeParseResult.java |  73 +++
 .../odbc/odbc/escape/OdbcEscapeToken.java       |  61 ++
 .../odbc/odbc/escape/OdbcEscapeType.java        | 112 ++++
 .../odbc/odbc/escape/OdbcEscapeUtils.java       | 441 ++++++++++++++
 .../processors/query/GridQueryIndexing.java     |  36 +-
 .../processors/query/GridQueryProcessor.java    | 132 ++--
 .../ignite/spi/discovery/tcp/ClientImpl.java    |  21 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java    |   2 +
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |   7 +
 .../resources/META-INF/classnames.properties    |   2 +-
 .../CacheJdbcPojoStoreAbstractSelfTest.java     |  49 ++
 .../processors/cache/IgniteCacheStartTest.java  |  82 +--
 .../cache/distributed/CacheStartOnJoinTest.java | 260 ++++++++
 .../IgniteCacheExpiryPolicyAbstractTest.java    |  15 +-
 .../odbc/OdbcEscapeSequenceSelfTest.java        |   2 +-
 .../ignite/messaging/GridMessagingSelfTest.java |   4 +-
 .../testframework/junits/GridAbstractTest.java  |  12 +
 .../testsuites/IgniteCacheTestSuite4.java       |   2 +
 modules/docker/2.0.0/Dockerfile                 |  46 ++
 modules/docker/2.0.0/run.sh                     |  51 ++
 modules/docker/Dockerfile                       |   2 +-
 .../cache/hibernate/HibernateKeyWrapper.java    |   7 +
 .../HibernateL2CacheStrategySelfTest.java       | 597 +++++++++++++++++++
 .../testsuites/IgniteHibernateTestSuite.java    |   2 +
 .../hibernate/HibernateL2CacheSelfTest.java     |   2 +-
 .../HibernateL2CacheStrategySelfTest.java       | 569 ++++++++++++++++++
 .../testsuites/IgniteHibernate5TestSuite.java   |   2 +
 .../query/h2/DmlStatementsProcessor.java        |  11 +-
 .../processors/query/h2/IgniteH2Indexing.java   |  20 +-
 .../query/h2/sql/GridSqlQuerySplitter.java      |   7 +-
 .../cache/GridCacheCrossCacheQuerySelfTest.java |  12 +-
 ...niteCacheAbstractInsertSqlQuerySelfTest.java |   3 +-
 .../IgniteCacheInsertSqlQuerySelfTest.java      |  22 +
 .../query/IgniteSqlSplitterSelfTest.java        |  30 +
 .../cpp/odbc-test/project/vs/odbc-test.vcxproj  |   1 +
 .../project/vs/odbc-test.vcxproj.filters        |   4 +
 .../cpp/odbc-test/src/configuration_test.cpp    |  40 +-
 .../cpp/odbc-test/src/queries_test.cpp          |  62 +-
 .../cpp/odbc/include/ignite/odbc/message.h      |  45 +-
 .../odbc/include/ignite/odbc/protocol_version.h | 103 ++--
 .../src/system/ui/dsn_configuration_window.cpp  |  42 +-
 modules/platforms/cpp/odbc/src/connection.cpp   |  35 +-
 .../platforms/cpp/odbc/src/protocol_version.cpp | 138 +++--
 .../Apache.Ignite.Core.Tests.csproj             |   1 +
 .../Binary/BinaryDynamicRegistrationTest.cs     |  40 ++
 .../Binary/BinaryNameMapperTest.cs              |   7 +
 .../Binary/TypeNameParserTest.cs                |  93 ++-
 .../Binary/TypeResolverTest.cs                  | 104 ++++
 .../Cache/Query/CacheQueriesTest.cs             |   5 +-
 .../Apache.Ignite.Core.Tests/DeploymentTest.cs  |   1 +
 .../Examples/ExamplesTest.cs                    |   5 +-
 .../Binary/BinaryBasicNameMapper.cs             |   6 +-
 .../Impl/Binary/BinaryProcessor.cs              |  16 +-
 .../Impl/Binary/BinaryReader.cs                 |   6 +-
 .../Impl/Binary/Marshaller.cs                   |  18 +-
 .../Impl/Binary/TypeNameParser.cs               |  31 +-
 .../Impl/Binary/TypeResolver.cs                 | 115 +++-
 .../Impl/Memory/PlatformMemoryStream.cs         |   2 +-
 .../jdbc/CacheJdbcPojoStoreFactorySelfTest.java |   2 +-
 modules/web-console/backend/app/mongo.js        |   1 +
 .../generator/ConfigurationGenerator.js         |   3 +-
 .../states/configuration/domains/general.pug    |   4 +-
 .../states/configuration/domains/query.pug      |   2 +
 .../frontend/controllers/domains-controller.js  |  26 +-
 .../views/configuration/domains-import.tpl.pug  |  11 +-
 131 files changed, 5537 insertions(+), 3395 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/038c00f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
index f70ea8d,f74343b..9789fdf
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
@@@ -894,58 -804,16 +894,66 @@@ class ClusterCachesInfo 
  
              ctx.discovery().addClientNode(cfg.getName(), nodeId, cfg.getNearConfiguration()
!= null);
          }
+ 
+         if (joinData.startCaches()) {
+             for (DynamicCacheDescriptor desc : registeredCaches.values()) {
+                 ctx.discovery().addClientNode(desc.cacheName(),
+                     nodeId,
+                     desc.cacheConfiguration().getNearConfiguration() != null);
+             }
+         }
      }
  
 +    private CacheGroupDescriptor registerCacheGroup(
 +        ExchangeActions exchActions,
 +        CacheConfiguration startedCacheCfg,
 +        Integer cacheId,
 +        IgniteUuid deploymentId,
 +        AffinityTopologyVersion topVer) {
 +        if (startedCacheCfg.getGroupName() != null) {
 +            CacheGroupDescriptor desc = registeredCacheGrps.get(startedCacheCfg.getGroupName());
 +
 +            if (desc != null) {
 +                desc.onCacheAdded(startedCacheCfg.getName(), cacheId);
 +
 +                return desc;
 +            }
 +        }
 +
 +        int grpId = cacheGrpIdGen++;
 +
 +        Map<String, Integer> caches = Collections.singletonMap(startedCacheCfg.getName(),
cacheId);
 +
 +        String grpName = startedCacheCfg.getGroupName() != null ?
 +            startedCacheCfg.getGroupName() : startedCacheCfg.getName();
 +
 +        CacheGroupDescriptor grpDesc = new CacheGroupDescriptor(
 +            grpName,
 +            grpId,
 +            deploymentId,
 +            startedCacheCfg,
 +            topVer,
 +            caches);
 +
 +        CacheGroupDescriptor old = registeredCacheGrps.put(grpName, grpDesc);
 +
 +        assert old == null : old;
 +
 +        ctx.discovery().addCacheGroup(grpDesc, startedCacheCfg.getNodeFilter(), startedCacheCfg.getCacheMode());
 +
 +        if (exchActions != null)
 +            exchActions.addCacheGroupToStart(grpDesc);
 +
 +        return grpDesc;
 +    }
 +
 +    /**
 +     * @return Registered cache groups.
 +     */
 +    ConcurrentMap<String, CacheGroupDescriptor> registeredCacheGroups() {
 +        return registeredCacheGrps;
 +    }
 +
      /**
       * @return Registered caches.
       */

http://git-wip-us.apache.org/repos/asf/ignite/blob/038c00f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/038c00f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 4239fc1,82db451..86ead93
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@@ -858,24 -859,31 +877,32 @@@ public class GridCacheProcessor extend
  
          ctx.service().onUtilityCacheStarted();
  
-         AffinityTopologyVersion startTopVer =
+         final AffinityTopologyVersion startTopVer =
              new AffinityTopologyVersion(ctx.discovery().localJoinEvent().topologyVersion(),
0);
  
-         for (GridCacheAdapter cache : caches.values()) {
-             CacheConfiguration cfg = cache.configuration();
+         final List<IgniteInternalFuture> syncFuts = new ArrayList<>(caches.size());
+ 
+         sharedCtx.forAllCaches(new CIX1<GridCacheContext>() {
+             @Override public void applyx(GridCacheContext cctx) throws IgniteCheckedException
{
+                 CacheConfiguration cfg = cctx.config();
  
-             if (cache.context().affinityNode() &&
-                 cfg.getRebalanceMode() == SYNC &&
-                 startTopVer.equals(cache.context().startTopologyVersion())) {
-                 CacheMode cacheMode = cfg.getCacheMode();
+                 if (cctx.affinityNode() &&
+                     cfg.getRebalanceMode() == SYNC &&
+                     startTopVer.equals(cctx.startTopologyVersion())) {
+                     CacheMode cacheMode = cfg.getCacheMode();
  
-                 if (cacheMode == REPLICATED || (cacheMode == PARTITIONED && cfg.getRebalanceDelay()
>= 0))
-                     cache.preloader().syncFuture().get();
+                     if (cacheMode == REPLICATED || (cacheMode == PARTITIONED &&
cfg.getRebalanceDelay() >= 0))
+                         // Need to wait outside to avoid a deadlock
+                         syncFuts.add(cctx.preloader().syncFuture());
+                 }
              }
-         }
+         });
+ 
+         for (int i = 0, size = syncFuts.size(); i < size; i++)
+             syncFuts.get(i).get();
  
 -        assert ctx.config().isDaemon() || caches.containsKey(CU.UTILITY_CACHE_NAME) : "Utility
cache should be started";
 +        // TODO IGNITE-5075.
 +        // assert ctx.config().isDaemon() || caches.containsKey(CU.UTILITY_CACHE_NAME) :
"Utility cache should be started";
  
          if (!ctx.clientNode() && !ctx.isDaemon())
              addRemovedItemsCleanupTask(Long.getLong(IGNITE_CACHE_REMOVED_ENTRIES_TTL, 10_000));

http://git-wip-us.apache.org/repos/asf/ignite/blob/038c00f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/038c00f4/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
index 11640bd,8603d77..e37e051
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
@@@ -2057,22 -2056,18 +2057,34 @@@ public abstract class GridAbstractTest 
      }
  
      /**
+      * @param millis Time to sleep.
+      */
+     public static void doSleep(long millis) {
+         try {
+             U.sleep(millis);
+         }
+         catch (Exception e) {
+             throw new IgniteException();
+         }
+     }
+ 
+     /**
 +     * @param node Node.
 +     * @param cacheName Cache name.
 +     * @return Cache group ID for given cache name.
 +     */
 +    protected final int groupIdForCache(Ignite node, String cacheName) {
 +        for (CacheGroupInfrastructure grp : ((IgniteKernal)node).context().cache().cacheGroups())
{
 +            if (cacheName.equals(grp.name()))
 +                return grp.groupId();
 +        }
 +
 +        fail("Failed to find group fro cache: " + cacheName);
 +
 +        return 0;
 +    }
 +
 +    /**
       *
       */
      private static interface WriteReplaceOwner {


Mime
View raw message