Merge remote-tracking branch 'remotes/apache-main/master' into ignite-801
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/600b7a84 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/600b7a84 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/600b7a84 Branch: refs/heads/ignite-801 Commit: 600b7a844048d4e06911732565fc363b78569498 Parents: 1d7d778 0bc1d6f Author: Denis Magda <[email protected]> Authored: Mon Oct 26 16:58:49 2015 +0300 Committer: Denis Magda <[email protected]> Committed: Mon Oct 26 16:58:49 2015 +0300 ---------------------------------------------------------------------- DEVNOTES.txt | 3 +- assembly/dependencies-hadoop.xml | 1 + assembly/release-fabric-lgpl.xml | 63 + assembly/release-hadoop-lgpl.xml | 39 + examples-lgpl/README.txt | 27 + examples-lgpl/config/example-cache.xml | 73 + examples-lgpl/config/example-ignite.xml | 83 ++ examples-lgpl/config/hibernate/README.txt | 8 + .../hibernate/example-hibernate-L2-cache.xml | 64 + examples-lgpl/pom-standalone.xml | 186 +++ examples-lgpl/pom.xml | 128 ++ .../hibernate/HibernateL2CacheExample.java | 245 ++++ .../examples/datagrid/hibernate/Post.java | 130 ++ .../examples/datagrid/hibernate/User.java | 154 ++ .../datagrid/hibernate/package-info.java | 22 + .../hibernate/CacheHibernatePersonStore.java | 122 ++ .../hibernate/CacheHibernateStoreExample.java | 151 ++ .../datagrid/store/hibernate/Person.hbm.xml | 34 + .../datagrid/store/hibernate/hibernate.cfg.xml | 41 + .../datagrid/store/hibernate/package-info.java | 22 + .../misc/schedule/ComputeScheduleExample.java | 82 ++ .../examples/misc/schedule/package-info.java | 22 + .../misc/schedule/ComputeScheduleExample.java | 68 + .../java8/misc/schedule/package-info.java | 22 + .../ignite/examples/java8/package-info.java | 23 + .../scalar/examples/ScalarScheduleExample.scala | 66 + ...ibernateL2CacheExampleMultiNodeSelfTest.java | 31 + .../HibernateL2CacheExampleSelfTest.java | 33 + .../IgniteLgplExamplesSelfTestSuite.java | 48 + ...ibernateL2CacheExampleMultiNodeSelfTest.java | 29 + .../HibernateL2CacheExampleSelfTest.java | 37 + .../IgniteLgplExamplesJ8SelfTestSuite.java | 46 + .../ScalarLgplExamplesMultiNodeSelfTest.scala | 33 + .../examples/ScalarLgplExamplesSelfTest.scala | 36 + .../ScalarLgplExamplesSelfTestSuite.scala | 37 + examples/config/hibernate/README.txt | 8 - .../hibernate/example-hibernate-L2-cache.xml | 64 - examples/pom-standalone.xml | 12 - examples/pom.xml | 12 - .../hibernate/HibernateL2CacheExample.java | 245 ---- .../examples/datagrid/hibernate/Post.java | 130 -- .../examples/datagrid/hibernate/User.java | 154 -- .../datagrid/hibernate/package-info.java | 22 - .../hibernate/CacheHibernatePersonStore.java | 122 -- .../hibernate/CacheHibernateStoreExample.java | 151 -- .../datagrid/store/hibernate/Person.hbm.xml | 34 - .../datagrid/store/hibernate/hibernate.cfg.xml | 41 - .../datagrid/store/hibernate/package-info.java | 22 - .../misc/schedule/ComputeScheduleExample.java | 82 -- .../examples/misc/schedule/package-info.java | 22 - .../misc/schedule/ComputeScheduleExample.java | 68 - .../java8/misc/schedule/package-info.java | 22 - .../scalar/examples/ScalarScheduleExample.scala | 66 - ...ibernateL2CacheExampleMultiNodeSelfTest.java | 31 - .../HibernateL2CacheExampleSelfTest.java | 33 - .../testsuites/IgniteExamplesSelfTestSuite.java | 4 - ...ibernateL2CacheExampleMultiNodeSelfTest.java | 29 - .../HibernateL2CacheExampleSelfTest.java | 37 - .../tests/examples/ScalarExamplesSelfTest.scala | 5 - modules/apache-license-gen/README.txt | 33 + modules/apache-license-gen/pom.xml | 3 + .../JettyRestProcessorAbstractSelfTest.java | 252 +++- .../org/apache/ignite/IgniteFileSystem.java | 2 + .../apache/ignite/IgniteSystemProperties.java | 3 + .../org/apache/ignite/IgniteTransactions.java | 4 - .../discovery/GridDiscoveryManager.java | 55 +- .../internal/portable/PortableContext.java | 19 +- .../portable/api/PortableMarshaller.java | 14 +- .../cache/DynamicCacheDescriptor.java | 17 + .../processors/cache/GridCacheAdapter.java | 357 +++-- .../cache/GridCacheClearAllRunnable.java | 18 +- .../cache/GridCacheConcurrentMap.java | 4 +- .../processors/cache/GridCacheContext.java | 2 +- .../processors/cache/GridCacheIoManager.java | 29 +- .../processors/cache/GridCacheMvccManager.java | 20 +- .../GridCachePartitionExchangeManager.java | 72 +- .../processors/cache/GridCacheProcessor.java | 57 +- .../processors/cache/GridCacheProxyImpl.java | 14 +- .../processors/cache/IgniteCacheProxy.java | 2 +- .../processors/cache/IgniteInternalCache.java | 19 +- .../dht/GridClientPartitionTopology.java | 13 +- .../distributed/dht/GridDhtCacheAdapter.java | 6 +- .../cache/distributed/dht/GridDhtGetFuture.java | 4 +- .../distributed/dht/GridDhtLocalPartition.java | 3 +- .../distributed/dht/GridDhtLockRequest.java | 5 +- .../dht/GridDhtPartitionTopologyImpl.java | 12 +- .../dht/GridPartitionedGetFuture.java | 5 +- .../dht/atomic/GridNearAtomicUpdateFuture.java | 17 +- .../colocated/GridDhtColocatedLockFuture.java | 11 +- .../GridDhtPartitionDemandMessage.java | 4 +- .../GridDhtPartitionSupplyMessage.java | 3 +- .../GridDhtPartitionsExchangeFuture.java | 12 +- .../preloader/GridDhtPartitionsFullMessage.java | 12 +- .../GridDhtPartitionsSingleMessage.java | 11 +- .../dht/preloader/GridDhtPreloader.java | 18 +- .../distributed/near/GridNearCacheAdapter.java | 21 +- .../near/GridNearCacheClearAllRunnable.java | 9 +- .../distributed/near/GridNearGetFuture.java | 2 + .../distributed/near/GridNearLockFuture.java | 11 +- .../near/GridNearOptimisticTxPrepareFuture.java | 24 +- .../cache/query/GridCacheQueryManager.java | 33 +- .../cache/query/GridCacheSqlIndexMetadata.java | 7 +- .../cache/query/GridCacheSqlMetadata.java | 22 +- .../datastructures/DataStructuresProcessor.java | 47 +- .../processors/igfs/IgfsDataManager.java | 2 - .../processors/igfs/IgfsDeleteWorker.java | 102 +- .../internal/processors/igfs/IgfsFileInfo.java | 13 +- .../internal/processors/igfs/IgfsImpl.java | 228 +-- .../processors/igfs/IgfsMetaManager.java | 909 ++++++++---- .../processors/igfs/IgfsOutputStreamImpl.java | 2 + .../internal/processors/igfs/IgfsUtils.java | 23 + .../processors/rest/GridRestCommand.java | 8 +- .../processors/rest/GridRestProcessor.java | 364 ++++- .../handlers/cache/GridCacheCommandHandler.java | 364 ++--- .../handlers/query/QueryCommandHandler.java | 195 ++- .../top/GridTopologyCommandHandler.java | 31 +- .../rest/request/RestQueryRequest.java | 175 +++ .../rest/request/RestSqlQueryRequest.java | 125 -- .../ignite/internal/util/GridJavaProcess.java | 12 +- .../ignite/internal/util/IgniteUtils.java | 2 +- .../ignite/internal/util/lang/GridFunc.java | 12 + .../ignite/internal/util/nio/GridNioServer.java | 2 +- .../apache/ignite/marshaller/Marshaller.java | 2 +- .../optimized/OptimizedMarshallerUtils.java | 6 +- .../communication/tcp/TcpCommunicationSpi.java | 22 +- .../ignite/spi/deployment/DeploymentSpi.java | 8 +- modules/core/src/test/config/tests.properties | 3 + .../ignite/igfs/IgfsEventsAbstractSelfTest.java | 6 +- .../cache/CacheAffinityCallSelfTest.java | 4 +- .../cache/GridCacheAbstractFullApiSelfTest.java | 486 ++++--- .../cache/GridCacheClearSelfTest.java | 308 ++++ .../GridCacheDeploymentOffHeapSelfTest.java | 15 + .../IgniteCacheConfigurationTemplateTest.java | 31 + .../cache/IgniteCacheEntryListenerTxTest.java | 4 + .../cache/IgniteCachePutAllRestartTest.java | 4 +- .../CacheAbstractRestartSelfTest.java | 247 ++++ .../CacheGetFutureHangsSelfTest.java | 159 +-- ...NearDisabledAtomicInvokeRestartSelfTest.java | 179 +++ ...abledTransactionalInvokeRestartSelfTest.java | 173 +++ ...edTransactionalWriteReadRestartSelfTest.java | 124 ++ .../CacheNoValueClassOnServerNodeTest.java | 1 + ...niteCacheClientNodeChangingTopologyTest.java | 10 +- .../distributed/IgniteCacheCreatePutTest.java | 125 ++ .../dht/GridCacheDhtEntrySelfTest.java | 2 +- .../dht/GridCacheDhtPreloadPerformanceTest.java | 133 ++ .../dht/GridCacheTxNodeFailureSelfTest.java | 2 + .../dht/GridNearCacheTxNodeFailureSelfTest.java | 4 + ...gniteAtomicLongChangingTopologySelfTest.java | 159 ++- ...tomicClientOnlyMultiNodeFullApiSelfTest.java | 71 +- ...ledFairAffinityMultiNodeFullApiSelfTest.java | 8 +- ...icOffHeapTieredMultiNodeFullApiSelfTest.java | 7 +- .../near/GridCacheNearTxExceptionSelfTest.java | 4 + .../near/GridCacheNearTxForceKeyTest.java | 2 +- ...achePartitionedMultiNodeFullApiSelfTest.java | 129 +- .../replicated/GridReplicatedTxPreloadTest.java | 7 +- ...bledFairAffinityMultiJvmFullApiSelfTest.java | 5 + ...tomicNearEnabledMultiJvmFullApiSelfTest.java | 5 + .../DataStreamerMultiThreadedSelfTest.java | 4 +- .../DataStreamerMultinodeCreateCacheTest.java | 2 + .../processors/igfs/IgfsAbstractSelfTest.java | 812 ++++++++--- .../igfs/IgfsDataManagerSelfTest.java | 13 +- .../igfs/IgfsMetaManagerSelfTest.java | 170 +-- .../processors/igfs/IgfsProcessorSelfTest.java | 12 +- .../nio/IgniteExceptionInNioWorkerSelfTest.java | 105 ++ .../tcp/TcpClientDiscoverySpiSelfTest.java | 2 + .../testframework/junits/GridAbstractTest.java | 116 +- .../junits/IgniteTestResources.java | 8 +- .../junits/common/GridCommonAbstractTest.java | 15 +- .../junits/multijvm/AffinityProcessProxy.java | 440 ++++-- .../multijvm/IgniteCacheProcessProxy.java | 1346 ++++++++++++++---- .../multijvm/IgniteClusterProcessProxy.java | 115 +- .../multijvm/IgniteEventsProcessProxy.java | 50 +- .../junits/multijvm/IgniteNodeRunner.java | 39 +- .../junits/multijvm/IgniteProcessProxy.java | 107 +- .../ignite/testsuites/IgniteBasicTestSuite.java | 3 + .../IgniteCacheFullApiSelfTestSuite.java | 8 +- .../IgniteCacheLoadConsistencyTestSuite.java | 42 + .../testsuites/IgniteCacheTestSuite4.java | 5 + .../ignite/testsuites/IgniteIgfsTestSuite.java | 6 + modules/extdata/uri/pom.xml | 11 +- .../hadoop/igfs/HadoopIgfsWrapper.java | 54 +- .../HadoopIgfs20FileSystemAbstractSelfTest.java | 27 +- .../IgniteHadoopFileSystemAbstractSelfTest.java | 2 +- .../CacheHibernateBlobStoreSelfTest.java | 6 +- .../cache/CacheConfigurationP2PTest.java | 3 + .../cache/SqlFieldsQuerySelfTest.java | 172 +++ .../IgniteCacheQuerySelfTestSuite.java | 2 + .../main/cpp/common/project/vs/common.vcxproj | 4 +- .../http/jetty/GridJettyJsonConfig.java | 158 +- .../http/jetty/GridJettyRestHandler.java | 186 +-- .../spi/deployment/uri/UriDeploymentSpi.java | 93 +- .../scanners/http/UriDeploymentHttpScanner.java | 10 +- .../http/GridHttpDeploymentSelfTest.java | 132 +- .../visor/commands/kill/VisorKillCommand.scala | 2 +- .../scala/org/apache/ignite/visor/visor.scala | 1 - modules/yardstick/pom.xml | 10 +- pom.xml | 79 +- 197 files changed, 10203 insertions(+), 4126 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/600b7a84/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java index a3cb459,7c5e97c..0f2c7a1 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java @@@ -489,29 -489,22 +489,24 @@@ public final class DataStructuresProces if (dataStructure != null) return dataStructure; - if (!create) - return c.applyx(); - while (true) { - try (IgniteInternalTx tx = utilityCache.txStartEx(PESSIMISTIC, REPEATABLE_READ)) { - err = utilityCache.invoke(DATA_STRUCTURES_KEY, new AddAtomicProcessor(dsInfo)).get(); + try { + if (!create) + return c.applyx(); + + try (IgniteInternalTx tx = utilityCache.txStartEx(PESSIMISTIC, REPEATABLE_READ)) { + err = utilityCache.invoke(DATA_STRUCTURES_KEY, new AddAtomicProcessor(dsInfo)).get(); - if (err != null) - throw err; + if (err != null) + throw err; - dataStructure = c.applyx(); + dataStructure = c.applyx(); - tx.commit(); + tx.commit(); - return dataStructure; + return dataStructure; + } } - catch (ClusterTopologyCheckedException e) { - IgniteInternalFuture<?> fut = e.retryReadyFuture(); - - fut.get(); - } catch (IgniteTxRollbackCheckedException ignore) { // Safe to retry right away. }
