ignite git commit: ignite-9720
Repository: ignite Updated Branches: refs/heads/ignite-9720 2a52875fa -> 8464bd197 ignite-9720 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/8464bd19 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/8464bd19 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/8464bd19 Branch: refs/heads/ignite-9720 Commit: 8464bd1976641bd35ac0de20d01e270d47726012 Parents: 2a52875 Author: sboikov Authored: Wed Oct 24 09:17:54 2018 +0300 Committer: sboikov Committed: Wed Oct 24 09:17:54 2018 +0300 -- .../cache/persistence/FreeListLazyInitializationTest.java | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/8464bd19/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/FreeListLazyInitializationTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/FreeListLazyInitializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/FreeListLazyInitializationTest.java index 45660ad..1cfc17a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/FreeListLazyInitializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/FreeListLazyInitializationTest.java @@ -17,7 +17,6 @@ package org.apache.ignite.internal.processors.cache.persistence; -import org.apache.ignite.IgniteCache; import org.apache.ignite.configuration.BinaryConfiguration; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.DataRegionConfiguration;
[09/11] ignite git commit: IGNITE-9282: [ML] Add Naive Bayes classifier
IGNITE-9282: [ML] Add Naive Bayes classifier this closes #4869 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e29a8cb9 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e29a8cb9 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e29a8cb9 Branch: refs/heads/ignite-9720 Commit: e29a8cb9380fb2c1f6815d40670315919af58d3b Parents: 86f5437 Author: dehasi Authored: Tue Oct 23 19:11:23 2018 +0300 Committer: Yury Babak Committed: Tue Oct 23 19:11:23 2018 +0300 -- .../GaussianNaiveBayesTrainerExample.java | 113 +++ .../examples/ml/naivebayes/package-info.java| 22 +++ .../ignite/examples/util/IrisDataset.java | 129 + .../gaussian/GaussianNaiveBayesModel.java | 111 +++ .../gaussian/GaussianNaiveBayesSumsHolder.java | 55 ++ .../gaussian/GaussianNaiveBayesTrainer.java | 186 +++ .../ml/naivebayes/gaussian/package-info.java| 22 +++ .../ignite/ml/naivebayes/package-info.java | 22 +++ .../gaussian/GaussianNaiveBayesModelTest.java | 50 + .../gaussian/GaussianNaiveBayesTest.java| 86 + .../gaussian/GaussianNaiveBayesTrainerTest.java | 182 ++ 11 files changed, 978 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/e29a8cb9/examples/src/main/java/org/apache/ignite/examples/ml/naivebayes/GaussianNaiveBayesTrainerExample.java -- diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/naivebayes/GaussianNaiveBayesTrainerExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/naivebayes/GaussianNaiveBayesTrainerExample.java new file mode 100644 index 000..cd8383e --- /dev/null +++ b/examples/src/main/java/org/apache/ignite/examples/ml/naivebayes/GaussianNaiveBayesTrainerExample.java @@ -0,0 +1,113 @@ +/* + * 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.examples.ml.naivebayes; + +import java.util.Arrays; +import javax.cache.Cache; +import org.apache.ignite.Ignite; +import org.apache.ignite.IgniteCache; +import org.apache.ignite.Ignition; +import org.apache.ignite.cache.query.QueryCursor; +import org.apache.ignite.cache.query.ScanQuery; +import org.apache.ignite.examples.ml.util.TestCache; +import org.apache.ignite.ml.math.primitives.vector.Vector; +import org.apache.ignite.ml.math.primitives.vector.VectorUtils; +import org.apache.ignite.ml.naivebayes.gaussian.GaussianNaiveBayesModel; +import org.apache.ignite.ml.naivebayes.gaussian.GaussianNaiveBayesTrainer; + +import static org.apache.ignite.examples.util.IrisDataset.irisDatasetFirstAndSecondClasses; + +/** + * Run naive Bayes classification model based on https://en.wikipedia.org/wiki/Naive_Bayes_classifier";> naive + * Bayes classifier algorithm ({@link GaussianNaiveBayesTrainer}) over distributed cache. + * + * Code in this example launches Ignite grid and fills the cache with test data points (based on the + * https://en.wikipedia.org/wiki/Iris_flower_data_set";>Iris dataset). + * + * After that it trains the naive Bayes classification model based on the specified data. + * + * Finally, this example loops over the test set of data points, applies the trained model to predict the target value, + * compares prediction to expected outcome (ground truth), and builds + * https://en.wikipedia.org/wiki/Confusion_matrix";>confusion matrix. + * + * You can change the test data used in this example and re-run it to explore this algorithm further. + */ +public class GaussianNaiveBayesTrainerExample { +/** Run example. */ +public static void main(String[] args) throws InterruptedException { +System.out.println(); +System.out.println(">>> Naive Bayes classification model over partitioned dataset usage example started."); +// Start ignite grid. +try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) { +System.out.println(">>> Ignite grid started."); +
[08/11] ignite git commit: Revert "IGNITE-5795 Register binary metadata during cache start - Fixes #4852."
Revert "IGNITE-5795 Register binary metadata during cache start - Fixes #4852." This reverts commit 3bb03444246f863096063d084393676a84d2bc0e. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/86f54371 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/86f54371 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/86f54371 Branch: refs/heads/ignite-9720 Commit: 86f543713b148541a6d497c4ab6404e7e7edf815 Parents: 324e6e3 Author: Alexey Goncharuk Authored: Tue Oct 23 17:54:24 2018 +0300 Committer: Alexey Goncharuk Committed: Tue Oct 23 17:54:24 2018 +0300 -- .../apache/ignite/internal/IgniteKernal.java| 2 +- .../binary/BinaryCachingMetadataHandler.java| 25 +- .../ignite/internal/binary/BinaryContext.java | 59 +--- .../internal/binary/BinaryMetadataHandler.java | 10 - .../binary/BinaryNoopMetadataHandler.java | 6 - .../binary/builder/BinaryObjectBuilderImpl.java | 2 +- .../internal/client/thin/TcpIgniteClient.java | 6 - .../processors/cache/GridCacheProcessor.java| 9 +- .../binary/CacheObjectBinaryProcessorImpl.java | 5 - .../processors/query/GridQueryProcessor.java| 77 + .../binary/TestCachingMetadataHandler.java | 6 - .../cache/CacheRegisterMetadataLocallyTest.java | 287 --- .../cache/index/AbstractSchemaSelfTest.java | 6 +- .../index/H2DynamicIndexAbstractSelfTest.java | 48 ++-- .../IgniteCacheWithIndexingTestSuite.java | 2 - 15 files changed, 56 insertions(+), 494 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/86f54371/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 1546da3..1f9a5e8 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 @@ -1005,7 +1005,6 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { // Start processors before discovery manager, so they will // be able to start receiving messages once discovery completes. try { -startProcessor(new GridMarshallerMappingProcessor(ctx)); startProcessor(new PdsConsistentIdProcessor(ctx)); startProcessor(new MvccProcessorImpl(ctx)); startProcessor(createComponent(DiscoveryNodeValidationProcessor.class, ctx)); @@ -1029,6 +1028,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { startProcessor(createHadoopComponent()); startProcessor(new DataStructuresProcessor(ctx)); startProcessor(createComponent(PlatformProcessor.class, ctx)); +startProcessor(new GridMarshallerMappingProcessor(ctx)); // Start plugins. for (PluginProvider provider : ctx.plugins().allProviders()) { http://git-wip-us.apache.org/repos/asf/ignite/blob/86f54371/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryCachingMetadataHandler.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryCachingMetadataHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryCachingMetadataHandler.java index b60dc097..a0559cb 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryCachingMetadataHandler.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryCachingMetadataHandler.java @@ -46,29 +46,24 @@ public class BinaryCachingMetadataHandler implements BinaryMetadataHandler { } /** {@inheritDoc} */ -@Override public synchronized void addMeta(int typeId, BinaryType type, -boolean failIfUnregistered) throws BinaryObjectException { -BinaryType oldType = metas.put(typeId, type); +@Override public synchronized void addMeta(int typeId, BinaryType type, boolean failIfUnregistered) throws BinaryObjectException { +synchronized (this) { +BinaryType oldType = metas.put(typeId, type); -if (oldType != null) { -BinaryMetadata oldMeta = ((BinaryTypeImpl)oldType).metadata(); -BinaryMetadata newMeta = ((BinaryTypeImpl)type).metadata(); +if (oldType != null) { +BinaryMetadata oldMeta = ((BinaryTypeImpl)oldType).metadata(); +BinaryMetadata newMeta = ((BinaryTypeImpl)type).metadata(); -BinaryMetadata mergedMeta = Bina
[02/11] ignite git commit: IGNITE-9911: MVCC: Fixed a hang during vacuum. This closes #5035.
IGNITE-9911: MVCC: Fixed a hang during vacuum. This closes #5035. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b1584a8f Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b1584a8f Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b1584a8f Branch: refs/heads/ignite-9720 Commit: b1584a8f2636d390b3f8cc754ce1195ccc797807 Parents: 962d6a2 Author: Igor Seliverstov Authored: Tue Oct 23 12:05:23 2018 +0300 Committer: devozerov Committed: Tue Oct 23 12:05:23 2018 +0300 -- .../cache/mvcc/MvccProcessorImpl.java | 228 --- .../cache/mvcc/CacheMvccAbstractTest.java | 21 +- ...cheMvccSelectForUpdateQueryAbstractTest.java | 11 +- 3 files changed, 115 insertions(+), 145 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/b1584a8f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java index 9fcafb0..e58151f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java @@ -90,8 +90,8 @@ import org.apache.ignite.internal.util.future.GridCompoundFuture; import org.apache.ignite.internal.util.future.GridCompoundIdentityFuture; import org.apache.ignite.internal.util.future.GridFinishedFuture; import org.apache.ignite.internal.util.future.GridFutureAdapter; +import org.apache.ignite.internal.util.lang.GridClosureException; import org.apache.ignite.internal.util.lang.GridCursor; -import org.apache.ignite.internal.util.typedef.CI1; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.internal.util.typedef.internal.S; @@ -115,7 +115,6 @@ import static org.apache.ignite.events.EventType.EVT_NODE_SEGMENTED; import static org.apache.ignite.internal.GridTopic.TOPIC_CACHE_COORDINATOR; import static org.apache.ignite.internal.events.DiscoveryCustomEvent.EVT_DISCOVERY_CUSTOM_EVT; import static org.apache.ignite.internal.managers.communication.GridIoPolicy.SYSTEM_POOL; -import static org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.OWNING; import static org.apache.ignite.internal.processors.cache.mvcc.MvccQueryTracker.MVCC_TRACKER_ID_NA; import static org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.MVCC_COUNTER_NA; import static org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.MVCC_CRD_COUNTER_NA; @@ -181,9 +180,6 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce */ private final Object mux = new Object(); -/** For tests only. */ -private volatile Throwable vacuumError; - /** */ private final GridAtomicLong futIdCntr = new GridAtomicLong(0); @@ -1136,8 +1132,7 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce crdVer == 0 && ctx.localNodeId().equals(crd0.nodeId())) return new GridFinishedFuture<>(new VacuumMetrics()); -final GridCompoundIdentityFuture res = -new GridCompoundIdentityFuture<>(new VacuumMetricsReducer()); +final GridFutureAdapter res = new GridFutureAdapter<>(); MvccSnapshot snapshot; @@ -1174,28 +1169,10 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce } /** - * For tests only. - * - * @return Vacuum error. - */ -Throwable vacuumError() { -return vacuumError; -} - -/** - * For tests only. - * - * @param e Vacuum error. - */ -void vacuumError(Throwable e) { -this.vacuumError = e; -} - -/** * @param res Result. * @param snapshot Snapshot. */ -private void continueRunVacuum(GridCompoundIdentityFuture res, MvccSnapshot snapshot) { +private void continueRunVacuum(GridFutureAdapter res, MvccSnapshot snapshot) { ackTxCommit(snapshot) .listen(new IgniteInClosure() { @Override public void apply(IgniteInternalFuture fut) { @@ -1220,23 +1197,45 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce return; } +GridCompoundIdentityFuture res0 = +new GridCompoundIdentityFuture(new VacuumMetricsRedu
[11/11] ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-9720
Merge remote-tracking branch 'remotes/origin/master' into ignite-9720 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/2a52875f Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/2a52875f Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/2a52875f Branch: refs/heads/ignite-9720 Commit: 2a52875facdb5e8e20b65f0e4a742be394145099 Parents: d98bfd9 a9b65d6 Author: sboikov Authored: Wed Oct 24 09:05:30 2018 +0300 Committer: sboikov Committed: Wed Oct 24 09:05:30 2018 +0300 -- .../GaussianNaiveBayesTrainerExample.java | 113 .../examples/ml/naivebayes/package-info.java| 22 ++ .../ignite/examples/util/IrisDataset.java | 129 + .../apache/ignite/internal/IgniteKernal.java| 34 ++- .../binary/BinaryCachingMetadataHandler.java| 25 +- .../ignite/internal/binary/BinaryContext.java | 59 +--- .../internal/binary/BinaryMetadataHandler.java | 10 - .../binary/BinaryNoopMetadataHandler.java | 6 - .../binary/builder/BinaryObjectBuilderImpl.java | 2 +- .../internal/client/thin/TcpIgniteClient.java | 6 - .../GridCachePartitionExchangeManager.java | 5 + .../processors/cache/GridCacheProcessor.java| 9 +- .../binary/CacheObjectBinaryProcessorImpl.java | 5 - .../GridDhtPartitionsExchangeFuture.java| 19 +- .../near/GridNearTxEnlistFuture.java| 4 +- .../near/GridNearTxQueryEnlistFuture.java | 3 +- .../GridNearTxQueryResultsEnlistFuture.java | 4 +- .../cache/mvcc/MvccProcessorImpl.java | 237 +++ .../cache/mvcc/MvccQueryTrackerImpl.java| 16 +- .../cache/mvcc/msg/MvccSnapshotResponse.java| 4 + .../GridCacheDatabaseSharedManager.java | 22 +- .../IgniteCacheDatabaseSharedManager.java | 6 +- .../processors/query/GridQueryProcessor.java| 77 + .../ignite/client/ClientConfigurationTest.java | 42 +++ .../binary/TestCachingMetadataHandler.java | 6 - ...acheAsyncOperationsFailoverAbstractTest.java | 2 + .../cache/mvcc/CacheMvccAbstractTest.java | 88 +- .../metastorage/IgniteMetaStorageBasicTest.java | 45 +++ .../query/h2/database/H2TreeFilterClosure.java | 19 +- .../query/h2/database/H2TreeIndex.java | 2 +- .../query/h2/sql/GridSqlQuerySplitter.java | 137 +++-- .../h2/twostep/GridReduceQueryExecutor.java | 5 +- .../cache/CacheRegisterMetadataLocallyTest.java | 287 --- .../cache/index/AbstractSchemaSelfTest.java | 6 +- .../index/H2DynamicIndexAbstractSelfTest.java | 48 ++-- ...ccPartitionedSqlCoordinatorFailoverTest.java | 9 + ...cheMvccSelectForUpdateQueryAbstractTest.java | 11 +- .../InOperationExtractPartitionSelfTest.java| 201 + .../query/h2/twostep/JoinSqlTestHelper.java | 9 +- .../IgniteCacheQuerySelfTestSuite.java | 4 + .../IgniteCacheWithIndexingTestSuite.java | 2 - .../gaussian/GaussianNaiveBayesModel.java | 111 +++ .../gaussian/GaussianNaiveBayesSumsHolder.java | 55 .../gaussian/GaussianNaiveBayesTrainer.java | 186 .../ml/naivebayes/gaussian/package-info.java| 22 ++ .../ignite/ml/naivebayes/package-info.java | 22 ++ .../gaussian/GaussianNaiveBayesModelTest.java | 50 .../gaussian/GaussianNaiveBayesTest.java| 86 ++ .../gaussian/GaussianNaiveBayesTrainerTest.java | 182 .../php/src/Apache/Ignite/Data/Date.php | 9 +- .../php/src/Apache/Ignite/Data/Timestamp.php| 4 +- 51 files changed, 1743 insertions(+), 724 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/2a52875f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java --
[01/11] ignite git commit: IGNITE-9719 Extra rebalanceThreadPoolSize check on client node - Fixes #4911.
Repository: ignite Updated Branches: refs/heads/ignite-9720 d98bfd955 -> 2a52875fa IGNITE-9719 Extra rebalanceThreadPoolSize check on client node - Fixes #4911. Signed-off-by: Ivan Rakov Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/962d6a29 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/962d6a29 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/962d6a29 Branch: refs/heads/ignite-9720 Commit: 962d6a29716195c13519ca48b6d79f3b8541653c Parents: d4af213 Author: luchnikovnsk Authored: Tue Oct 23 11:16:40 2018 +0300 Committer: Ivan Rakov Committed: Tue Oct 23 11:16:40 2018 +0300 -- .../apache/ignite/internal/IgniteKernal.java| 32 +-- .../ignite/client/ClientConfigurationTest.java | 42 2 files changed, 61 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/962d6a29/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 40347d7..1546da3 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 @@ -2581,19 +2581,25 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { * */ private void ackRebalanceConfiguration() throws IgniteCheckedException { -if (cfg.getSystemThreadPoolSize() <= cfg.getRebalanceThreadPoolSize()) -throw new IgniteCheckedException("Rebalance thread pool size exceed or equals System thread pool size. " + -"Change IgniteConfiguration.rebalanceThreadPoolSize property before next start."); - -if (cfg.getRebalanceThreadPoolSize() < 1) -throw new IgniteCheckedException("Rebalance thread pool size minimal allowed value is 1. " + -"Change IgniteConfiguration.rebalanceThreadPoolSize property before next start."); - -for (CacheConfiguration ccfg : cfg.getCacheConfiguration()) { -if (ccfg.getRebalanceBatchesPrefetchCount() < 1) -throw new IgniteCheckedException("Rebalance batches prefetch count minimal allowed value is 1. " + -"Change CacheConfiguration.rebalanceBatchesPrefetchCount property before next start. " + -"[cache=" + ccfg.getName() + "]"); +if (cfg.isClientMode()) { +if (cfg.getRebalanceThreadPoolSize() != IgniteConfiguration.DFLT_REBALANCE_THREAD_POOL_SIZE) +U.warn(log, "Setting the rebalance pool size has no effect on the client mode"); +} +else { +if (cfg.getSystemThreadPoolSize() <= cfg.getRebalanceThreadPoolSize()) +throw new IgniteCheckedException("Rebalance thread pool size exceed or equals System thread pool size. " + +"Change IgniteConfiguration.rebalanceThreadPoolSize property before next start."); + +if (cfg.getRebalanceThreadPoolSize() < 1) +throw new IgniteCheckedException("Rebalance thread pool size minimal allowed value is 1. " + +"Change IgniteConfiguration.rebalanceThreadPoolSize property before next start."); + +for (CacheConfiguration ccfg : cfg.getCacheConfiguration()) { +if (ccfg.getRebalanceBatchesPrefetchCount() < 1) +throw new IgniteCheckedException("Rebalance batches prefetch count minimal allowed value is 1. " + +"Change CacheConfiguration.rebalanceBatchesPrefetchCount property before next start. " + +"[cache=" + ccfg.getName() + "]"); +} } } http://git-wip-us.apache.org/repos/asf/ignite/blob/962d6a29/modules/core/src/test/java/org/apache/ignite/client/ClientConfigurationTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/client/ClientConfigurationTest.java b/modules/core/src/test/java/org/apache/ignite/client/ClientConfigurationTest.java index bcc212a..287c6ec 100644 --- a/modules/core/src/test/java/org/apache/ignite/client/ClientConfigurationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/client/ClientConfigurationTest.java @@ -25,9 +25,19 @@ import java.io.ObjectInputStream; import java.io.ObjectOutput; import java.io.ObjectOutputStream; import java.util.Collections; +import java.util.Set; +import java.util.function.Predicate; +import java.util.stream.Collectors; + +import org.apache.ignite.Ignite; +import org.apache.ignite.Ignit
[05/11] ignite git commit: IGNITE-9663: MVCC: Fixes to transaction mapping. This closes #5018.
IGNITE-9663: MVCC: Fixes to transaction mapping. This closes #5018. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d76ff542 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d76ff542 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d76ff542 Branch: refs/heads/ignite-9720 Commit: d76ff54264498f49f070d0ff5e6d7d67f29d93ba Parents: 685c008 Author: rkondakov Authored: Tue Oct 23 14:59:12 2018 +0300 Committer: devozerov Committed: Tue Oct 23 14:59:12 2018 +0300 -- .../near/GridNearTxEnlistFuture.java| 4 +- .../near/GridNearTxQueryEnlistFuture.java | 3 +- .../GridNearTxQueryResultsEnlistFuture.java | 4 +- .../cache/mvcc/MvccProcessorImpl.java | 9 ++- .../cache/mvcc/MvccQueryTrackerImpl.java| 16 - .../cache/mvcc/msg/MvccSnapshotResponse.java| 4 ++ .../cache/mvcc/CacheMvccAbstractTest.java | 67 +++- .../query/h2/database/H2TreeFilterClosure.java | 19 +- .../query/h2/database/H2TreeIndex.java | 2 +- .../h2/twostep/GridReduceQueryExecutor.java | 5 +- ...ccPartitionedSqlCoordinatorFailoverTest.java | 9 +++ 11 files changed, 121 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/d76ff542/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java index ed75c36..3ddedd0 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java @@ -575,9 +575,7 @@ public class GridNearTxEnlistFuture extends GridNearTxAbstractEnlistFuturehttp://git-wip-us.apache.org/repos/asf/ignite/blob/d76ff542/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java index 8528345..70fbd1f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java @@ -363,8 +363,7 @@ public class GridNearTxQueryEnlistFuture extends GridNearTxQueryAbstractEnlistFu completed = true; } -if (X.hasCause(err, ClusterTopologyCheckedException.class) -|| (res != null && res.removeMapping())) { +if (res != null && res.removeMapping()) { GridDistributedTxMapping m = tx.mappings().get(node.id()); assert m != null && m.empty(); http://git-wip-us.apache.org/repos/asf/ignite/blob/d76ff542/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java index f375405..9783582 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java @@ -552,9 +552,7 @@ public class GridNearTxQueryResultsEnlistFuture extends GridNearTxQueryAbstractE if (err == null && res.error() != null) err = res.error(); -if (X.hasCause(err, ClusterTopologyCheckedException.class)) -tx.removeMapping(nodeId); -else if (res != null) +if (res != null) tx.mappings().get(nodeId).addBackups(res.newDhtNodes()); if (err != null) http://git-wip-us.apache.org/repos/asf/ignite/blob/d76ff542/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java -
[10/11] ignite git commit: IGNITE-9755 fix PutAllSyncFailover hangs + mute test - Fixes #4735.
IGNITE-9755 fix PutAllSyncFailover hangs + mute test - Fixes #4735. Signed-off-by: Dmitriy Govorukhin Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a9b65d6e Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a9b65d6e Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a9b65d6e Branch: refs/heads/ignite-9720 Commit: a9b65d6e4a86e00876fdbfc17a13ceed718c21e7 Parents: e29a8cb Author: Alexey Stelmak Authored: Wed Oct 24 00:52:28 2018 +0300 Committer: Dmitriy Govorukhin Committed: Wed Oct 24 00:52:28 2018 +0300 -- .../processors/cache/GridCachePartitionExchangeManager.java | 5 + .../distributed/CacheAsyncOperationsFailoverAbstractTest.java | 2 ++ 2 files changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/a9b65d6e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java index b0e0d0d..38d5725 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java @@ -781,6 +781,11 @@ public class GridCachePartitionExchangeManager extends GridCacheSharedMana for (AffinityReadyFuture f : readyFuts.values()) f.onDone(stopErr); +GridDhtPartitionsExchangeFuture lastFut = lastInitializedFut; + +if (lastFut != null) +lastFut.onDone(stopErr); + if (!cctx.kernalContext().clientNode()) { for (int cnt = 0; cnt < cctx.gridConfig().getRebalanceThreadPoolSize(); cnt++) cctx.io().removeOrderedHandler(true, rebalanceTopic(cnt)); http://git-wip-us.apache.org/repos/asf/ignite/blob/a9b65d6e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java index f1377df..211320f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java @@ -111,6 +111,8 @@ public abstract class CacheAsyncOperationsFailoverAbstractTest extends GridCache * @throws Exception If failed. */ public void testAsyncFailover() throws Exception { +fail("https://issues.apache.org/jira/browse/IGNITE-9759";); + IgniteCache cache = ignite(0).cache(DEFAULT_CACHE_NAME); int ops = cache.getConfiguration(CacheConfiguration.class).getMaxConcurrentAsyncOperations();
[06/11] ignite git commit: IGNITE-9632: SQL: support IN statement with constants/params for partition pruning. This closes #4857.
IGNITE-9632: SQL: support IN statement with constants/params for partition pruning. This closes #4857. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d669da15 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d669da15 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d669da15 Branch: refs/heads/ignite-9720 Commit: d669da154f79e48a833a754a59606b65159406c3 Parents: d76ff54 Author: devozerov Authored: Tue Oct 23 15:15:23 2018 +0300 Committer: devozerov Committed: Tue Oct 23 15:15:23 2018 +0300 -- .../query/h2/sql/GridSqlQuerySplitter.java | 137 +++-- .../InOperationExtractPartitionSelfTest.java| 201 +++ .../query/h2/twostep/JoinSqlTestHelper.java | 9 +- .../IgniteCacheQuerySelfTestSuite2.java | 3 + 4 files changed, 331 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/d669da15/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java -- diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java index ca9c5bb..b19dd14 100644 --- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java +++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java @@ -53,6 +53,7 @@ import org.apache.ignite.internal.util.typedef.internal.S; import org.h2.command.Prepared; import org.h2.command.dml.Query; import org.h2.command.dml.SelectUnion; +import org.h2.table.Column; import org.h2.table.IndexColumn; import org.h2.value.Value; import org.jetbrains.annotations.Nullable; @@ -2342,6 +2343,64 @@ public class GridSqlQuerySplitter { return null; } +case IN: { +// Operation should contain at least two children: left (column) and right (const or column). +if (op.size() < 2) +return null; + +// Left operand should be column. +GridSqlAst left = op.child(); + +GridSqlColumn leftCol; + +if (left instanceof GridSqlColumn) +leftCol = (GridSqlColumn)left; +else +return null; + +// Can work only with Ignite's tables. +if (!(leftCol.column().getTable() instanceof GridH2Table)) +return null; + +CacheQueryPartitionInfo[] res = new CacheQueryPartitionInfo[op.size() - 1]; + +for (int i = 1; i < op.size(); i++) { +GridSqlAst right = op.child(i); + +GridSqlConst rightConst; +GridSqlParameter rightParam; + +if (right instanceof GridSqlConst) { +rightConst = (GridSqlConst)right; +rightParam = null; +} +else if (right instanceof GridSqlParameter) { +rightConst = null; +rightParam = (GridSqlParameter)right; +} +else +// One of members of "IN" list is neither const, nor param, so we do no know it's partition. +// As this is disjunction, not knowing partition of a single element leads to unknown partition +// set globally. Hence, returning null. +return null; + +CacheQueryPartitionInfo cur = getCacheQueryPartitionInfo( +leftCol.column(), +rightConst, +rightParam, +ctx +); + +// Same thing as above: single unknown partition in disjunction defeats optimization. +if (cur == null) +return null; + +res[i - 1] = cur; +} + +return res; +} + default: return null; } @@ -2362,39 +2421,85 @@ public class GridSqlQuerySplitter { GridSqlElement left = op.child(0); GridSqlElement right = op.child(1); -if (!(left instanceof GridSqlColumn)) +GridSqlColumn leftCol; + +if (left instanceof GridSqlColumn) +leftCol = (GridSqlColumn)left; +else return null; -if (!(right instanceof GridSqlConst) && !(right instanceof GridSqlParameter)) +
[04/11] ignite git commit: IGNITE-9951 PHP: Fixes for Date data type
IGNITE-9951 PHP: Fixes for Date data type This closes #5043 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/685c008a Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/685c008a Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/685c008a Branch: refs/heads/ignite-9720 Commit: 685c008af3c5c07f02e7d311fdf0c39f6e3941e0 Parents: 3f7109f Author: Pavel Petroshenko Authored: Tue Oct 23 13:35:37 2018 +0300 Committer: Igor Sapego Committed: Tue Oct 23 13:35:37 2018 +0300 -- modules/platforms/php/src/Apache/Ignite/Data/Date.php | 9 - modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php | 4 +++- 2 files changed, 7 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/685c008a/modules/platforms/php/src/Apache/Ignite/Data/Date.php -- diff --git a/modules/platforms/php/src/Apache/Ignite/Data/Date.php b/modules/platforms/php/src/Apache/Ignite/Data/Date.php index 356cc36..fa5f394 100644 --- a/modules/platforms/php/src/Apache/Ignite/Data/Date.php +++ b/modules/platforms/php/src/Apache/Ignite/Data/Date.php @@ -47,7 +47,8 @@ class Date */ public static function fromDateTime(DateTime $dateTime) { -return new Date($dateTime->getTimestamp() * 1000); +$millis = intval($dateTime->format('u') / 1000); +return new Date($dateTime->getTimestamp() * 1000 + $millis); } /** @@ -57,11 +58,9 @@ class Date */ public function toDateTime(): DateTime { -$dateTime = new DateTime(); -$dateTime->setTimestamp($this->getSeconds()); -return $dateTime; +return DateTime::createFromFormat('U.u', number_format($this->getMillis() / 1000, 6, '.', '')); } - + /** * Returns the date value as number of milliseconds elapsed since January 1, 1970, 00:00:00 UTC. * http://git-wip-us.apache.org/repos/asf/ignite/blob/685c008a/modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php -- diff --git a/modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php b/modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php index 39ef984..a404d46 100644 --- a/modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php +++ b/modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php @@ -49,7 +49,9 @@ class Timestamp extends Date */ public static function fromDateTime(DateTime $dateTime) { -return new Timestamp($dateTime->getTimestamp() * 1000, 0); +$micros = $dateTime->format('u'); +$millis = intval($micros / 1000); +return new Timestamp($dateTime->getTimestamp() * 1000 + $millis, ($micros % 1000) * 1000); } /**
[03/11] ignite git commit: IGNITE-8879 Fix blinking baseline node sometimes unable to connect to cluster - Fixes #4893.
IGNITE-8879 Fix blinking baseline node sometimes unable to connect to cluster - Fixes #4893. Signed-off-by: Dmitriy Govorukhin Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3f7109ff Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3f7109ff Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3f7109ff Branch: refs/heads/ignite-9720 Commit: 3f7109ff52bdfc3157987b2230216cc982392eff Parents: b1584a8 Author: Ivan Daschinskiy Authored: Tue Oct 23 12:33:24 2018 +0300 Committer: Dmitriy Govorukhin Committed: Tue Oct 23 12:33:24 2018 +0300 -- .../GridDhtPartitionsExchangeFuture.java| 19 - .../GridCacheDatabaseSharedManager.java | 22 -- .../IgniteCacheDatabaseSharedManager.java | 6 ++- .../metastorage/IgniteMetaStorageBasicTest.java | 45 4 files changed, 66 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/3f7109ff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java index 0c2cbe2..63d3635 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java @@ -871,16 +871,13 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte * @throws IgniteCheckedException If failed. */ private IgniteInternalFuture initCachesOnLocalJoin() throws IgniteCheckedException { -if (isLocalNodeNotInBaseline()) { +boolean baselineNode = isLocalNodeInBaseline(); + +if (!baselineNode) { cctx.exchange().exchangerBlockingSectionBegin(); try { cctx.cache().cleanupCachesDirectories(); - -cctx.database().cleanupCheckpointDirectory(); - -if (cctx.wal() != null) -cctx.wal().cleanupWalDirectories(); } finally { cctx.exchange().exchangerBlockingSectionEnd(); @@ -916,7 +913,7 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte cctx.exchange().exchangerBlockingSectionBegin(); try { -cctx.database().readCheckpointAndRestoreMemory(startDescs); +cctx.database().readCheckpointAndRestoreMemory(startDescs, !baselineNode); } finally { cctx.exchange().exchangerBlockingSectionEnd(); @@ -950,12 +947,12 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte } /** - * @return {@code true} if local node is not in baseline and {@code false} otherwise. + * @return {@code true} if local node is in baseline and {@code false} otherwise. */ -private boolean isLocalNodeNotInBaseline() { +private boolean isLocalNodeInBaseline() { BaselineTopology topology = cctx.discovery().discoCache().state().baselineTopology(); -return topology!= null && !topology.consistentIds().contains(cctx.localNode().consistentId()); +return topology != null && topology.consistentIds().contains(cctx.localNode().consistentId()); } /** @@ -1098,7 +1095,7 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte cctx.exchange().exchangerBlockingSectionBegin(); try { - cctx.database().readCheckpointAndRestoreMemory(startDescs); + cctx.database().readCheckpointAndRestoreMemory(startDescs, false); } finally { cctx.exchange().exchangerBlockingSectionEnd(); http://git-wip-us.apache.org/repos/asf/ignite/blob/3f7109ff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java index 73d65f4..0f
[07/11] ignite git commit: IGNITE-9632: SQL: support IN statement with constants/params for partition pruning. This closes #4857.
IGNITE-9632: SQL: support IN statement with constants/params for partition pruning. This closes #4857. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/324e6e38 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/324e6e38 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/324e6e38 Branch: refs/heads/ignite-9720 Commit: 324e6e38eb1ef042bbf3a506d523201266893050 Parents: d669da1 Author: devozerov Authored: Tue Oct 23 15:16:56 2018 +0300 Committer: devozerov Committed: Tue Oct 23 15:16:56 2018 +0300 -- .../apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java | 4 .../apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/324e6e38/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java index 7633d2a..f29a79b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java @@ -186,6 +186,7 @@ import org.apache.ignite.internal.processors.query.h2.sql.BaseH2CompareQueryTest import org.apache.ignite.internal.processors.query.h2.sql.GridQueryParsingTest; import org.apache.ignite.internal.processors.query.h2.sql.H2CompareBigQueryDistributedJoinsTest; import org.apache.ignite.internal.processors.query.h2.sql.H2CompareBigQueryTest; +import org.apache.ignite.internal.processors.query.h2.twostep.InOperationExtractPartitionSelfTest; import org.apache.ignite.internal.processors.sql.IgniteCachePartitionedAtomicColumnConstraintsTest; import org.apache.ignite.internal.processors.sql.IgniteCachePartitionedTransactionalColumnConstraintsTest; import org.apache.ignite.internal.processors.sql.IgniteCacheReplicatedAtomicColumnConstraintsTest; @@ -486,6 +487,9 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite { suite.addTestSuite(IgniteSqlGroupConcatCollocatedTest.class); suite.addTestSuite(IgniteSqlGroupConcatNotCollocatedTest.class); +// Partition pruning. +suite.addTestSuite(InOperationExtractPartitionSelfTest.class); + return suite; } } http://git-wip-us.apache.org/repos/asf/ignite/blob/324e6e38/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java index ac8d10a..dba046b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java @@ -54,7 +54,6 @@ import org.apache.ignite.internal.processors.query.h2.twostep.CacheQueryMemoryLe import org.apache.ignite.internal.processors.query.h2.twostep.CreateTableWithDateKeySelfTest; import org.apache.ignite.internal.processors.query.h2.twostep.DisappearedCacheCauseRetryMessageSelfTest; import org.apache.ignite.internal.processors.query.h2.twostep.DisappearedCacheWasNotFoundMessageSelfTest; -import org.apache.ignite.internal.processors.query.h2.twostep.InOperationExtractPartitionSelfTest; import org.apache.ignite.internal.processors.query.h2.twostep.NonCollocatedRetryMessageSelfTest; import org.apache.ignite.internal.processors.query.h2.twostep.RetryCauseMessageSelfTest; import org.apache.ignite.internal.processors.query.h2.twostep.TableViewSubquerySelfTest; @@ -124,8 +123,6 @@ public class IgniteCacheQuerySelfTestSuite2 extends TestSuite { suite.addTestSuite(DisappearedCacheCauseRetryMessageSelfTest.class); suite.addTestSuite(DisappearedCacheWasNotFoundMessageSelfTest.class); -suite.addTestSuite(InOperationExtractPartitionSelfTest.class); - suite.addTestSuite(TableViewSubquerySelfTest.class); return suite;
[ignite] Git Push Summary
Repository: ignite Updated Branches: refs/heads/ignite-gg-14206 [deleted] 1e91d477f
ignite git commit: IGNITE-9755 fix PutAllSyncFailover hangs + mute test - Fixes #4735.
Repository: ignite Updated Branches: refs/heads/master e29a8cb93 -> a9b65d6e4 IGNITE-9755 fix PutAllSyncFailover hangs + mute test - Fixes #4735. Signed-off-by: Dmitriy Govorukhin Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a9b65d6e Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a9b65d6e Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a9b65d6e Branch: refs/heads/master Commit: a9b65d6e4a86e00876fdbfc17a13ceed718c21e7 Parents: e29a8cb Author: Alexey Stelmak Authored: Wed Oct 24 00:52:28 2018 +0300 Committer: Dmitriy Govorukhin Committed: Wed Oct 24 00:52:28 2018 +0300 -- .../processors/cache/GridCachePartitionExchangeManager.java | 5 + .../distributed/CacheAsyncOperationsFailoverAbstractTest.java | 2 ++ 2 files changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/a9b65d6e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java index b0e0d0d..38d5725 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java @@ -781,6 +781,11 @@ public class GridCachePartitionExchangeManager extends GridCacheSharedMana for (AffinityReadyFuture f : readyFuts.values()) f.onDone(stopErr); +GridDhtPartitionsExchangeFuture lastFut = lastInitializedFut; + +if (lastFut != null) +lastFut.onDone(stopErr); + if (!cctx.kernalContext().clientNode()) { for (int cnt = 0; cnt < cctx.gridConfig().getRebalanceThreadPoolSize(); cnt++) cctx.io().removeOrderedHandler(true, rebalanceTopic(cnt)); http://git-wip-us.apache.org/repos/asf/ignite/blob/a9b65d6e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java index f1377df..211320f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAsyncOperationsFailoverAbstractTest.java @@ -111,6 +111,8 @@ public abstract class CacheAsyncOperationsFailoverAbstractTest extends GridCache * @throws Exception If failed. */ public void testAsyncFailover() throws Exception { +fail("https://issues.apache.org/jira/browse/IGNITE-9759";); + IgniteCache cache = ignite(0).cache(DEFAULT_CACHE_NAME); int ops = cache.getConfiguration(CacheConfiguration.class).getMaxConcurrentAsyncOperations();
svn commit: r1844702 - in /ignite/site/trunk: events.html index.html
Author: dmagda Date: Tue Oct 23 21:07:02 2018 New Revision: 1844702 URL: http://svn.apache.org/viewvc?rev=1844702&view=rev Log: updated events Modified: ignite/site/trunk/events.html ignite/site/trunk/index.html Modified: ignite/site/trunk/events.html URL: http://svn.apache.org/viewvc/ignite/site/trunk/events.html?rev=1844702&r1=1844701&r2=1844702&view=diff == --- ignite/site/trunk/events.html (original) +++ ignite/site/trunk/events.html Tue Oct 23 21:07:02 2018 @@ -117,6 +117,69 @@ under the License. + +Distributed Database DevOps Dilemmas? Kubernetes to the rescue! + + +DevOps Exchange San Francisco, Speaker - Valentin Kulichenko +October 25, 2018 + +Distributed databases can make so many things easier for a developer, but not always for DevOps. +Kubernetes has come to the rescue with an easy application orchestration! It is straightforward to do the orchestration +leaning on relational databases as a data layer. However, it is more difficult to do the same when a distributed SQL database or +other kinds of distributed storage is used instead. In this presentation, attendees will learn how Kubernetes can orchestrate a distributed database. + + + +https://www.meetup.com/DevOps-Exchange-SanFrancisco/events/254969027"; target="_blank">Read more + + + + + +https://www.meetup.com/DevOps-Exchange-SanFrancisco/events/254969027"; + data-a2a-title="Distributed Database DevOps Dilemmas? Kubernetes to the rescue!"> + + + +https://www.addtoany.com/share";> + + + + + + +Powering up banks and financial institutions with distributed systems + + +NYC In-Memory Computing Meetup, Speaker - Akmal Chaudhri +October 25, 2018 + +In this talk, attendees will learn about the key capabilities and features of in-memory computing +platforms that are important for financial applications -- including ACID compliance, SQL compatibility, +persistence, replication, security, fault tolerance, fraud detection and more. + + + +https://www.meetup.com/NYC-In-Memory-Computing-Meetup/events/254701726/"; target="_blank">Read more + + + + + +https://www.meetup.com/NYC-In-Memory-Computing-Meetup/events/254701726/"; + data-a2a-title="Powering up banks and financial institutions with distributed systems"> + + + +https://www.addtoany.com/share";> + + + + + Best practices for stream ingestion, processing and analytics using in-memory computing Modified: ignite/site/trunk/index.html URL: http://svn.apache.org/viewvc/ignite/site/trunk/index.html?rev=1844702&r1=1844701&r2=1844702&view=diff == --- ignite/site/trunk/index.html (original) +++ ignite/site/trunk/index.html Tue Oct 23 21:07:02 2018 @@ -547,37 +547,36 @@ under the License. Upcoming Events -Oct 18 +Oct 24 -https://tmt.knect365.com/it-dev-connections/speakers/denis-magda-1#far-east-room_scale-out-and-conquer-architectural-decisions-behind-distributed-in-memory-systems"; target="_blank" class="event-link"> -Scale Out and Conquer: Architectural Decisions Behind Distributed In-Memory Systems -IT/Dev Connections, Dallas, Speaker - Denis Magda +https://www.meetup.com/futureofdata-newyork/events/25387
ignite git commit: IGNITE-9282: [ML] Add Naive Bayes classifier
Repository: ignite Updated Branches: refs/heads/master 86f543713 -> e29a8cb93 IGNITE-9282: [ML] Add Naive Bayes classifier this closes #4869 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e29a8cb9 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e29a8cb9 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e29a8cb9 Branch: refs/heads/master Commit: e29a8cb9380fb2c1f6815d40670315919af58d3b Parents: 86f5437 Author: dehasi Authored: Tue Oct 23 19:11:23 2018 +0300 Committer: Yury Babak Committed: Tue Oct 23 19:11:23 2018 +0300 -- .../GaussianNaiveBayesTrainerExample.java | 113 +++ .../examples/ml/naivebayes/package-info.java| 22 +++ .../ignite/examples/util/IrisDataset.java | 129 + .../gaussian/GaussianNaiveBayesModel.java | 111 +++ .../gaussian/GaussianNaiveBayesSumsHolder.java | 55 ++ .../gaussian/GaussianNaiveBayesTrainer.java | 186 +++ .../ml/naivebayes/gaussian/package-info.java| 22 +++ .../ignite/ml/naivebayes/package-info.java | 22 +++ .../gaussian/GaussianNaiveBayesModelTest.java | 50 + .../gaussian/GaussianNaiveBayesTest.java| 86 + .../gaussian/GaussianNaiveBayesTrainerTest.java | 182 ++ 11 files changed, 978 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/e29a8cb9/examples/src/main/java/org/apache/ignite/examples/ml/naivebayes/GaussianNaiveBayesTrainerExample.java -- diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/naivebayes/GaussianNaiveBayesTrainerExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/naivebayes/GaussianNaiveBayesTrainerExample.java new file mode 100644 index 000..cd8383e --- /dev/null +++ b/examples/src/main/java/org/apache/ignite/examples/ml/naivebayes/GaussianNaiveBayesTrainerExample.java @@ -0,0 +1,113 @@ +/* + * 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.examples.ml.naivebayes; + +import java.util.Arrays; +import javax.cache.Cache; +import org.apache.ignite.Ignite; +import org.apache.ignite.IgniteCache; +import org.apache.ignite.Ignition; +import org.apache.ignite.cache.query.QueryCursor; +import org.apache.ignite.cache.query.ScanQuery; +import org.apache.ignite.examples.ml.util.TestCache; +import org.apache.ignite.ml.math.primitives.vector.Vector; +import org.apache.ignite.ml.math.primitives.vector.VectorUtils; +import org.apache.ignite.ml.naivebayes.gaussian.GaussianNaiveBayesModel; +import org.apache.ignite.ml.naivebayes.gaussian.GaussianNaiveBayesTrainer; + +import static org.apache.ignite.examples.util.IrisDataset.irisDatasetFirstAndSecondClasses; + +/** + * Run naive Bayes classification model based on https://en.wikipedia.org/wiki/Naive_Bayes_classifier";> naive + * Bayes classifier algorithm ({@link GaussianNaiveBayesTrainer}) over distributed cache. + * + * Code in this example launches Ignite grid and fills the cache with test data points (based on the + * https://en.wikipedia.org/wiki/Iris_flower_data_set";>Iris dataset). + * + * After that it trains the naive Bayes classification model based on the specified data. + * + * Finally, this example loops over the test set of data points, applies the trained model to predict the target value, + * compares prediction to expected outcome (ground truth), and builds + * https://en.wikipedia.org/wiki/Confusion_matrix";>confusion matrix. + * + * You can change the test data used in this example and re-run it to explore this algorithm further. + */ +public class GaussianNaiveBayesTrainerExample { +/** Run example. */ +public static void main(String[] args) throws InterruptedException { +System.out.println(); +System.out.println(">>> Naive Bayes classification model over partitioned dataset usage example started."); +// Start ignite grid. +try (Ignite ignite = Ignition.start("examples/config/example-ig
[27/50] [abbrv] ignite git commit: IGNITE-9802 Fixed flaky TcpCommunicationSpiFaultyClientTest.testNotAcceptedConnection - Fixes #4931.
IGNITE-9802 Fixed flaky TcpCommunicationSpiFaultyClientTest.testNotAcceptedConnection - Fixes #4931. Signed-off-by: Alexey Goncharuk Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3a4167a6 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3a4167a6 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3a4167a6 Branch: refs/heads/ignite-gg-14206 Commit: 3a4167a67e4fc318e2a7ef19500ca6da5910eaac Parents: 5fa5c54 Author: NSAmelchev Authored: Mon Oct 22 14:45:38 2018 +0300 Committer: Alexey Goncharuk Committed: Mon Oct 22 14:45:38 2018 +0300 -- .../TcpCommunicationSpiFaultyClientTest.java| 37 +++- 1 file changed, 29 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/3a4167a6/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiFaultyClientTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiFaultyClientTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiFaultyClientTest.java index 00b1d90..505d7a5 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiFaultyClientTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiFaultyClientTest.java @@ -23,6 +23,8 @@ import java.net.ServerSocket; import java.util.Collections; import java.util.HashMap; import java.util.Map; +import java.util.UUID; +import java.util.concurrent.ConcurrentMap; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import org.apache.ignite.IgniteCheckedException; @@ -38,6 +40,7 @@ import org.apache.ignite.internal.util.nio.GridCommunicationClient; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.lang.IgniteRunnable; +import org.apache.ignite.spi.communication.CommunicationSpi; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryNode; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; @@ -79,7 +82,7 @@ public class TcpCommunicationSpiFaultyClientTest extends GridCommonAbstractTest spi.setIdleConnectionTimeout(100); spi.setSharedMemoryPort(-1); -TcpDiscoverySpi discoSpi = (TcpDiscoverySpi) cfg.getDiscoverySpi(); +TcpDiscoverySpi discoSpi = (TcpDiscoverySpi)cfg.getDiscoverySpi(); discoSpi.setIpFinder(IP_FINDER); discoSpi.setClientReconnectDisabled(true); @@ -94,11 +97,11 @@ public class TcpCommunicationSpiFaultyClientTest extends GridCommonAbstractTest @Override protected void beforeTestsStarted() throws Exception { super.beforeTestsStarted(); - System.setProperty(IgniteSystemProperties.IGNITE_ENABLE_FORCIBLE_NODE_KILL,"true"); + System.setProperty(IgniteSystemProperties.IGNITE_ENABLE_FORCIBLE_NODE_KILL, "true"); } /** {@inheritDoc} */ -@Override protected void afterTestsStopped() throws Exception { +@Override protected void afterTestsStopped() { System.clearProperty(IgniteSystemProperties.IGNITE_ENABLE_FORCIBLE_NODE_KILL); } @@ -150,12 +153,30 @@ public class TcpCommunicationSpiFaultyClientTest extends GridCommonAbstractTest startGrid(2); startGrid(3); -U.sleep(1000); // Wait for write timeout and closing idle connections. +// Need to wait for PME to avoid opening new connections during closing idle connections. +awaitPartitionMapExchange(); + +CommunicationSpi commSpi = grid(0).configuration().getCommunicationSpi(); + +ConcurrentMap clients = U.field(commSpi, "clients"); + +// Wait for write timeout and closing idle connections. +assertTrue("Failed to wait for closing idle connections.", +GridTestUtils.waitForCondition(() -> { +for (GridCommunicationClient[] clients0 : clients.values()) { +for (GridCommunicationClient client : clients0) { +if (client != null) +return false; +} +} + +return true; +}, 1000)); final CountDownLatch latch = new CountDownLatch(1); grid(0).events().localListen(new IgnitePredicate() { -@Override public boolean apply(Event event) { +@Override public boolean apply(Event evt) { latch.countDown();
[46/50] [abbrv] ignite git commit: IGNITE-9663: MVCC: Fixes to transaction mapping. This closes #5018.
IGNITE-9663: MVCC: Fixes to transaction mapping. This closes #5018. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d76ff542 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d76ff542 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d76ff542 Branch: refs/heads/ignite-gg-14206 Commit: d76ff54264498f49f070d0ff5e6d7d67f29d93ba Parents: 685c008 Author: rkondakov Authored: Tue Oct 23 14:59:12 2018 +0300 Committer: devozerov Committed: Tue Oct 23 14:59:12 2018 +0300 -- .../near/GridNearTxEnlistFuture.java| 4 +- .../near/GridNearTxQueryEnlistFuture.java | 3 +- .../GridNearTxQueryResultsEnlistFuture.java | 4 +- .../cache/mvcc/MvccProcessorImpl.java | 9 ++- .../cache/mvcc/MvccQueryTrackerImpl.java| 16 - .../cache/mvcc/msg/MvccSnapshotResponse.java| 4 ++ .../cache/mvcc/CacheMvccAbstractTest.java | 67 +++- .../query/h2/database/H2TreeFilterClosure.java | 19 +- .../query/h2/database/H2TreeIndex.java | 2 +- .../h2/twostep/GridReduceQueryExecutor.java | 5 +- ...ccPartitionedSqlCoordinatorFailoverTest.java | 9 +++ 11 files changed, 121 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/d76ff542/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java index ed75c36..3ddedd0 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java @@ -575,9 +575,7 @@ public class GridNearTxEnlistFuture extends GridNearTxAbstractEnlistFuturehttp://git-wip-us.apache.org/repos/asf/ignite/blob/d76ff542/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java index 8528345..70fbd1f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java @@ -363,8 +363,7 @@ public class GridNearTxQueryEnlistFuture extends GridNearTxQueryAbstractEnlistFu completed = true; } -if (X.hasCause(err, ClusterTopologyCheckedException.class) -|| (res != null && res.removeMapping())) { +if (res != null && res.removeMapping()) { GridDistributedTxMapping m = tx.mappings().get(node.id()); assert m != null && m.empty(); http://git-wip-us.apache.org/repos/asf/ignite/blob/d76ff542/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java index f375405..9783582 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java @@ -552,9 +552,7 @@ public class GridNearTxQueryResultsEnlistFuture extends GridNearTxQueryAbstractE if (err == null && res.error() != null) err = res.error(); -if (X.hasCause(err, ClusterTopologyCheckedException.class)) -tx.removeMapping(nodeId); -else if (res != null) +if (res != null) tx.mappings().get(nodeId).addBackups(res.newDhtNodes()); if (err != null) http://git-wip-us.apache.org/repos/asf/ignite/blob/d76ff542/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java -
[45/50] [abbrv] ignite git commit: IGNITE-9951 PHP: Fixes for Date data type
IGNITE-9951 PHP: Fixes for Date data type This closes #5043 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/685c008a Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/685c008a Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/685c008a Branch: refs/heads/ignite-gg-14206 Commit: 685c008af3c5c07f02e7d311fdf0c39f6e3941e0 Parents: 3f7109f Author: Pavel Petroshenko Authored: Tue Oct 23 13:35:37 2018 +0300 Committer: Igor Sapego Committed: Tue Oct 23 13:35:37 2018 +0300 -- modules/platforms/php/src/Apache/Ignite/Data/Date.php | 9 - modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php | 4 +++- 2 files changed, 7 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/685c008a/modules/platforms/php/src/Apache/Ignite/Data/Date.php -- diff --git a/modules/platforms/php/src/Apache/Ignite/Data/Date.php b/modules/platforms/php/src/Apache/Ignite/Data/Date.php index 356cc36..fa5f394 100644 --- a/modules/platforms/php/src/Apache/Ignite/Data/Date.php +++ b/modules/platforms/php/src/Apache/Ignite/Data/Date.php @@ -47,7 +47,8 @@ class Date */ public static function fromDateTime(DateTime $dateTime) { -return new Date($dateTime->getTimestamp() * 1000); +$millis = intval($dateTime->format('u') / 1000); +return new Date($dateTime->getTimestamp() * 1000 + $millis); } /** @@ -57,11 +58,9 @@ class Date */ public function toDateTime(): DateTime { -$dateTime = new DateTime(); -$dateTime->setTimestamp($this->getSeconds()); -return $dateTime; +return DateTime::createFromFormat('U.u', number_format($this->getMillis() / 1000, 6, '.', '')); } - + /** * Returns the date value as number of milliseconds elapsed since January 1, 1970, 00:00:00 UTC. * http://git-wip-us.apache.org/repos/asf/ignite/blob/685c008a/modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php -- diff --git a/modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php b/modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php index 39ef984..a404d46 100644 --- a/modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php +++ b/modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php @@ -49,7 +49,9 @@ class Timestamp extends Date */ public static function fromDateTime(DateTime $dateTime) { -return new Timestamp($dateTime->getTimestamp() * 1000, 0); +$micros = $dateTime->format('u'); +$millis = intval($micros / 1000); +return new Timestamp($dateTime->getTimestamp() * 1000 + $millis, ($micros % 1000) * 1000); } /**
[33/50] [abbrv] ignite git commit: IGNITE-8006 Parallelize cache groups start - Fixes #4752.
IGNITE-8006 Parallelize cache groups start - Fixes #4752. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e1f8f46f Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e1f8f46f Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e1f8f46f Branch: refs/heads/ignite-gg-14206 Commit: e1f8f46f90868d377bc764b74d07812150218c71 Parents: e5a4672 Author: Anton Kalashnikov Authored: Mon Oct 22 16:27:49 2018 +0300 Committer: Alexey Goncharuk Committed: Mon Oct 22 16:27:49 2018 +0300 -- .../apache/ignite/IgniteSystemProperties.java | 7 + .../cache/CacheAffinitySharedManager.java | 115 ++-- .../processors/cache/GridCacheIoManager.java| 22 +- .../GridCachePartitionExchangeManager.java | 4 +- .../processors/cache/GridCacheProcessor.java| 523 ++- .../processors/cache/StartCacheInfo.java| 113 .../GridDhtPartitionsExchangeFuture.java| 78 ++- .../ignite/internal/util/IgniteUtils.java | 104 ++-- .../internal/util/InitializationProtector.java | 79 +++ .../util/lang/IgniteThrowableConsumer.java | 37 ++ .../util/lang/IgniteThrowableRunner.java| 30 ++ .../distributed/CacheStartInParallelTest.java | 219 .../IgniteCrossCacheTxStoreSelfTest.java| 44 +- .../internal/util/IgniteUtilsSelfTest.java | 74 +++ .../testsuites/IgniteCacheTestSuite7.java | 3 + 15 files changed, 1165 insertions(+), 287 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/e1f8f46f/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java index 521222c..6afe244 100644 --- a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java +++ b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java @@ -1030,6 +1030,13 @@ public final class IgniteSystemProperties { public static final String IGNITE_REBALANCE_THROTTLE_OVERRIDE = "IGNITE_REBALANCE_THROTTLE_OVERRIDE"; /** + * Enables start caches in parallel. + * + * Default is {@code true}. + */ +public static final String IGNITE_ALLOW_START_CACHES_IN_PARALLEL = "IGNITE_ALLOW_START_CACHES_IN_PARALLEL"; + +/** * Enforces singleton. */ private IgniteSystemProperties() { http://git-wip-us.apache.org/repos/asf/ignite/blob/e1f8f46f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java index cedbde1..6e10c00 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java @@ -17,12 +17,14 @@ package org.apache.ignite.internal.processors.cache; +import javax.cache.CacheException; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; @@ -30,7 +32,6 @@ import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.stream.Collectors; -import javax.cache.CacheException; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteException; import org.apache.ignite.IgniteSystemProperties; @@ -427,25 +428,43 @@ public class CacheAffinitySharedManager extends GridCacheSharedManagerAdap Map fetchFuts = U.newHashMap(startDescs.size()); -Set startedCaches = U.newHashSet(startDescs.size()); - Map startedInfos = U.newHashMap(startDescs.size()); -for (DynamicCacheDescriptor desc : startDescs) { -try { -startedCaches.add(desc.cacheName()); +List startCacheInfos = startDescs.stream() +.map(desc -> { +DynamicCacheChangeRequest changeReq = startReqs.get(desc.cacheName()); -DynamicCacheChangeRequest startReq = startReqs.get(desc.cacheName()); - -cctx.cache().prepareCacheStart( -desc.cacheConfiguration(), +return new StartCacheInfo( desc, -
[50/50] [abbrv] ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-gg-14206
Merge remote-tracking branch 'remotes/origin/master' into ignite-gg-14206 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1e91d477 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1e91d477 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1e91d477 Branch: refs/heads/ignite-gg-14206 Commit: 1e91d477f8db279232a43ee66ffc17c23b0193d2 Parents: 1a7a9c7 86f5437 Author: sboikov Authored: Tue Oct 23 18:00:11 2018 +0300 Committer: sboikov Committed: Tue Oct 23 18:00:11 2018 +0300 -- DEVNOTES.txt| 14 +- README.txt |4 +- RELEASE_NOTES.txt | 76 +- assembly/release-apache-ignite-base.xml | 71 + bin/control.bat |6 +- bin/ignite-tf.sh| 183 ++ bin/ignite.bat | 54 +- bin/ignite.sh | 37 +- bin/ignitevisorcmd.bat |6 +- bin/include/functions.sh|9 +- config/apache-ignite-lgpl/default-config.xml| 29 + config/apache-ignite/default-config.xml | 29 + config/fabric-lgpl/default-config.xml | 29 - config/fabric/default-config.xml| 29 - doap_Ignite.rdf |4 +- .../encryption/example-encrypted-store.xml | 69 + examples/config/encryption/example_keystore.jks | Bin 0 -> 347 bytes .../encryption/EncryptedCacheExample.java | 106 + .../examples/EncryptedCacheExampleSelfTest.java | 36 + .../testsuites/IgniteExamplesSelfTestSuite.java |4 + .../spi/checkpoint/s3/S3CheckpointSpi.java |8 +- modules/benchmarks/pom.xml | 12 +- .../benchmarks/jmh/algo/BenchmarkCRC.java | 95 + .../JmhKeystoreEncryptionSpiBenchmark.java | 117 + ...ridDhtPartitionsStateValidatorBenchmark.java | 185 ++ .../jmh/notify/JmhWaitStategyBenchmark.java |4 +- .../jdbc2/JdbcDynamicIndexAbstractSelfTest.java |8 +- .../jdbc/JdbcVersionMismatchSelfTest.java | 171 ++ .../suite/IgniteJdbcDriverMvccTestSuite.java|4 +- .../jdbc/suite/IgniteJdbcDriverTestSuite.java |2 + .../JdbcThinConnectionMvccEnabledSelfTest.java |8 +- .../JdbcThinMetadataPrimaryKeysSelfTest.java| 152 ++ .../jdbc/thin/JdbcThinMetadataSelfTest.java |2 +- ...ThinTransactionsAbstractComplexSelfTest.java |8 +- .../jdbc/thin/JdbcThinTransactionsSelfTest.java |4 +- ...ThinTransactionsWithMvccEnabledSelfTest.java | 15 +- .../cloud/TcpDiscoveryCloudIpFinder.java|2 +- .../ignite/codegen/MessageCodeGenerator.java|7 +- .../src/main/java/org/apache/ignite/Ignite.java |3 - .../apache/ignite/IgniteSystemProperties.java | 35 +- .../configuration/CacheConfiguration.java | 37 +- .../configuration/DataStorageConfiguration.java | 27 + .../configuration/IgniteConfiguration.java | 56 + .../apache/ignite/internal/GridComponent.java |9 +- .../ignite/internal/GridKernalContext.java |8 + .../ignite/internal/GridKernalContextImpl.java | 12 + .../org/apache/ignite/internal/GridTopic.java |5 +- .../internal/IgniteDiagnosticMessage.java |8 +- .../IgniteDiagnosticPrepareContext.java |2 +- .../apache/ignite/internal/IgniteKernal.java| 107 +- .../ignite/internal/IgniteNodeAttributes.java |3 + .../org/apache/ignite/internal/IgnitionEx.java | 10 +- .../internal/binary/BinaryFieldAccessor.java|5 +- .../internal/binary/BinaryReaderExImpl.java |1 - .../internal/binary/BinaryReaderHandles.java|2 +- .../internal/binary/BinarySchemaRegistry.java | 114 +- .../ignite/internal/binary/BinaryUtils.java | 28 +- .../commandline/cache/CacheArguments.java |2 +- .../internal/dto/IgniteDataTransferObject.java | 130 + .../dto/IgniteDataTransferObjectInput.java | 156 ++ .../dto/IgniteDataTransferObjectOutput.java | 141 + .../internal/jdbc/thin/JdbcThinConnection.java |4 +- .../internal/jdbc/thin/JdbcThinSSLUtil.java |2 +- .../communication/GridIoMessageFactory.java | 40 +- .../discovery/GridDiscoveryManager.java | 57 +- .../GenerateEncryptionKeyRequest.java | 142 + .../GenerateEncryptionKeyResponse.java | 148 ++ .../encryption/GridEncryptionManager.java | 864 ++ .../ignite/internal/pagemem/PageMemory.java |6 + .../pagemem/impl/PageMemoryNoStoreImpl.java |5 + .../internal/pagemem/store/PageStore.java | 27 + .../pagemem/wal/IgniteWriteAheadLogManager.java | 19 +- .../pagemem/wal/record/EncryptedRecord.java | 60 + .../pagemem/wal/record/PageSnapshot.java| 19 +- ..
[42/50] [abbrv] ignite git commit: IGNITE-9719 Extra rebalanceThreadPoolSize check on client node - Fixes #4911.
IGNITE-9719 Extra rebalanceThreadPoolSize check on client node - Fixes #4911. Signed-off-by: Ivan Rakov Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/962d6a29 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/962d6a29 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/962d6a29 Branch: refs/heads/ignite-gg-14206 Commit: 962d6a29716195c13519ca48b6d79f3b8541653c Parents: d4af213 Author: luchnikovnsk Authored: Tue Oct 23 11:16:40 2018 +0300 Committer: Ivan Rakov Committed: Tue Oct 23 11:16:40 2018 +0300 -- .../apache/ignite/internal/IgniteKernal.java| 32 +-- .../ignite/client/ClientConfigurationTest.java | 42 2 files changed, 61 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/962d6a29/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 40347d7..1546da3 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 @@ -2581,19 +2581,25 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { * */ private void ackRebalanceConfiguration() throws IgniteCheckedException { -if (cfg.getSystemThreadPoolSize() <= cfg.getRebalanceThreadPoolSize()) -throw new IgniteCheckedException("Rebalance thread pool size exceed or equals System thread pool size. " + -"Change IgniteConfiguration.rebalanceThreadPoolSize property before next start."); - -if (cfg.getRebalanceThreadPoolSize() < 1) -throw new IgniteCheckedException("Rebalance thread pool size minimal allowed value is 1. " + -"Change IgniteConfiguration.rebalanceThreadPoolSize property before next start."); - -for (CacheConfiguration ccfg : cfg.getCacheConfiguration()) { -if (ccfg.getRebalanceBatchesPrefetchCount() < 1) -throw new IgniteCheckedException("Rebalance batches prefetch count minimal allowed value is 1. " + -"Change CacheConfiguration.rebalanceBatchesPrefetchCount property before next start. " + -"[cache=" + ccfg.getName() + "]"); +if (cfg.isClientMode()) { +if (cfg.getRebalanceThreadPoolSize() != IgniteConfiguration.DFLT_REBALANCE_THREAD_POOL_SIZE) +U.warn(log, "Setting the rebalance pool size has no effect on the client mode"); +} +else { +if (cfg.getSystemThreadPoolSize() <= cfg.getRebalanceThreadPoolSize()) +throw new IgniteCheckedException("Rebalance thread pool size exceed or equals System thread pool size. " + +"Change IgniteConfiguration.rebalanceThreadPoolSize property before next start."); + +if (cfg.getRebalanceThreadPoolSize() < 1) +throw new IgniteCheckedException("Rebalance thread pool size minimal allowed value is 1. " + +"Change IgniteConfiguration.rebalanceThreadPoolSize property before next start."); + +for (CacheConfiguration ccfg : cfg.getCacheConfiguration()) { +if (ccfg.getRebalanceBatchesPrefetchCount() < 1) +throw new IgniteCheckedException("Rebalance batches prefetch count minimal allowed value is 1. " + +"Change CacheConfiguration.rebalanceBatchesPrefetchCount property before next start. " + +"[cache=" + ccfg.getName() + "]"); +} } } http://git-wip-us.apache.org/repos/asf/ignite/blob/962d6a29/modules/core/src/test/java/org/apache/ignite/client/ClientConfigurationTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/client/ClientConfigurationTest.java b/modules/core/src/test/java/org/apache/ignite/client/ClientConfigurationTest.java index bcc212a..287c6ec 100644 --- a/modules/core/src/test/java/org/apache/ignite/client/ClientConfigurationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/client/ClientConfigurationTest.java @@ -25,9 +25,19 @@ import java.io.ObjectInputStream; import java.io.ObjectOutput; import java.io.ObjectOutputStream; import java.util.Collections; +import java.util.Set; +import java.util.function.Predicate; +import java.util.stream.Collectors; + +import org.apache.ignite.Ignite; +import org.apache.ignite.Ignition; +import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.confi
[49/50] [abbrv] ignite git commit: Revert "IGNITE-5795 Register binary metadata during cache start - Fixes #4852."
Revert "IGNITE-5795 Register binary metadata during cache start - Fixes #4852." This reverts commit 3bb03444246f863096063d084393676a84d2bc0e. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/86f54371 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/86f54371 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/86f54371 Branch: refs/heads/ignite-gg-14206 Commit: 86f543713b148541a6d497c4ab6404e7e7edf815 Parents: 324e6e3 Author: Alexey Goncharuk Authored: Tue Oct 23 17:54:24 2018 +0300 Committer: Alexey Goncharuk Committed: Tue Oct 23 17:54:24 2018 +0300 -- .../apache/ignite/internal/IgniteKernal.java| 2 +- .../binary/BinaryCachingMetadataHandler.java| 25 +- .../ignite/internal/binary/BinaryContext.java | 59 +--- .../internal/binary/BinaryMetadataHandler.java | 10 - .../binary/BinaryNoopMetadataHandler.java | 6 - .../binary/builder/BinaryObjectBuilderImpl.java | 2 +- .../internal/client/thin/TcpIgniteClient.java | 6 - .../processors/cache/GridCacheProcessor.java| 9 +- .../binary/CacheObjectBinaryProcessorImpl.java | 5 - .../processors/query/GridQueryProcessor.java| 77 + .../binary/TestCachingMetadataHandler.java | 6 - .../cache/CacheRegisterMetadataLocallyTest.java | 287 --- .../cache/index/AbstractSchemaSelfTest.java | 6 +- .../index/H2DynamicIndexAbstractSelfTest.java | 48 ++-- .../IgniteCacheWithIndexingTestSuite.java | 2 - 15 files changed, 56 insertions(+), 494 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/86f54371/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 1546da3..1f9a5e8 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 @@ -1005,7 +1005,6 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { // Start processors before discovery manager, so they will // be able to start receiving messages once discovery completes. try { -startProcessor(new GridMarshallerMappingProcessor(ctx)); startProcessor(new PdsConsistentIdProcessor(ctx)); startProcessor(new MvccProcessorImpl(ctx)); startProcessor(createComponent(DiscoveryNodeValidationProcessor.class, ctx)); @@ -1029,6 +1028,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { startProcessor(createHadoopComponent()); startProcessor(new DataStructuresProcessor(ctx)); startProcessor(createComponent(PlatformProcessor.class, ctx)); +startProcessor(new GridMarshallerMappingProcessor(ctx)); // Start plugins. for (PluginProvider provider : ctx.plugins().allProviders()) { http://git-wip-us.apache.org/repos/asf/ignite/blob/86f54371/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryCachingMetadataHandler.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryCachingMetadataHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryCachingMetadataHandler.java index b60dc097..a0559cb 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryCachingMetadataHandler.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryCachingMetadataHandler.java @@ -46,29 +46,24 @@ public class BinaryCachingMetadataHandler implements BinaryMetadataHandler { } /** {@inheritDoc} */ -@Override public synchronized void addMeta(int typeId, BinaryType type, -boolean failIfUnregistered) throws BinaryObjectException { -BinaryType oldType = metas.put(typeId, type); +@Override public synchronized void addMeta(int typeId, BinaryType type, boolean failIfUnregistered) throws BinaryObjectException { +synchronized (this) { +BinaryType oldType = metas.put(typeId, type); -if (oldType != null) { -BinaryMetadata oldMeta = ((BinaryTypeImpl)oldType).metadata(); -BinaryMetadata newMeta = ((BinaryTypeImpl)type).metadata(); +if (oldType != null) { +BinaryMetadata oldMeta = ((BinaryTypeImpl)oldType).metadata(); +BinaryMetadata newMeta = ((BinaryTypeImpl)type).metadata(); -BinaryMetadata mergedMeta =
[19/50] [abbrv] ignite git commit: IGNITE-9776 Fixed infinite block in FsyncModeFileWriteAheadLogManager log() call - Fixes #4953.
IGNITE-9776 Fixed infinite block in FsyncModeFileWriteAheadLogManager log() call - Fixes #4953. Signed-off-by: Alexey Goncharuk Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/7deec60a Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/7deec60a Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/7deec60a Branch: refs/heads/ignite-gg-14206 Commit: 7deec60a8727d86fe153962979c3c9f4d67d8e09 Parents: 5427c09 Author: Alexey Stelmak Authored: Fri Oct 19 12:11:32 2018 +0300 Committer: Alexey Goncharuk Committed: Fri Oct 19 12:15:48 2018 +0300 -- .../wal/FsyncModeFileWriteAheadLogManager.java | 27 -- .../wal/FsyncWalRolloverDoesNotBlockTest.java | 89 .../db/wal/WalRolloverTypesTest.java| 8 -- .../ignite/testsuites/IgnitePdsTestSuite2.java | 3 + .../testsuites/IgnitePdsNativeIoTestSuite2.java | 1 + 5 files changed, 112 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/7deec60a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FsyncModeFileWriteAheadLogManager.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FsyncModeFileWriteAheadLogManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FsyncModeFileWriteAheadLogManager.java index 917640d..0ede897 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FsyncModeFileWriteAheadLogManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FsyncModeFileWriteAheadLogManager.java @@ -419,9 +419,9 @@ public class FsyncModeFileWriteAheadLogManager extends GridCacheSharedManagerAda lastTruncatedArchiveIdx = tup == null ? -1 : tup.get1() - 1; -archiver = new FileArchiver(tup == null ? -1 : tup.get2(), log); +archiver = isArchiverEnabled() ? new FileArchiver(tup == null ? -1 : tup.get2(), log) : null; -if (dsCfg.isWalCompactionEnabled()) { +if (archiver != null && dsCfg.isWalCompactionEnabled()) { compressor = new FileCompressor(); if (decompressor == null) { // Preventing of two file-decompressor thread instantiations. @@ -619,7 +619,7 @@ public class FsyncModeFileWriteAheadLogManager extends GridCacheSharedManagerAda public Collection getAndReserveWalFiles(FileWALPointer low, FileWALPointer high) throws IgniteCheckedException { final long awaitIdx = high.index() - 1; -while (archiver.lastArchivedAbsoluteIndex() < awaitIdx) +while (archiver != null && archiver.lastArchivedAbsoluteIndex() < awaitIdx) LockSupport.parkNanos(Thread.currentThread(), 1_000_000); if (!reserve(low)) @@ -918,6 +918,9 @@ public class FsyncModeFileWriteAheadLogManager extends GridCacheSharedManagerAda /** {@inheritDoc} */ @Override public int walArchiveSegments() { +if (archiver == null) +return 0; + long lastTruncated = lastTruncatedArchiveIdx; long lastArchived = archiver.lastArchivedAbsoluteIndex(); @@ -966,7 +969,7 @@ public class FsyncModeFileWriteAheadLogManager extends GridCacheSharedManagerAda /** {@inheritDoc} */ @Override public long lastArchivedSegment() { -return archiver.lastArchivedAbsoluteIndex(); +return archiver != null ? archiver.lastArchivedAbsoluteIndex() : -1L; } /** {@inheritDoc} */ @@ -1235,7 +1238,8 @@ public class FsyncModeFileWriteAheadLogManager extends GridCacheSharedManagerAda if (lastReadPtr == null) hnd.writeSerializerVersion(); -archiver.currentWalIndex(absIdx); +if (archiver != null) +archiver.currentWalIndex(absIdx); return hnd; } @@ -1411,8 +1415,13 @@ public class FsyncModeFileWriteAheadLogManager extends GridCacheSharedManagerAda * @throws IgniteInterruptedCheckedException If interrupted. */ private File pollNextFile(long curIdx) throws StorageException, IgniteInterruptedCheckedException { +FileArchiver archiver0 = archiver; + +if (archiver0 == null) +return new File(walWorkDir, FileDescriptor.fileName(curIdx + 1)); + // Signal to archiver that we are done with the segment and it can be archived. -long absNextIdx = archiver.nextAbsoluteSegmentIndex(curIdx); +long absNextIdx = archiver0.nextAbsoluteSegmentIndex(curIdx); long segmentIdx = absNextIdx % dsCfg.getWalSegments(); @@ -1724,8 +1733,10 @
[32/50] [abbrv] ignite git commit: IGNITE-9945 Entry start version should not omit datacenter ID.
IGNITE-9945 Entry start version should not omit datacenter ID. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e5a46727 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e5a46727 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e5a46727 Branch: refs/heads/ignite-gg-14206 Commit: e5a467272f88e5561a4cc30b510a5608a3b5e739 Parents: 4353618 Author: Alexey Goncharuk Authored: Mon Oct 22 16:10:47 2018 +0300 Committer: Alexey Goncharuk Committed: Mon Oct 22 16:10:47 2018 +0300 -- .../dht/preloader/GridDhtPartitionsExchangeFuture.java| 2 +- .../ignite/internal/processors/cache/dr/GridCacheDrManager.java | 3 ++- .../ignite/internal/processors/cache/dr/GridOsCacheDrManager.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/e5a46727/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java index 4b4b6df..d494857 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java @@ -2105,7 +2105,7 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte if (drCacheCtx.isDrEnabled()) { try { -drCacheCtx.dr().onExchange(res, exchId.isLeft()); +drCacheCtx.dr().onExchange(res, exchId.isLeft(), activateCluster()); } catch (IgniteCheckedException e) { U.error(log, "Failed to notify DR: " + e, e); http://git-wip-us.apache.org/repos/asf/ignite/blob/e5a46727/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridCacheDrManager.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridCacheDrManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridCacheDrManager.java index f2a4b30..33a52a1 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridCacheDrManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridCacheDrManager.java @@ -60,9 +60,10 @@ public interface GridCacheDrManager extends GridCacheManager { * * @param topVer Topology version. * @param left {@code True} if exchange has been caused by node leave. + * @param activate {@code True} if exchange has been caused by cluster activation. * @throws IgniteCheckedException If failed. */ -public void onExchange(AffinityTopologyVersion topVer, boolean left) throws IgniteCheckedException; +public void onExchange(AffinityTopologyVersion topVer, boolean left, boolean activate) throws IgniteCheckedException; /** * @return {@code True} is DR is enabled. http://git-wip-us.apache.org/repos/asf/ignite/blob/e5a46727/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridOsCacheDrManager.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridOsCacheDrManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridOsCacheDrManager.java index f3c1b23..425e79c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridOsCacheDrManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridOsCacheDrManager.java @@ -78,7 +78,7 @@ public class GridOsCacheDrManager implements GridCacheDrManager { } /** {@inheritDoc} */ -@Override public void onExchange(AffinityTopologyVersion topVer, boolean left) throws IgniteCheckedException { +@Override public void onExchange(AffinityTopologyVersion topVer, boolean left, boolean activate) throws IgniteCheckedException { // No-op. }
[38/50] [abbrv] ignite git commit: IGNITE-9960: SQL: Reverted IGNITE-9171 and IGNITE-9864 until performance is fixed. This closes #5045.
http://git-wip-us.apache.org/repos/asf/ignite/blob/75e414a4/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java -- diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java index 9b7d268..f228111 100644 --- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java +++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java @@ -40,6 +40,7 @@ import javax.cache.CacheException; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteException; import org.apache.ignite.IgniteLogger; +import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.cache.PartitionLossPolicy; import org.apache.ignite.cache.query.QueryCancelledException; import org.apache.ignite.cache.query.SqlFieldsQuery; @@ -57,12 +58,12 @@ import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.cache.CacheInvalidStateException; import org.apache.ignite.internal.processors.cache.GridCacheContext; import org.apache.ignite.internal.processors.cache.distributed.dht.CompoundLockFuture; -import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactionalCacheAdapter; -import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxLocalAdapter; -import org.apache.ignite.internal.processors.cache.distributed.dht.GridReservable; import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition; import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState; import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionsReservation; +import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactionalCacheAdapter; +import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxLocalAdapter; +import org.apache.ignite.internal.processors.cache.distributed.dht.GridReservable; import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot; import org.apache.ignite.internal.processors.cache.mvcc.MvccUtils; import org.apache.ignite.internal.processors.cache.query.CacheQueryType; @@ -70,10 +71,8 @@ import org.apache.ignite.internal.processors.cache.query.GridCacheQueryMarshalla import org.apache.ignite.internal.processors.cache.query.GridCacheSqlQuery; import org.apache.ignite.internal.processors.query.GridQueryCancel; import org.apache.ignite.internal.processors.query.IgniteSQLException; -import org.apache.ignite.internal.processors.query.h2.H2ConnectionWrapper; import org.apache.ignite.internal.processors.query.h2.H2Utils; import org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing; -import org.apache.ignite.internal.processors.query.h2.ObjectPoolReusable; import org.apache.ignite.internal.processors.query.h2.ResultSetEnlistFuture; import org.apache.ignite.internal.processors.query.h2.UpdateResult; import org.apache.ignite.internal.processors.query.h2.opt.DistributedJoinMode; @@ -98,13 +97,13 @@ import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.lang.IgniteUuid; import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.spi.indexing.IndexingQueryFilter; -import org.h2.api.ErrorCode; +import org.apache.ignite.thread.IgniteThread; import org.h2.command.Prepared; import org.h2.jdbc.JdbcResultSet; -import org.h2.jdbc.JdbcSQLException; import org.h2.value.Value; import org.jetbrains.annotations.Nullable; +import static org.apache.ignite.IgniteSystemProperties.IGNITE_SQL_FORCE_LAZY_RESULT_SET; import static org.apache.ignite.cache.PartitionLossPolicy.READ_ONLY_SAFE; import static org.apache.ignite.cache.PartitionLossPolicy.READ_WRITE_SAFE; import static org.apache.ignite.events.EventType.EVT_CACHE_QUERY_EXECUTED; @@ -124,6 +123,9 @@ import static org.apache.ignite.internal.processors.query.h2.twostep.msg.GridH2V @SuppressWarnings("ForLoopReplaceableByForEach") public class GridMapQueryExecutor { /** */ +public static final boolean FORCE_LAZY = IgniteSystemProperties.getBoolean(IGNITE_SQL_FORCE_LAZY_RESULT_SET); + +/** */ private IgniteLogger log; /** */ @@ -147,8 +149,8 @@ public class GridMapQueryExecutor { /** Busy lock for lazy workers. */ private final GridSpinBusyLock lazyWorkerBusyLock = new GridSpinBusyLock(); -/** Stop guard. */ -private final AtomicBoolean stopGuard = new AtomicBoolean(); +/** Lazy worker stop guard. */ +private final AtomicBoolean lazyWorkerStopGuard = new AtomicBoolean(); /**
[08/50] [abbrv] ignite git commit: IGNITE-9868 Improved background full message sending - Fixes #4975.
IGNITE-9868 Improved background full message sending - Fixes #4975. Signed-off-by: Alexey Goncharuk Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ce73c9d8 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ce73c9d8 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ce73c9d8 Branch: refs/heads/ignite-gg-14206 Commit: ce73c9d85ffd5b50e4c3370b13302605392fa572 Parents: aec3f91 Author: Sergey Antonov Authored: Wed Oct 17 20:08:34 2018 +0300 Committer: Alexey Goncharuk Committed: Wed Oct 17 20:18:36 2018 +0300 -- .../GridCachePartitionExchangeManager.java | 177 ++- .../GridDhtPartitionsExchangeFuture.java| 12 +- 2 files changed, 135 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/ce73c9d8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java index 0baf5a3..6af9678 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java @@ -1028,11 +1028,13 @@ public class GridCachePartitionExchangeManager extends GridCacheSharedMana } /** - * Partition refresh callback. + * Partition refresh callback for selected cache groups. * For coordinator causes {@link GridDhtPartitionsFullMessage FullMessages} send, * for non coordinator - {@link GridDhtPartitionsSingleMessage SingleMessages} send + * + * @param grps Cache groups for partitions refresh. */ -public void refreshPartitions() { +public void refreshPartitions(@NotNull Collection grps) { // TODO https://issues.apache.org/jira/browse/IGNITE-6857 if (cctx.snapshot().snapshotOperationInProgress()) { scheduleResendPartitions(); @@ -1040,6 +1042,13 @@ public class GridCachePartitionExchangeManager extends GridCacheSharedMana return; } +if (grps.isEmpty()) { +if (log.isDebugEnabled()) +log.debug("Skip partitions refresh, there are no cache groups for partition refresh."); + +return; +} + ClusterNode oldest = cctx.discovery().oldestAliveServerNode(AffinityTopologyVersion.NONE); if (oldest == null) { @@ -1049,8 +1058,10 @@ public class GridCachePartitionExchangeManager extends GridCacheSharedMana return; } -if (log.isDebugEnabled()) -log.debug("Refreshing partitions [oldest=" + oldest.id() + ", loc=" + cctx.localNodeId() + ']'); +if (log.isDebugEnabled()) { +log.debug("Refreshing partitions [oldest=" + oldest.id() + ", loc=" + cctx.localNodeId() + +", cacheGroups= " + grps + ']'); +} // If this is the oldest node. if (oldest.id().equals(cctx.localNodeId())) { @@ -1068,50 +1079,66 @@ public class GridCachePartitionExchangeManager extends GridCacheSharedMana // No need to send to nodes which did not finish their first exchange. AffinityTopologyVersion rmtTopVer = -lastFut != null ? (lastFut.isDone() ? lastFut.topologyVersion() : lastFut.initialVersion()) : AffinityTopologyVersion.NONE; +lastFut != null ? +(lastFut.isDone() ? lastFut.topologyVersion() : lastFut.initialVersion()) +: AffinityTopologyVersion.NONE; Collection rmts = cctx.discovery().remoteAliveNodesWithCaches(rmtTopVer); if (log.isDebugEnabled()) log.debug("Refreshing partitions from oldest node: " + cctx.localNodeId()); -sendAllPartitions(rmts, rmtTopVer); +sendAllPartitions(rmts, rmtTopVer, grps); } else { if (log.isDebugEnabled()) log.debug("Refreshing local partitions from non-oldest node: " + cctx.localNodeId()); -sendLocalPartitions(oldest, null); +sendLocalPartitions(oldest, null, grps); } } /** + * Partition refresh callback. + * For coordinator causes {@link GridDhtPartitionsFullMessage FullMessages} send, + * for non coordinator - {@link GridDhtPartitionsSingleMessage SingleMessages} send + */ +public void refreshPartitions() { refreshPartitions(cctx.cache().cacheGro
[40/50] [abbrv] ignite git commit: IGNITE-8006 Removed non-representative flaky test
IGNITE-8006 Removed non-representative flaky test Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1f068e01 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1f068e01 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1f068e01 Branch: refs/heads/ignite-gg-14206 Commit: 1f068e01cb0479975c8c6c1a56d46671bee0e515 Parents: 75e414a Author: Alexey Goncharuk Authored: Tue Oct 23 11:01:40 2018 +0300 Committer: Alexey Goncharuk Committed: Tue Oct 23 11:02:51 2018 +0300 -- .../distributed/CacheStartInParallelTest.java | 219 --- .../testsuites/IgniteCacheTestSuite7.java | 3 - 2 files changed, 222 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/1f068e01/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartInParallelTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartInParallelTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartInParallelTest.java deleted file mode 100644 index 4e30d1c..000 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartInParallelTest.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * 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.distributed; - -import java.util.ArrayList; -import org.apache.ignite.IgniteSystemProperties; -import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.DataRegionConfiguration; -import org.apache.ignite.configuration.DataStorageConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.configuration.WALMode; -import org.apache.ignite.internal.IgniteEx; -import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; -import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; -import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; - -/** - * - */ -public class CacheStartInParallelTest extends GridCommonAbstractTest { -/** */ -private static final int CACHES_COUNT = 40; - -/** */ -private static final String STATIC_CACHE_PREFIX = "static-cache-"; - -/** */ -private static final String DYNAMIC_CACHE_PREFIX = "dynamic-cache-"; - -/** */ -private static boolean isStaticCache = true; - -/** */ -private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); - -/** {@inheritDoc} */ -@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { -IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - -cfg.setSystemThreadPoolSize(10); - -TcpDiscoverySpi discoSpi = new TcpDiscoverySpi(); - -discoSpi.setIpFinder(IP_FINDER); - -cfg.setDiscoverySpi(discoSpi); - -long sz = 100 * 1024 * 1024; - -DataStorageConfiguration memCfg = new DataStorageConfiguration().setPageSize(1024) -.setDefaultDataRegionConfiguration( -new DataRegionConfiguration().setPersistenceEnabled(true).setInitialSize(sz).setMaxSize(sz)) -.setWalMode(WALMode.LOG_ONLY).setCheckpointFrequency(24L * 60 * 60 * 1000); - -cfg.setDataStorageConfiguration(memCfg); - -if (isStaticCache) { -ArrayList staticCaches = new ArrayList<>(CACHES_COUNT); - -for (int i = 0; i < CACHES_COUNT; i++) -staticCaches.add(cacheConfiguration(STATIC_CACHE_PREFIX + i)); - -cfg.setCacheConfiguration(staticCaches.toArray(new CacheConfiguration[CACHES_COUNT])); -} - -return cfg; -} - -/** - * @param cacheName Cache name. - * @return Cache configuration. - */ -private CacheConfiguration cacheConfiguration(String cacheName) { -CacheConfiguration
[22/50] [abbrv] ignite git commit: IGNITE-5935: MVCC TX: Tx recovery protocol
IGNITE-5935: MVCC TX: Tx recovery protocol This closes #4920 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5939a947 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5939a947 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5939a947 Branch: refs/heads/ignite-gg-14206 Commit: 5939a94763c8a3e92b66b3f591a816dd6c49f35a Parents: 82d2efe Author: ipavlukhin Authored: Fri Oct 19 17:40:12 2018 +0300 Committer: Igor Sapego Committed: Fri Oct 19 17:40:12 2018 +0300 -- .../ignite/codegen/MessageCodeGenerator.java| 6 +- .../communication/GridIoMessageFactory.java | 18 + .../GridCachePartitionExchangeManager.java | 4 +- .../cache/IgniteCacheOffheapManager.java| 6 +- .../cache/IgniteCacheOffheapManagerImpl.java| 5 + .../cache/PartitionUpdateCounter.java | 30 +- .../distributed/GridCacheTxRecoveryFuture.java | 11 - .../GridDistributedTxRemoteAdapter.java | 52 +- .../distributed/dht/GridDhtTxFinishFuture.java | 4 +- .../distributed/dht/GridDhtTxLocalAdapter.java | 38 -- .../distributed/dht/GridDhtTxPrepareFuture.java | 2 +- .../topology/GridClientPartitionTopology.java | 3 +- .../dht/topology/GridDhtLocalPartition.java | 7 + .../dht/topology/GridDhtPartitionTopology.java | 5 +- .../topology/GridDhtPartitionTopologyImpl.java | 6 +- .../processors/cache/mvcc/MvccProcessor.java| 7 - .../cache/mvcc/MvccProcessorImpl.java | 217 +- .../processors/cache/mvcc/MvccUtils.java| 6 +- .../mvcc/msg/MvccRecoveryFinishedMessage.java | 116 .../PartitionCountersNeighborcastRequest.java | 145 .../PartitionCountersNeighborcastResponse.java | 114 .../persistence/GridCacheOffheapManager.java| 13 + .../cache/transactions/IgniteTxAdapter.java | 3 +- .../cache/transactions/IgniteTxHandler.java | 125 .../cache/transactions/IgniteTxManager.java | 123 +++- .../PartitionCountersNeighborcastFuture.java| 211 ++ .../cache/transactions/TxCounters.java | 3 +- .../continuous/GridContinuousProcessor.java | 6 +- ...xOriginatingNodeFailureAbstractSelfTest.java | 2 +- ...cOriginatingNodeFailureAbstractSelfTest.java | 69 +- ...itionedTxOriginatingNodeFailureSelfTest.java | 2 +- ...woBackupsPrimaryNodeFailureRecoveryTest.java | 2 +- ...ePrimaryNodeFailureRecoveryAbstractTest.java | 133 +++- ...licatedTxOriginatingNodeFailureSelfTest.java | 2 +- .../cache/mvcc/CacheMvccTransactionsTest.java | 4 +- ...ContinuousQueryFailoverAbstractSelfTest.java | 2 +- .../IgniteCacheTxRecoverySelfTestSuite.java | 2 +- .../cache/mvcc/CacheMvccTxRecoveryTest.java | 654 +++ ...GridIndexRebuildWithMvccEnabledSelfTest.java | 3 +- .../testsuites/IgniteCacheMvccSqlTestSuite.java | 58 ++ 40 files changed, 1980 insertions(+), 239 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/5939a947/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java -- diff --git a/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java b/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java index 2599d7a..7492e51 100644 --- a/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java +++ b/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java @@ -43,9 +43,7 @@ import org.apache.ignite.internal.GridDirectCollection; import org.apache.ignite.internal.GridDirectMap; import org.apache.ignite.internal.GridDirectTransient; import org.apache.ignite.internal.IgniteCodeGeneratingFail; -import org.apache.ignite.internal.processors.cache.distributed.dht.GridInvokeValue; -import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxEnlistRequest; -import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxEnlistResponse; +import org.apache.ignite.internal.processors.cache.mvcc.msg.MvccRecoveryFinishedMessage; import org.apache.ignite.internal.util.IgniteUtils; import org.apache.ignite.internal.util.typedef.internal.SB; import org.apache.ignite.internal.util.typedef.internal.U; @@ -171,7 +169,7 @@ public class MessageCodeGenerator { //gen.generateAll(true); -gen.generateAndWrite(GridNearTxEnlistResponse.class); +gen.generateAndWrite(MvccRecoveryFinishedMessage.class); //gen.generateAndWrite(GridNearAtomicUpdateRequest.class); http://git-wip-us.apache.org/repos/asf/ignite/blob/5939a947/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java ---
[20/50] [abbrv] ignite git commit: IGNITE-9784 Automatically adjust WAL history size - Fixes #4924.
IGNITE-9784 Automatically adjust WAL history size - Fixes #4924. Signed-off-by: Alexey Goncharuk Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/82d2efe1 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/82d2efe1 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/82d2efe1 Branch: refs/heads/ignite-gg-14206 Commit: 82d2efe1a20d148fa2c591265988a1852f68f120 Parents: 7deec60 Author: Alexey Goncharuk Authored: Fri Oct 19 12:30:48 2018 +0300 Committer: Alexey Goncharuk Committed: Fri Oct 19 12:30:48 2018 +0300 -- .../discovery/GridDiscoveryManager.java | 4 +- .../GridCacheDatabaseSharedManager.java | 34 +--- .../wal/FileWriteAheadLogManager.java | 9 +- .../wal/FsyncModeFileWriteAheadLogManager.java | 9 +- .../ignite/internal/util/IgniteUtils.java | 86 5 files changed, 99 insertions(+), 43 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/82d2efe1/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 907720a..30d169f 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 @@ -1537,13 +1537,13 @@ public class GridDiscoveryManager extends GridManagerAdapter { for (DataRegionConfiguration dataReg : dataRegions) { res += dataReg.getMaxSize(); -res += GridCacheDatabaseSharedManager.checkpointBufferSize(dataReg); +res += U.checkpointBufferSize(dataReg); } } res += memCfg.getDefaultDataRegionConfiguration().getMaxSize(); -res += GridCacheDatabaseSharedManager.checkpointBufferSize(memCfg.getDefaultDataRegionConfiguration()); +res += U.checkpointBufferSize(memCfg.getDefaultDataRegionConfiguration()); return res; } http://git-wip-us.apache.org/repos/asf/ignite/blob/82d2efe1/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java index 33f593d..73d65f4 100755 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java @@ -172,6 +172,7 @@ import static org.apache.ignite.failure.FailureType.CRITICAL_ERROR; import static org.apache.ignite.failure.FailureType.SYSTEM_WORKER_TERMINATION; import static org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType.CHECKPOINT_RECORD; import static org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaStorage.METASTORAGE_CACHE_ID; +import static org.apache.ignite.internal.util.IgniteUtils.checkpointBufferSize; /** * @@ -184,15 +185,6 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan /** MemoryPolicyConfiguration name reserved for meta store. */ public static final String METASTORE_DATA_REGION_NAME = "metastoreMemPlc"; -/** */ -private static final long GB = 1024L * 1024 * 1024; - -/** Minimum checkpointing page buffer size (may be adjusted by Ignite). */ -public static final Long DFLT_MIN_CHECKPOINTING_PAGE_BUFFER_SIZE = GB / 4; - -/** Default minimum checkpointing page buffer size (may be adjusted by Ignite). */ -public static final Long DFLT_MAX_CHECKPOINTING_PAGE_BUFFER_SIZE = 2 * GB; - /** Skip sync. */ private final boolean skipSync = IgniteSystemProperties.getBoolean(IGNITE_PDS_CHECKPOINT_TEST_SKIP_SYNC); @@ -680,30 +672,6 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan } } -/** - * Get checkpoint buffer size for the given configuration. - * - * @param regCfg Configuration. - * @return Checkpoint buffer size. - */ -public static long checkpointBufferSize(DataRegionConfiguration regCfg) { -if (!regCfg.isPersistenceEnabled()) -return 0L; - -long res =
[37/50] [abbrv] ignite git commit: IGNITE-9960: SQL: Reverted IGNITE-9171 and IGNITE-9864 until performance is fixed. This closes #5045.
http://git-wip-us.apache.org/repos/asf/ignite/blob/75e414a4/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java index 140eb6e..d5cc0eb 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java @@ -17,21 +17,13 @@ package org.apache.ignite.internal.processors.query; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.concurrent.CountDownLatch; -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.Ignition; -import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction; import org.apache.ignite.cache.query.FieldsQueryCursor; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing; import org.apache.ignite.internal.processors.query.h2.twostep.MapQueryLazyWorker; @@ -39,11 +31,16 @@ import org.apache.ignite.internal.util.lang.GridAbsPredicate; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.concurrent.ThreadLocalRandom; + /** * Tests for lazy query execution. */ public class LazyQuerySelfTest extends GridCommonAbstractTest { -/** Keys count. */ +/** Keys ocunt. */ private static final int KEY_CNT = 200; /** Base query argument. */ @@ -97,91 +94,6 @@ public class LazyQuerySelfTest extends GridCommonAbstractTest { } /** - * Test DDL operation on table with high load queries. - * - * @throws Exception If failed. - */ -public void testTableWriteLockStarvation() throws Exception { -final Ignite srv = startGrid(1); - -srv.createCache(cacheConfiguration(4)); - -populateBaseQueryData(srv); - -final AtomicBoolean end = new AtomicBoolean(false); - -final int qryThreads = 10; - -final CountDownLatch latch = new CountDownLatch(qryThreads); - -// Do many concurrent queries. -IgniteInternalFuture fut = GridTestUtils.runMultiThreadedAsync(new Runnable() { -@Override public void run() { -latch.countDown(); - -while(!end.get()) { -FieldsQueryCursor> cursor = execute(srv, query(0) -.setPageSize(PAGE_SIZE_SMALL)); - -cursor.getAll(); -} -} -}, qryThreads, "usr-qry"); - -latch.await(); - -Thread.sleep(500); - -execute(srv, new SqlFieldsQuery("CREATE INDEX PERSON_NAME ON Person (name asc)")).getAll(); -execute(srv, new SqlFieldsQuery("DROP INDEX PERSON_NAME")).getAll(); - -// Test is OK in case DDL operations is passed on hi load queries pressure. -end.set(true); -fut.get(); -} - -/** - * Test release reserved partition after query complete (results is bigger than one page). - * - * @throws Exception If failed. - */ -public void testReleasePartitionReservationSeveralPagesResults() throws Exception { -checkReleasePartitionReservation(PAGE_SIZE_SMALL); -} - -/** - * Test release reserved partition after query complete (results is placed on one page). - * - * @throws Exception If failed. - */ -public void testReleasePartitionReservationOnePageResults() throws Exception { -checkReleasePartitionReservation(KEY_CNT); -} - -/** - * Test release reserved partition after query complete. - * - * @param pageSize Results page size. - * @throws Exception If failed. - */ -public void checkReleasePartitionReservation(int pageSize) throws Exception { -Ignite srv1 = startGrid(1); -startGrid(2); - -srv1.createCache(cacheConfiguration(1)); - -populateBaseQueryData(srv1); - -FieldsQueryCursor> cursor = execute(srv1, query(0).setPageSize(pageSize)); - -cursor.getAll(); - -startGrid(3); - -awaitPartitionMapExchange(); -} - -/** * Check local query execution. * * @par
[41/50] [abbrv] ignite git commit: Attempt to make ttl tests more robust.
Attempt to make ttl tests more robust. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d4af2138 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d4af2138 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d4af2138 Branch: refs/heads/ignite-gg-14206 Commit: d4af2138f333eaa5a9b183659d32c96d3e165bad Parents: 1f068e0 Author: sboikov Authored: Tue Oct 23 11:03:23 2018 +0300 Committer: sboikov Committed: Tue Oct 23 11:03:50 2018 +0300 -- .../IgniteCacheConfigVariationsFullApiTest.java | 40 1 file changed, 33 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/d4af2138/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java index e449b3b..e2b1a2e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java @@ -4212,8 +4212,31 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar * @throws Exception If failed. */ private void checkTtl(boolean inTx, boolean oldEntry) throws Exception { -int ttl = 1000; +int ttlVals[] = {600, 1000, 3000}; +int i = 0; +while (i < ttlVals.length) { +try { +checkTtl0(inTx, oldEntry, ttlVals[i]); +break; +} +catch (AssertionFailedError e) { +if (i < ttlVals.length - 1) +info("Ttl test failed, try execute with increased ttl"); +else +throw e; +} +i++; +} +} + +/** + * @param inTx In tx flag. + * @param oldEntry {@code True} to check TTL on old entry, {@code false} on new. + * @param ttl TTL value. + * @throws Exception If failed. + */ +private void checkTtl0(boolean inTx, boolean oldEntry, int ttl) throws Exception { final ExpiryPolicy expiry = new TouchedExpiryPolicy(new Duration(MILLISECONDS, ttl)); final IgniteCache c = jcache(); @@ -4409,11 +4432,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar // Ensure that old TTL and expire time are not longer "visible". entryTtl = entryTtl(srvNodeCache, key); - -assertNotNull(entryTtl.get1()); -assertNotNull(entryTtl.get2()); -assertEquals(0, (long)entryTtl.get1()); -assertEquals(0, (long)entryTtl.get2()); +assertNull(entryTtl); // Ensure that next update will not pick old expire time. @@ -4430,7 +4449,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar tx.close(); } -U.sleep(2000); +U.sleep(ttl + 500); entryTtl = entryTtl(srvNodeCache, key); @@ -6315,6 +6334,13 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar entry.unswap(); +if (!entry.hasValue()) { +assertEquals(0, entry.ttl()); +assertEquals(0, entry.expireTime()); + +return null; +} + IgnitePair pair = new IgnitePair<>(entry.ttl(), entry.expireTime()); if (!entry.isNear())
[44/50] [abbrv] ignite git commit: IGNITE-8879 Fix blinking baseline node sometimes unable to connect to cluster - Fixes #4893.
IGNITE-8879 Fix blinking baseline node sometimes unable to connect to cluster - Fixes #4893. Signed-off-by: Dmitriy Govorukhin Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3f7109ff Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3f7109ff Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3f7109ff Branch: refs/heads/ignite-gg-14206 Commit: 3f7109ff52bdfc3157987b2230216cc982392eff Parents: b1584a8 Author: Ivan Daschinskiy Authored: Tue Oct 23 12:33:24 2018 +0300 Committer: Dmitriy Govorukhin Committed: Tue Oct 23 12:33:24 2018 +0300 -- .../GridDhtPartitionsExchangeFuture.java| 19 - .../GridCacheDatabaseSharedManager.java | 22 -- .../IgniteCacheDatabaseSharedManager.java | 6 ++- .../metastorage/IgniteMetaStorageBasicTest.java | 45 4 files changed, 66 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/3f7109ff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java index 0c2cbe2..63d3635 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java @@ -871,16 +871,13 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte * @throws IgniteCheckedException If failed. */ private IgniteInternalFuture initCachesOnLocalJoin() throws IgniteCheckedException { -if (isLocalNodeNotInBaseline()) { +boolean baselineNode = isLocalNodeInBaseline(); + +if (!baselineNode) { cctx.exchange().exchangerBlockingSectionBegin(); try { cctx.cache().cleanupCachesDirectories(); - -cctx.database().cleanupCheckpointDirectory(); - -if (cctx.wal() != null) -cctx.wal().cleanupWalDirectories(); } finally { cctx.exchange().exchangerBlockingSectionEnd(); @@ -916,7 +913,7 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte cctx.exchange().exchangerBlockingSectionBegin(); try { -cctx.database().readCheckpointAndRestoreMemory(startDescs); +cctx.database().readCheckpointAndRestoreMemory(startDescs, !baselineNode); } finally { cctx.exchange().exchangerBlockingSectionEnd(); @@ -950,12 +947,12 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte } /** - * @return {@code true} if local node is not in baseline and {@code false} otherwise. + * @return {@code true} if local node is in baseline and {@code false} otherwise. */ -private boolean isLocalNodeNotInBaseline() { +private boolean isLocalNodeInBaseline() { BaselineTopology topology = cctx.discovery().discoCache().state().baselineTopology(); -return topology!= null && !topology.consistentIds().contains(cctx.localNode().consistentId()); +return topology != null && topology.consistentIds().contains(cctx.localNode().consistentId()); } /** @@ -1098,7 +1095,7 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte cctx.exchange().exchangerBlockingSectionBegin(); try { - cctx.database().readCheckpointAndRestoreMemory(startDescs); + cctx.database().readCheckpointAndRestoreMemory(startDescs, false); } finally { cctx.exchange().exchangerBlockingSectionEnd(); http://git-wip-us.apache.org/repos/asf/ignite/blob/3f7109ff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java index 73d65f4
[12/50] [abbrv] ignite git commit: IGNITE-9854 Correct remove from dirtyPages and segCheckpointPages - Fixes #4988.
IGNITE-9854 Correct remove from dirtyPages and segCheckpointPages - Fixes #4988. Signed-off-by: Dmitriy Govorukhin Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/829dc1f2 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/829dc1f2 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/829dc1f2 Branch: refs/heads/ignite-gg-14206 Commit: 829dc1f240c07731a1ee98ae18c80ea6074dc6c4 Parents: a9f37a2 Author: Ivan Daschinskiy Authored: Thu Oct 18 14:33:28 2018 +0300 Committer: Dmitriy Govorukhin Committed: Thu Oct 18 14:33:28 2018 +0300 -- .../cache/persistence/pagemem/PageMemoryImpl.java | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/829dc1f2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java index 55c5fb5..48e33c0 100755 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java @@ -851,11 +851,15 @@ public class PageMemoryImpl implements PageMemoryEx { if (rmv) seg.loadedPages.remove(grpId, PageIdUtils.effectivePageId(pageId)); -if (seg.segCheckpointPages != null) -seg.segCheckpointPages.remove(new FullPageId(pageId, grpId)); +Collection cpPages = seg.segCheckpointPages; -if (seg.dirtyPages != null) -seg.dirtyPages.remove(new FullPageId(pageId, grpId)); +if (cpPages != null) +cpPages.remove(new FullPageId(pageId, grpId)); + +Collection dirtyPages = seg.dirtyPages; + +if (dirtyPages != null) +dirtyPages.remove(new FullPageId(pageId, grpId)); return relPtr; } @@ -1875,7 +1879,7 @@ public class PageMemoryImpl implements PageMemoryEx { private static final int ACQUIRED_PAGES_PADDING = 4; /** Page ID to relative pointer map. */ -private LoadedPagesMap loadedPages; +private final LoadedPagesMap loadedPages; /** Pointer to acquired pages integer counter. */ private long acquiredPagesPtr; @@ -1887,7 +1891,7 @@ public class PageMemoryImpl implements PageMemoryEx { private long memPerTbl; /** Pages marked as dirty since the last checkpoint. */ -private Collection dirtyPages = new GridConcurrentHashSet<>(); +private volatile Collection dirtyPages = new GridConcurrentHashSet<>(); /** */ private volatile Collection segCheckpointPages;
[31/50] [abbrv] ignite git commit: IGNITE-9945 Entry start version should not omit datacenter ID - Fixes #5034.
IGNITE-9945 Entry start version should not omit datacenter ID - Fixes #5034. Signed-off-by: Alexey Goncharuk Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4353618a Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4353618a Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4353618a Branch: refs/heads/ignite-gg-14206 Commit: 4353618a7501e2dada6b0027cadc2b9c6b069fde Parents: ebaedf9 Author: Andrey V. Mashenkov Authored: Mon Oct 22 16:01:28 2018 +0300 Committer: Alexey Goncharuk Committed: Mon Oct 22 16:01:28 2018 +0300 -- .../cache/CacheConflictResolutionManager.java | 2 +- .../processors/cache/GridCacheMapEntry.java | 9 ++ .../cache/version/GridCacheVersionManager.java | 31 ++-- 3 files changed, 32 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/4353618a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheConflictResolutionManager.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheConflictResolutionManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheConflictResolutionManager.java index 6d65d82..9790f75 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheConflictResolutionManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheConflictResolutionManager.java @@ -17,7 +17,7 @@ package org.apache.ignite.internal.processors.cache; -import org.apache.ignite.internal.processors.cache.version.*; +import org.apache.ignite.internal.processors.cache.version.CacheVersionConflictResolver; /** * Conflict resolver manager. http://git-wip-us.apache.org/repos/asf/ignite/blob/4353618a/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 ab5b725..c753296 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 @@ -73,7 +73,6 @@ import org.apache.ignite.internal.processors.cache.version.GridCacheLazyPlainVer import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; import org.apache.ignite.internal.processors.cache.version.GridCacheVersionConflictContext; import org.apache.ignite.internal.processors.cache.version.GridCacheVersionEx; -import org.apache.ignite.internal.processors.cache.version.GridCacheVersionManager; import org.apache.ignite.internal.processors.cache.version.GridCacheVersionedEntryEx; import org.apache.ignite.internal.processors.dr.GridDrType; import org.apache.ignite.internal.processors.query.IgniteSQLException; @@ -117,10 +116,8 @@ import static org.apache.ignite.internal.processors.cache.GridCacheUpdateAtomicR import static org.apache.ignite.internal.processors.cache.GridCacheUpdateAtomicResult.UpdateOutcome.REMOVE_NO_VAL; import static org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.compareIgnoreOpCounter; import static org.apache.ignite.internal.processors.cache.persistence.CacheDataRowAdapter.RowData.NO_KEY; -import static org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode.CONCURRENT_UPDATE; import static org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode.DUPLICATE_KEY; import static org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode.TRANSACTION_SERIALIZATION_ERROR; -import static org.apache.ignite.internal.processors.dr.GridDrType.DR_BACKUP; import static org.apache.ignite.internal.processors.dr.GridDrType.DR_NONE; /** @@ -222,7 +219,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme this.cctx = cctx; this.listenerLock = cctx.continuousQueries().getListenerReadLock(); -ver = GridCacheVersionManager.START_VER; +ver = cctx.shared().versions().startVersion(); } /** @@ -332,7 +329,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme * @return {@code True} if start version. */ public boolean isStartVersion() { -return ver == GridCacheVersionManager.START_VER; +return cctx.shared().versions().isStartVersion(ver); } /** {@inheritDoc} */ @@ -3287,7 +3284,7 @@ public abstract class GridCacheMapEntry extends G
[17/50] [abbrv] ignite git commit: IGNITE-9155 ExchangeFuture will not complete with Exception on state change failure - Fixes #4467.
IGNITE-9155 ExchangeFuture will not complete with Exception on state change failure - Fixes #4467. Signed-off-by: Alexey Goncharuk Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/177d571b Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/177d571b Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/177d571b Branch: refs/heads/ignite-gg-14206 Commit: 177d571b57f8dde2c82e2a7e4ba9b5d453f4d8df Parents: a3b624d Author: Ilya Lantukh Authored: Thu Oct 18 19:34:55 2018 +0300 Committer: Alexey Goncharuk Committed: Thu Oct 18 19:34:55 2018 +0300 -- .../preloader/GridDhtPartitionsExchangeFuture.java | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/177d571b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java index 0fe1a25..4b4b6df 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java @@ -3440,8 +3440,6 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte } if (stateChangeExchange()) { -IgniteCheckedException err = null; - StateChangeRequest req = exchActions.stateChangeRequest(); assert req != null : exchActions; @@ -3451,8 +3449,6 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte if (!F.isEmpty(exchangeGlobalExceptions)) { stateChangeErr = true; -err = new IgniteCheckedException("Cluster state change failed."); - cctx.kernalContext().state().onStateChangeError(exchangeGlobalExceptions, req); } else { @@ -3484,7 +3480,7 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte cctx.discovery().sendCustomEvent(stateFinishMsg); if (!centralizedAff) -onDone(exchCtx.events().topologyVersion(), err); +onDone(exchCtx.events().topologyVersion(), null); } } catch (IgniteCheckedException e) { @@ -3969,15 +3965,10 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte updatePartitionFullMap(resTopVer, msg); -IgniteCheckedException err = null; - -if (stateChangeExchange() && !F.isEmpty(msg.getErrorsMap())) { -err = new IgniteCheckedException("Cluster state change failed"); - +if (stateChangeExchange() && !F.isEmpty(msg.getErrorsMap())) cctx.kernalContext().state().onStateChangeError(msg.getErrorsMap(), exchActions.stateChangeRequest()); -} -onDone(resTopVer, err); +onDone(resTopVer, null); } catch (IgniteCheckedException e) { onDone(e);
[43/50] [abbrv] ignite git commit: IGNITE-9911: MVCC: Fixed a hang during vacuum. This closes #5035.
IGNITE-9911: MVCC: Fixed a hang during vacuum. This closes #5035. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b1584a8f Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b1584a8f Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b1584a8f Branch: refs/heads/ignite-gg-14206 Commit: b1584a8f2636d390b3f8cc754ce1195ccc797807 Parents: 962d6a2 Author: Igor Seliverstov Authored: Tue Oct 23 12:05:23 2018 +0300 Committer: devozerov Committed: Tue Oct 23 12:05:23 2018 +0300 -- .../cache/mvcc/MvccProcessorImpl.java | 228 --- .../cache/mvcc/CacheMvccAbstractTest.java | 21 +- ...cheMvccSelectForUpdateQueryAbstractTest.java | 11 +- 3 files changed, 115 insertions(+), 145 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/b1584a8f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java index 9fcafb0..e58151f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java @@ -90,8 +90,8 @@ import org.apache.ignite.internal.util.future.GridCompoundFuture; import org.apache.ignite.internal.util.future.GridCompoundIdentityFuture; import org.apache.ignite.internal.util.future.GridFinishedFuture; import org.apache.ignite.internal.util.future.GridFutureAdapter; +import org.apache.ignite.internal.util.lang.GridClosureException; import org.apache.ignite.internal.util.lang.GridCursor; -import org.apache.ignite.internal.util.typedef.CI1; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.internal.util.typedef.internal.S; @@ -115,7 +115,6 @@ import static org.apache.ignite.events.EventType.EVT_NODE_SEGMENTED; import static org.apache.ignite.internal.GridTopic.TOPIC_CACHE_COORDINATOR; import static org.apache.ignite.internal.events.DiscoveryCustomEvent.EVT_DISCOVERY_CUSTOM_EVT; import static org.apache.ignite.internal.managers.communication.GridIoPolicy.SYSTEM_POOL; -import static org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.OWNING; import static org.apache.ignite.internal.processors.cache.mvcc.MvccQueryTracker.MVCC_TRACKER_ID_NA; import static org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.MVCC_COUNTER_NA; import static org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.MVCC_CRD_COUNTER_NA; @@ -181,9 +180,6 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce */ private final Object mux = new Object(); -/** For tests only. */ -private volatile Throwable vacuumError; - /** */ private final GridAtomicLong futIdCntr = new GridAtomicLong(0); @@ -1136,8 +1132,7 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce crdVer == 0 && ctx.localNodeId().equals(crd0.nodeId())) return new GridFinishedFuture<>(new VacuumMetrics()); -final GridCompoundIdentityFuture res = -new GridCompoundIdentityFuture<>(new VacuumMetricsReducer()); +final GridFutureAdapter res = new GridFutureAdapter<>(); MvccSnapshot snapshot; @@ -1174,28 +1169,10 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce } /** - * For tests only. - * - * @return Vacuum error. - */ -Throwable vacuumError() { -return vacuumError; -} - -/** - * For tests only. - * - * @param e Vacuum error. - */ -void vacuumError(Throwable e) { -this.vacuumError = e; -} - -/** * @param res Result. * @param snapshot Snapshot. */ -private void continueRunVacuum(GridCompoundIdentityFuture res, MvccSnapshot snapshot) { +private void continueRunVacuum(GridFutureAdapter res, MvccSnapshot snapshot) { ackTxCommit(snapshot) .listen(new IgniteInClosure() { @Override public void apply(IgniteInternalFuture fut) { @@ -1220,23 +1197,45 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce return; } +GridCompoundIdentityFuture res0 = +new GridCompoundIdentityFuture(new VacuumMetrics
[34/50] [abbrv] ignite git commit: IGNITE-9738 Client node can suddenly fail on start - Fixes #4968.
IGNITE-9738 Client node can suddenly fail on start - Fixes #4968. Signed-off-by: Dmitriy Govorukhin Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d82b21ec Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d82b21ec Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d82b21ec Branch: refs/heads/ignite-gg-14206 Commit: d82b21ec56a956fa7cc5374e3f15e279e7c492ac Parents: e1f8f46 Author: vd-pyatkov Authored: Mon Oct 22 18:19:53 2018 +0300 Committer: Dmitriy Govorukhin Committed: Mon Oct 22 18:19:53 2018 +0300 -- .../ignite/spi/discovery/tcp/ClientImpl.java| 10 +- .../LongClientConnectToClusterTest.java | 173 +++ .../IgniteSpiDiscoverySelfTestSuite.java| 2 + 3 files changed, 180 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/d82b21ec/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java index d3a8b18..92c197a 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java @@ -305,6 +305,11 @@ class ClientImpl extends TcpDiscoveryImpl { } }.start(); +timer.schedule( +new MetricsSender(), +spi.metricsUpdateFreq, +spi.metricsUpdateFreq); + try { joinLatch.await(); @@ -317,11 +322,6 @@ class ClientImpl extends TcpDiscoveryImpl { throw new IgniteSpiException("Thread has been interrupted.", e); } -timer.schedule( -new MetricsSender(), -spi.metricsUpdateFreq, -spi.metricsUpdateFreq); - spi.printStartInfo(); } http://git-wip-us.apache.org/repos/asf/ignite/blob/d82b21ec/modules/core/src/test/java/org/apache/ignite/spi/discovery/LongClientConnectToClusterTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/LongClientConnectToClusterTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/LongClientConnectToClusterTest.java new file mode 100644 index 000..a079926 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/LongClientConnectToClusterTest.java @@ -0,0 +1,173 @@ +/* + * 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.spi.discovery; + +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.configuration.IgniteConfiguration; +import org.apache.ignite.events.EventType; +import org.apache.ignite.internal.IgniteEx; +import org.apache.ignite.internal.util.future.IgniteFinishedFutureImpl; +import org.apache.ignite.lang.IgniteFuture; +import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; +import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryAbstractMessage; +import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryNodeAddFinishedMessage; +import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.jetbrains.annotations.Nullable; +import java.io.IOException; +import java.io.OutputStream; +import java.net.Socket; +import java.util.Collection; +import java.util.Collections; +import java.util.Map; + +/** + * Test client connects to two nodes cluster during time more than the + * {@link org.apache.ignite.configuration.IgniteConfiguration#clientFailureDetectionTimeout}. + */ +public class LongClientConnectToClusterTest extends GridCommonAbstractTest { +/** Client instance name. */ +public static final String CLIENT_INSTANCE_NAME = "client"; +
[28/50] [abbrv] ignite git commit: IGNITE-9694 Add tests to check that reading queries are not blocked on exchange events that don't change data visibility - Fixes #4926.
http://git-wip-us.apache.org/repos/asf/ignite/blob/3fae41b1/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnCreateDestoryIndexTest.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnCreateDestoryIndexTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnCreateDestoryIndexTest.java new file mode 100644 index 000..469ec93 --- /dev/null +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnCreateDestoryIndexTest.java @@ -0,0 +1,480 @@ +/* + * 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.distributed; + +import java.lang.annotation.Annotation; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.apache.ignite.IgniteCache; +import org.apache.ignite.cache.query.SqlFieldsQuery; +import org.apache.ignite.configuration.CacheConfiguration; +import org.apache.ignite.internal.IgniteEx; +import org.apache.ignite.internal.processors.cache.distributed.CacheBlockOnReadAbstractTest.Params; +import org.apache.ignite.internal.processors.query.schema.message.SchemaOperationStatusMessage; +import org.apache.ignite.internal.util.typedef.T3; +import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; +import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; +import static org.apache.ignite.cache.CacheMode.PARTITIONED; +import static org.apache.ignite.cache.CacheMode.REPLICATED; + +/** + * + */ +public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { +/** */ +private final List tests = Arrays.asList( +new CacheBlockOnSingleGetTest() { +/** {@inheritDoc} */ +@Nullable @Override protected A currentTestAnnotation(Class annotationCls) { +return CacheBlockOnCreateDestoryIndexTest.this.currentTestAnnotation(annotationCls); +} +}, +new CacheBlockOnGetAllTest() { +/** {@inheritDoc} */ +@Nullable @Override protected A currentTestAnnotation(Class annotationCls) { +return CacheBlockOnCreateDestoryIndexTest.this.currentTestAnnotation(annotationCls); +} +}, +new CacheBlockOnScanTest() { +/** {@inheritDoc} */ +@Nullable @Override protected A currentTestAnnotation(Class annotationCls) { +return CacheBlockOnCreateDestoryIndexTest.this.currentTestAnnotation(annotationCls); +} +}, +new CacheBlockOnSqlQueryTest() { +/** {@inheritDoc} */ +@Nullable @Override protected A currentTestAnnotation(Class annotationCls) { +return CacheBlockOnCreateDestoryIndexTest.this.currentTestAnnotation(annotationCls); +} +} +); + +/** {@inheritDoc} */ +@Override protected void beforeTest() throws Exception { +currentTest().beforeTest(); +} + +/** {@inheritDoc} */ +@Override protected void afterTest() throws Exception { +currentTest().afterTest(); +} + +/** + * @throws Exception If failed. + */ +@TestIndex(0) +@Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) +public void testCreateIndexAtomicPartitionedGet() throws Exception { +doTestCreateIndex(); +} + +/** + * @throws Exception If failed. + */ +@TestIndex(0) +@Params(atomicityMode = ATOMIC, cacheMode = REPLICATED) +public void testCreateIndexAtomicReplicatedGet() throws Exception { +doTestCreateIndex(); +} + +/** + * @throws Exception If failed. + */ +@Test
[36/50] [abbrv] ignite git commit: IGNITE-9944: MVCC: Fixed "first request" handling for DHT transactions. This closes #5040.
IGNITE-9944: MVCC: Fixed "first request" handling for DHT transactions. This closes #5040. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/7504880a Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/7504880a Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/7504880a Branch: refs/heads/ignite-gg-14206 Commit: 7504880a443737bf03bb03e455dbea7d8757ae27 Parents: 4bc08da Author: ipavlukhin Authored: Mon Oct 22 22:15:20 2018 +0300 Committer: devozerov Committed: Mon Oct 22 22:15:20 2018 +0300 -- .../dht/GridDhtTxAbstractEnlistFuture.java | 8 +- .../CacheMvccRemoteTxOnNearNodeStartTest.java | 90 .../testsuites/IgniteCacheMvccTestSuite.java| 3 + 3 files changed, 100 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/7504880a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java index e2c8237..68669b7 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java @@ -193,6 +193,9 @@ public abstract class GridDhtTxAbstractEnlistFuture extends GridCacheFutureAd /** Moving partitions. */ private Map movingParts; +/** Map for tracking nodes to which first request was already sent in order to send smaller subsequent requests. */ +private final Set firstReqSent = new HashSet<>(); + /** * @param nearNodeId Near node ID. * @param nearLockVer Near lock version. @@ -823,9 +826,12 @@ public abstract class GridDhtTxAbstractEnlistFuture extends GridCacheFutureAd GridDhtTxQueryEnlistRequest req; -if (newRemoteTx(node)) { +if (newRemoteTx(node)) addNewRemoteTxNode(node); +if (!firstReqSent.contains(node)) { +firstReqSent.add(node); + // If this is a first request to this node, send full info. req = new GridDhtTxQueryFirstEnlistRequest(cctx.cacheId(), futId, http://git-wip-us.apache.org/repos/asf/ignite/blob/7504880a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccRemoteTxOnNearNodeStartTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccRemoteTxOnNearNodeStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccRemoteTxOnNearNodeStartTest.java new file mode 100644 index 000..ee23e38 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccRemoteTxOnNearNodeStartTest.java @@ -0,0 +1,90 @@ +/* + * 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.mvcc; + +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import org.apache.ignite.IgniteCache; +import org.apache.ignite.cache.CacheAtomicityMode; +import org.apache.ignite.cache.CacheMode; +import org.apache.ignite.cache.affinity.Affinity; +import org.apache.ignite.configuration.CacheConfiguration; +import org.apache.ignite.internal.IgniteEx; +import org.apache.ignite.testframework.GridTestUtils; +import org.apache.ignite.transactions.Transaction; +import org.apache.ignite.transactions.TransactionConcurrency; +import org.apache.ignite.transactions.TransactionIsolation; + +import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; +import static or
[30/50] [abbrv] ignite git commit: IGNITE-9900: Upgrade annotations.jar to a new version. - Fixes #5004.
IGNITE-9900: Upgrade annotations.jar to a new version. - Fixes #5004. Signed-off-by: Dmitriy Govorukhin Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ebaedf9a Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ebaedf9a Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ebaedf9a Branch: refs/heads/ignite-gg-14206 Commit: ebaedf9a4f1a99c4d9b2c8b3c0affb4494d79c38 Parents: 3fae41b Author: Stanislav Lukyanov Authored: Mon Oct 22 15:08:10 2018 +0300 Committer: Dmitriy Govorukhin Committed: Mon Oct 22 15:08:10 2018 +0300 -- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/ebaedf9a/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index eeceb18..e260118 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -80,7 +80,7 @@ 1.0.0_1 1.0.1 1.0.0 -13.0 +16.0.3 9.4.11.v20180605 1.13 1.1.1
[11/50] [abbrv] ignite git commit: IGNITE-9927: Reverted changes to CacheContinuousQueryOperationFromCallbackTest until flaky failures are fixed.
IGNITE-9927: Reverted changes to CacheContinuousQueryOperationFromCallbackTest until flaky failures are fixed. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a9f37a2e Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a9f37a2e Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a9f37a2e Branch: refs/heads/ignite-gg-14206 Commit: a9f37a2e4800df5eefc81345292d9b4a4ab94c67 Parents: 1b69810 Author: devozerov Authored: Thu Oct 18 12:19:38 2018 +0300 Committer: devozerov Committed: Thu Oct 18 12:19:38 2018 +0300 -- ...ontinuousQueryOperationFromCallbackTest.java | 205 --- 1 file changed, 39 insertions(+), 166 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/a9f37a2e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationFromCallbackTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationFromCallbackTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationFromCallbackTest.java index 3cb13bf..0540b43 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationFromCallbackTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationFromCallbackTest.java @@ -63,13 +63,10 @@ import org.jetbrains.annotations.Nullable; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; -import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC; -import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; -import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; /** * @@ -200,60 +197,6 @@ public class CacheContinuousQueryOperationFromCallbackTest extends GridCommonAbs } /** - * @throws Exception If failed. - */ -public void testMvccTxTwoBackupsFilter() throws Exception { -CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL_SNAPSHOT, FULL_SYNC); - -doTest(ccfg, false); -} - -/** - * @throws Exception If failed. - */ -public void testMvccTxTwoBackupsFilterPrimary() throws Exception { -CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL_SNAPSHOT, PRIMARY_SYNC); - -doTest(ccfg, false); -} - -/** - * @throws Exception If failed. - */ -public void testMvccTxReplicatedFilter() throws Exception { -CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 0, TRANSACTIONAL_SNAPSHOT, FULL_SYNC); - -doTest(ccfg, false); -} - -/** - * @throws Exception If failed. - */ -public void testMvccTxTwoBackup() throws Exception { -CacheConfiguration ccfg = cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL_SNAPSHOT, FULL_SYNC); - -doTest(ccfg, true); -} - -/** - * @throws Exception If failed. - */ -public void testMvccTxReplicated() throws Exception { -CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 2, TRANSACTIONAL_SNAPSHOT, FULL_SYNC); - -doTest(ccfg, true); -} - -/** - * @throws Exception If failed. - */ -public void testMvccTxReplicatedPrimary() throws Exception { -CacheConfiguration ccfg = cacheConfiguration(REPLICATED, 2, TRANSACTIONAL_SNAPSHOT, PRIMARY_SYNC); - -doTest(ccfg, true); -} - -/** * @param ccfg Cache configuration. * @throws Exception If failed. */ @@ -309,51 +252,34 @@ public class CacheContinuousQueryOperationFromCallbackTest extends GridCommonAbs QueryTestKey key = new QueryTestKey(rnd.nextInt(KEYS)); -boolean startTx = cache.getConfiguration(CacheConfiguration.class).getAtomicityMode() != -ATOMIC && rnd.nextBoolean(); +boolean startTx = cache.getConfiguration(CacheConfiguration.class).getAtomicityMode() == +TRANSACTIONAL && rnd.nextBoolean(); Transaction tx = null; -boolean committed = false; - -
[47/50] [abbrv] ignite git commit: IGNITE-9632: SQL: support IN statement with constants/params for partition pruning. This closes #4857.
IGNITE-9632: SQL: support IN statement with constants/params for partition pruning. This closes #4857. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d669da15 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d669da15 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d669da15 Branch: refs/heads/ignite-gg-14206 Commit: d669da154f79e48a833a754a59606b65159406c3 Parents: d76ff54 Author: devozerov Authored: Tue Oct 23 15:15:23 2018 +0300 Committer: devozerov Committed: Tue Oct 23 15:15:23 2018 +0300 -- .../query/h2/sql/GridSqlQuerySplitter.java | 137 +++-- .../InOperationExtractPartitionSelfTest.java| 201 +++ .../query/h2/twostep/JoinSqlTestHelper.java | 9 +- .../IgniteCacheQuerySelfTestSuite2.java | 3 + 4 files changed, 331 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/d669da15/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java -- diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java index ca9c5bb..b19dd14 100644 --- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java +++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java @@ -53,6 +53,7 @@ import org.apache.ignite.internal.util.typedef.internal.S; import org.h2.command.Prepared; import org.h2.command.dml.Query; import org.h2.command.dml.SelectUnion; +import org.h2.table.Column; import org.h2.table.IndexColumn; import org.h2.value.Value; import org.jetbrains.annotations.Nullable; @@ -2342,6 +2343,64 @@ public class GridSqlQuerySplitter { return null; } +case IN: { +// Operation should contain at least two children: left (column) and right (const or column). +if (op.size() < 2) +return null; + +// Left operand should be column. +GridSqlAst left = op.child(); + +GridSqlColumn leftCol; + +if (left instanceof GridSqlColumn) +leftCol = (GridSqlColumn)left; +else +return null; + +// Can work only with Ignite's tables. +if (!(leftCol.column().getTable() instanceof GridH2Table)) +return null; + +CacheQueryPartitionInfo[] res = new CacheQueryPartitionInfo[op.size() - 1]; + +for (int i = 1; i < op.size(); i++) { +GridSqlAst right = op.child(i); + +GridSqlConst rightConst; +GridSqlParameter rightParam; + +if (right instanceof GridSqlConst) { +rightConst = (GridSqlConst)right; +rightParam = null; +} +else if (right instanceof GridSqlParameter) { +rightConst = null; +rightParam = (GridSqlParameter)right; +} +else +// One of members of "IN" list is neither const, nor param, so we do no know it's partition. +// As this is disjunction, not knowing partition of a single element leads to unknown partition +// set globally. Hence, returning null. +return null; + +CacheQueryPartitionInfo cur = getCacheQueryPartitionInfo( +leftCol.column(), +rightConst, +rightParam, +ctx +); + +// Same thing as above: single unknown partition in disjunction defeats optimization. +if (cur == null) +return null; + +res[i - 1] = cur; +} + +return res; +} + default: return null; } @@ -2362,39 +2421,85 @@ public class GridSqlQuerySplitter { GridSqlElement left = op.child(0); GridSqlElement right = op.child(1); -if (!(left instanceof GridSqlColumn)) +GridSqlColumn leftCol; + +if (left instanceof GridSqlColumn) +leftCol = (GridSqlColumn)left; +else return null; -if (!(right instanceof GridSqlConst) && !(right instanceof GridSqlParameter
[26/50] [abbrv] ignite git commit: IGNITE-9837 Fixed flaky BinaryMetadataUpdatesFlowTest.testConcurrentMetadataUpdates - Fixes #4969.
IGNITE-9837 Fixed flaky BinaryMetadataUpdatesFlowTest.testConcurrentMetadataUpdates - Fixes #4969. Signed-off-by: Alexey Goncharuk Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5fa5c548 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5fa5c548 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5fa5c548 Branch: refs/heads/ignite-gg-14206 Commit: 5fa5c5483d7dda59cc7806cd647f00bbdb66b216 Parents: 6f28742 Author: NSAmelchev Authored: Mon Oct 22 13:36:32 2018 +0300 Committer: Alexey Goncharuk Committed: Mon Oct 22 13:36:32 2018 +0300 -- .../processors/cache/binary/BinaryMetadataUpdatesFlowTest.java | 6 ++ 1 file changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/5fa5c548/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java index 7e8c086..eab7cfb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java @@ -310,6 +310,9 @@ public class BinaryMetadataUpdatesFlowTest extends GridCommonAbstractTest { killer.interrupt(); resurrection.interrupt(); + +killer.join(); +resurrection.join(); } /** @@ -351,6 +354,9 @@ public class BinaryMetadataUpdatesFlowTest extends GridCommonAbstractTest { killer.interrupt(); resurrection.interrupt(); + +killer.join(); +resurrection.join(); } /**
[21/50] [abbrv] ignite git commit: IGNITE-5935: MVCC TX: Tx recovery protocol
http://git-wip-us.apache.org/repos/asf/ignite/blob/5939a947/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/PartitionCountersNeighborcastFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/PartitionCountersNeighborcastFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/PartitionCountersNeighborcastFuture.java new file mode 100644 index 000..f7fe9cb --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/PartitionCountersNeighborcastFuture.java @@ -0,0 +1,211 @@ +/* + * 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.transactions; + +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.IgniteLogger; +import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; +import org.apache.ignite.internal.processors.cache.GridCacheCompoundIdentityFuture; +import org.apache.ignite.internal.processors.cache.GridCacheSharedContext; +import org.apache.ignite.internal.processors.cache.distributed.dht.PartitionUpdateCountersMessage; +import org.apache.ignite.internal.processors.cache.mvcc.msg.PartitionCountersNeighborcastRequest; +import org.apache.ignite.internal.util.future.GridFutureAdapter; +import org.apache.ignite.internal.util.typedef.F; +import org.apache.ignite.internal.util.typedef.internal.CU; +import org.apache.ignite.lang.IgniteUuid; +import org.jetbrains.annotations.Nullable; + +import static org.apache.ignite.internal.managers.communication.GridIoPolicy.SYSTEM_POOL; + +/** + * Represents partition update counters delivery to remote nodes. + */ +public class PartitionCountersNeighborcastFuture extends GridCacheCompoundIdentityFuture { +/** */ +private final IgniteUuid futId = IgniteUuid.randomUuid(); +/** */ +private boolean trackable = true; +/** */ +private final GridCacheSharedContext cctx; +/** */ +private final IgniteInternalTx tx; +/** */ +private final IgniteLogger log; + +/** */ +public PartitionCountersNeighborcastFuture( +IgniteInternalTx tx, GridCacheSharedContext cctx) { +super(null); + +this.tx = tx; + +this.cctx = cctx; + +log = cctx.logger(CU.TX_MSG_RECOVERY_LOG_CATEGORY); +} + +/** + * Starts processing. + */ +public void init() { +if (log.isInfoEnabled()) { +log.info("Starting delivery partition countres to remote nodes [txId=" + tx.nearXidVersion() + +", futId=" + futId); +} + +HashSet siblings = siblingBackups(); + +cctx.mvcc().addFuture(this, futId); + +for (UUID peer : siblings) { +List cntrs = cctx.tm().txHandler() +.filterUpdateCountersForBackupNode(tx, cctx.node(peer)); + +if (F.isEmpty(cntrs)) +continue; + +MiniFuture miniFut = new MiniFuture(peer); + +try { +cctx.io().send(peer, new PartitionCountersNeighborcastRequest(cntrs, futId), SYSTEM_POOL); + +add(miniFut); +} +catch (IgniteCheckedException e) { +if (!(e instanceof ClusterTopologyCheckedException)) +log.warning("Failed to send partition counters to remote node [node=" + peer + ']', e); +else +logNodeLeft(peer); + +miniFut.onDone(); +} +} + +markInitialized(); +} + +/** */ +private HashSet siblingBackups() { +Map> txNodes = tx.transactionNodes(); + +assert txNodes != null; + +UUID locNodeId = cctx.localNodeId(); + +HashSet siblings = new HashSet<>(); + +txNodes.values().stream() +.filter(backups -> backups.contains(locNodeId)) +.forEach(siblings::
[23/50] [abbrv] ignite git commit: IGNITE-5795 Register binary metadata during cache start - Fixes #4852.
IGNITE-5795 Register binary metadata during cache start - Fixes #4852. Signed-off-by: Alexey Goncharuk Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3bb03444 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3bb03444 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3bb03444 Branch: refs/heads/ignite-gg-14206 Commit: 3bb03444246f863096063d084393676a84d2bc0e Parents: 5939a94 Author: Anton Kalashnikov Authored: Fri Oct 19 17:51:41 2018 +0300 Committer: Alexey Goncharuk Committed: Fri Oct 19 17:56:36 2018 +0300 -- .../apache/ignite/internal/IgniteKernal.java| 2 +- .../binary/BinaryCachingMetadataHandler.java| 25 +- .../ignite/internal/binary/BinaryContext.java | 59 +++- .../internal/binary/BinaryMetadataHandler.java | 10 + .../binary/BinaryNoopMetadataHandler.java | 6 + .../binary/builder/BinaryObjectBuilderImpl.java | 2 +- .../internal/client/thin/TcpIgniteClient.java | 6 + .../processors/cache/GridCacheProcessor.java| 9 +- .../binary/CacheObjectBinaryProcessorImpl.java | 5 + .../processors/query/GridQueryProcessor.java| 77 - .../binary/TestCachingMetadataHandler.java | 6 + .../cache/CacheRegisterMetadataLocallyTest.java | 287 +++ .../cache/index/AbstractSchemaSelfTest.java | 6 +- .../index/H2DynamicIndexAbstractSelfTest.java | 48 ++-- .../IgniteCacheWithIndexingTestSuite.java | 2 + 15 files changed, 494 insertions(+), 56 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/3bb03444/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 c6ec9be..40347d7 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 @@ -1005,6 +1005,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { // Start processors before discovery manager, so they will // be able to start receiving messages once discovery completes. try { +startProcessor(new GridMarshallerMappingProcessor(ctx)); startProcessor(new PdsConsistentIdProcessor(ctx)); startProcessor(new MvccProcessorImpl(ctx)); startProcessor(createComponent(DiscoveryNodeValidationProcessor.class, ctx)); @@ -1028,7 +1029,6 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { startProcessor(createHadoopComponent()); startProcessor(new DataStructuresProcessor(ctx)); startProcessor(createComponent(PlatformProcessor.class, ctx)); -startProcessor(new GridMarshallerMappingProcessor(ctx)); // Start plugins. for (PluginProvider provider : ctx.plugins().allProviders()) { http://git-wip-us.apache.org/repos/asf/ignite/blob/3bb03444/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryCachingMetadataHandler.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryCachingMetadataHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryCachingMetadataHandler.java index a0559cb..b60dc097 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryCachingMetadataHandler.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryCachingMetadataHandler.java @@ -46,24 +46,29 @@ public class BinaryCachingMetadataHandler implements BinaryMetadataHandler { } /** {@inheritDoc} */ -@Override public synchronized void addMeta(int typeId, BinaryType type, boolean failIfUnregistered) throws BinaryObjectException { -synchronized (this) { -BinaryType oldType = metas.put(typeId, type); +@Override public synchronized void addMeta(int typeId, BinaryType type, +boolean failIfUnregistered) throws BinaryObjectException { +BinaryType oldType = metas.put(typeId, type); -if (oldType != null) { -BinaryMetadata oldMeta = ((BinaryTypeImpl)oldType).metadata(); -BinaryMetadata newMeta = ((BinaryTypeImpl)type).metadata(); +if (oldType != null) { +BinaryMetadata oldMeta = ((BinaryTypeImpl)oldType).metadata(); +BinaryMetadata newMeta = ((BinaryTypeImpl)type).metadata(); -BinaryMetadata mergedMeta = BinaryUtils.mergeMetadata(oldMeta
[15/50] [abbrv] ignite git commit: IGNITE-9082 Throwing checked exception during tx commit without node stopping leads to data corruption - Fixes #4809.
IGNITE-9082 Throwing checked exception during tx commit without node stopping leads to data corruption - Fixes #4809. Signed-off-by: Ivan Rakov Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5eb871e1 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5eb871e1 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5eb871e1 Branch: refs/heads/ignite-gg-14206 Commit: 5eb871e191a14fc21f6e2c62bdfa742e27c14695 Parents: 829dc1f Author: Aleksei Scherbakov Authored: Thu Oct 18 14:52:34 2018 +0300 Committer: Ivan Rakov Committed: Thu Oct 18 14:52:34 2018 +0300 -- .../processors/cache/GridCacheMapEntry.java | 5 - .../cache/GridCacheSharedContext.java | 9 + .../GridDistributedTxRemoteAdapter.java | 535 +-- .../distributed/dht/GridDhtTxFinishFuture.java | 11 +- .../cache/distributed/dht/GridDhtTxLocal.java | 10 +- .../distributed/dht/GridDhtTxLocalAdapter.java | 3 + .../distributed/dht/GridDhtTxPrepareFuture.java | 59 +- .../near/GridNearTxFinishFuture.java| 38 +- .../cache/distributed/near/GridNearTxLocal.java | 2 +- .../cache/transactions/IgniteTxAdapter.java | 31 ++ .../cache/transactions/IgniteTxHandler.java | 119 ++--- .../transactions/IgniteTxLocalAdapter.java | 519 +- .../processors/failure/FailureProcessor.java| 8 + .../org/apache/ignite/spi/IgniteSpiAdapter.java | 1 - .../cache/GridCacheAbstractSelfTest.java| 9 +- .../cache/query/IndexingSpiQuerySelfTest.java | 66 +-- .../cache/query/IndexingSpiQueryTxSelfTest.java | 74 +-- .../AbstractTransactionIntergrityTest.java | 111 ++-- ...IntegrityWithPrimaryIndexCorruptionTest.java | 268 ++ ...ctionIntegrityWithSystemWorkerDeathTest.java | 6 +- .../TxDataConsistencyOnCommitFailureTest.java | 234 .../junits/common/GridCommonAbstractTest.java | 19 +- .../testsuites/IgniteCacheTestSuite9.java | 3 + 23 files changed, 1220 insertions(+), 920 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/5eb871e1/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 9bb8aec..ab5b725 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 @@ -2906,11 +2906,6 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme ver = newVer; flags &= ~IS_EVICT_DISABLED; -if (cctx.mvccEnabled()) -cctx.offheap().mvccRemoveAll(this); -else -removeValue(); - onInvalidate(); return obsoleteVersionExtras() != null; http://git-wip-us.apache.org/repos/asf/ignite/blob/5eb871e1/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 52d8525..b5cd82b 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 @@ -1141,4 +1141,13 @@ public class GridCacheSharedContext { public void readOnlyMode(boolean readOnlyMode) { this.readOnlyMode = readOnlyMode; } + +/** + * For test purposes. + * @param txMgr Tx manager. + */ +public void setTxManager(IgniteTxManager txMgr) { +this.txMgr = txMgr; +} + } http://git-wip-us.apache.org/repos/asf/ignite/blob/5eb871e1/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java index 7313197..4db4685 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java +++ b/modu
[24/50] [abbrv] ignite git commit: IGNITE-9932 Ignoring exchanger critical section begin/end if called from illegal thread. - Fixes #5026.
IGNITE-9932 Ignoring exchanger critical section begin/end if called from illegal thread. - Fixes #5026. Signed-off-by: Alexey Goncharuk Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f156631c Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f156631c Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f156631c Branch: refs/heads/ignite-gg-14206 Commit: f156631cdd4c1b69327f76df744b27d03f575b5c Parents: 3bb0344 Author: Andrey Kuznetsov Authored: Mon Oct 22 10:33:09 2018 +0300 Committer: Alexey Goncharuk Committed: Mon Oct 22 10:33:09 2018 +0300 -- .../cache/GridCachePartitionExchangeManager.java | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/f156631c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java index 0b8dd75..8b8efa3 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java @@ -2348,9 +2348,8 @@ public class GridCachePartitionExchangeManager extends GridCacheSharedMana * Should be called from exchange worker thread. */ public void exchangerBlockingSectionBegin() { -assert exchWorker != null && Thread.currentThread() == exchWorker.runner(); - -exchWorker.blockingSectionBegin(); +if (currentThreadIsExchanger()) +exchWorker.blockingSectionBegin(); } /** @@ -2358,9 +2357,13 @@ public class GridCachePartitionExchangeManager extends GridCacheSharedMana * Should be called from exchange worker thread. */ public void exchangerBlockingSectionEnd() { -assert exchWorker != null && Thread.currentThread() == exchWorker.runner(); +if (currentThreadIsExchanger()) +exchWorker.blockingSectionEnd(); +} -exchWorker.blockingSectionEnd(); +/** */ +private boolean currentThreadIsExchanger() { +return exchWorker != null && Thread.currentThread() == exchWorker.runner(); } /**
[10/50] [abbrv] ignite git commit: IGNITE-9908: Python client: fixed long data type processing. This closes #5017.
IGNITE-9908: Python client: fixed long data type processing. This closes #5017. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1b698100 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1b698100 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1b698100 Branch: refs/heads/ignite-gg-14206 Commit: 1b6981000b6fd581608d3db7fd280d6ddd1361a2 Parents: b3688dd Author: Dmitry Melnichuk Authored: Thu Oct 18 11:09:37 2018 +0300 Committer: devozerov Committed: Thu Oct 18 11:09:37 2018 +0300 -- modules/platforms/python/pyignite/datatypes/primitive.py | 2 +- .../platforms/python/pyignite/datatypes/primitive_objects.py | 2 +- modules/platforms/python/pyignite/datatypes/standard.py| 6 +++--- modules/platforms/python/pyignite/queries/__init__.py | 6 +++--- modules/platforms/python/setup.py | 6 +- 5 files changed, 13 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/1b698100/modules/platforms/python/pyignite/datatypes/primitive.py -- diff --git a/modules/platforms/python/pyignite/datatypes/primitive.py b/modules/platforms/python/pyignite/datatypes/primitive.py index 73f096d..94c8fe3 100644 --- a/modules/platforms/python/pyignite/datatypes/primitive.py +++ b/modules/platforms/python/pyignite/datatypes/primitive.py @@ -66,7 +66,7 @@ class Int(Primitive): class Long(Primitive): -c_type = ctypes.c_long +c_type = ctypes.c_longlong class Float(Primitive): http://git-wip-us.apache.org/repos/asf/ignite/blob/1b698100/modules/platforms/python/pyignite/datatypes/primitive_objects.py -- diff --git a/modules/platforms/python/pyignite/datatypes/primitive_objects.py b/modules/platforms/python/pyignite/datatypes/primitive_objects.py index 53b54b3..4e37ce1 100644 --- a/modules/platforms/python/pyignite/datatypes/primitive_objects.py +++ b/modules/platforms/python/pyignite/datatypes/primitive_objects.py @@ -97,7 +97,7 @@ class IntObject(DataObject): class LongObject(DataObject): -c_type = ctypes.c_long +c_type = ctypes.c_longlong type_code = TC_LONG pythonic = int default = 0 http://git-wip-us.apache.org/repos/asf/ignite/blob/1b698100/modules/platforms/python/pyignite/datatypes/standard.py -- diff --git a/modules/platforms/python/pyignite/datatypes/standard.py b/modules/platforms/python/pyignite/datatypes/standard.py index 160e06e..6109c7a 100644 --- a/modules/platforms/python/pyignite/datatypes/standard.py +++ b/modules/platforms/python/pyignite/datatypes/standard.py @@ -297,7 +297,7 @@ class TimestampObject(StandardObject): '_pack_': 1, '_fields_': [ ('type_code', ctypes.c_byte), -('epoch', ctypes.c_long), +('epoch', ctypes.c_longlong), ('fraction', ctypes.c_int), ], } @@ -353,7 +353,7 @@ class DateObject(StandardObject): '_pack_': 1, '_fields_': [ ('type_code', ctypes.c_byte), -('epoch', ctypes.c_long), +('epoch', ctypes.c_longlong), ], } ) @@ -405,7 +405,7 @@ class TimeObject(StandardObject): '_pack_': 1, '_fields_': [ ('type_code', ctypes.c_byte), -('value', ctypes.c_long), +('value', ctypes.c_longlong), ], } ) http://git-wip-us.apache.org/repos/asf/ignite/blob/1b698100/modules/platforms/python/pyignite/queries/__init__.py -- diff --git a/modules/platforms/python/pyignite/queries/__init__.py b/modules/platforms/python/pyignite/queries/__init__.py index f43d60e..2c2d254 100644 --- a/modules/platforms/python/pyignite/queries/__init__.py +++ b/modules/platforms/python/pyignite/queries/__init__.py @@ -54,7 +54,7 @@ class Response: '_pack_': 1, '_fields_': [ ('length', ctypes.c_int), -('query_id', ctypes.c_long), +('query_id', ctypes.c_longlong), ('status_code', ctypes.c_int), ], }, @@ -239,7 +239,7 @@ class Query: '_fields_': [ ('length', ctypes.c_int),
[13/50] [abbrv] ignite git commit: IGNITE-9082 Throwing checked exception during tx commit without node stopping leads to data corruption - Fixes #4809.
http://git-wip-us.apache.org/repos/asf/ignite/blob/5eb871e1/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDataConsistencyOnCommitFailureTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDataConsistencyOnCommitFailureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDataConsistencyOnCommitFailureTest.java new file mode 100644 index 000..881c680 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDataConsistencyOnCommitFailureTest.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.transactions; + +import java.util.UUID; +import java.util.function.Supplier; +import org.apache.ignite.Ignite; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.IgniteTransactions; +import org.apache.ignite.cache.CacheAtomicityMode; +import org.apache.ignite.cache.CacheMode; +import org.apache.ignite.cache.CacheWriteSynchronizationMode; +import org.apache.ignite.configuration.CacheConfiguration; +import org.apache.ignite.configuration.IgniteConfiguration; +import org.apache.ignite.internal.IgniteEx; +import org.apache.ignite.internal.managers.communication.GridIoPolicy; +import org.apache.ignite.internal.processors.cache.GridCacheSharedContext; +import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal; +import org.apache.ignite.internal.util.typedef.G; +import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.apache.ignite.testsuites.IgniteIgnore; +import org.apache.ignite.transactions.Transaction; +import org.apache.ignite.transactions.TransactionConcurrency; +import org.apache.ignite.transactions.TransactionIsolation; +import org.jetbrains.annotations.Nullable; +import org.mockito.Mockito; +import org.mockito.invocation.InvocationOnMock; +import org.mockito.stubbing.Answer; + +/** + * Tests data consistency if transaction is failed due to heuristic exception on originating node. + */ +public class TxDataConsistencyOnCommitFailureTest extends GridCommonAbstractTest { +/** */ +public static final int KEY = 0; + +/** */ +public static final String CLIENT = "client"; + +/** */ +private int nodesCnt; + +/** */ +private int backups; + +/** {@inheritDoc} */ +@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { +IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); + +cfg.setClientMode(igniteInstanceName.startsWith(CLIENT)); + +cfg.setCacheConfiguration(new CacheConfiguration(DEFAULT_CACHE_NAME). +setCacheMode(CacheMode.PARTITIONED). +setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL). +setBackups(backups). + setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC)); + +return cfg; +} + +/** {@inheritDoc} */ +@Override protected void afterTest() throws Exception { +super.afterTest(); + +stopAllGrids(); +} + +/** */ +public void testCommitErrorOnNearNode2PC() throws Exception { +nodesCnt = 3; + +backups = 2; + +doTestCommitError(() -> { +try { +return startGrid("client"); +} +catch (Exception e) { +throw new RuntimeException(e); +} +}); +} + +/** */ +public void testCommitErrorOnNearNode1PC() throws Exception { +nodesCnt = 2; + +backups = 1; + +doTestCommitError(() -> { +try { +return startGrid("client"); +} +catch (Exception e) { +throw new RuntimeException(e); +} +}); +} + +/** */ +@IgniteIgnore(value = "https://issues.apache.org/jira/browse/IGNITE-9806";, forceFailure = false) +public void testCommitErrorOnColocatedNode2PC() throws Exception { +nodesCnt =
[06/50] [abbrv] ignite git commit: IGNITE-9922 Python thin included in binary release
IGNITE-9922 Python thin included in binary release This closes #5015 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/03cac751 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/03cac751 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/03cac751 Branch: refs/heads/ignite-gg-14206 Commit: 03cac751c36880fe01f3c66f7112738a72e7300b Parents: 091ace9 Author: Peter Ivanov Authored: Wed Oct 17 19:55:48 2018 +0300 Committer: Igor Sapego Committed: Wed Oct 17 19:55:48 2018 +0300 -- assembly/release-apache-ignite-base.xml | 29 +++- 1 file changed, 28 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/03cac751/assembly/release-apache-ignite-base.xml -- diff --git a/assembly/release-apache-ignite-base.xml b/assembly/release-apache-ignite-base.xml index ca8562c..91baf73 100644 --- a/assembly/release-apache-ignite-base.xml +++ b/assembly/release-apache-ignite-base.xml @@ -69,6 +69,22 @@ /platforms/php + + +modules/platforms/python/LICENSE +/platforms/python + + + +modules/platforms/python/README.md +/platforms/python + + + +modules/platforms/python/setup.py +/platforms/python + + assembly/LICENSE_IGNITE @@ -225,7 +241,7 @@ /platforms/nodejs/examples - + modules/platforms/php/src /platforms/php/src @@ -236,6 +252,17 @@ /platforms/php/examples + + +modules/platforms/python/pyignite +/platforms/python/pyignite + + + +modules/platforms/python/requirements +/platforms/python/requirements + + bin
[18/50] [abbrv] ignite git commit: IGNITE-9875 Added missing licence
IGNITE-9875 Added missing licence Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5427c098 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5427c098 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5427c098 Branch: refs/heads/ignite-gg-14206 Commit: 5427c098be057027afccc031468f1fb2e32ac7e7 Parents: 177d571 Author: Alexey Goncharuk Authored: Fri Oct 19 10:39:17 2018 +0300 Committer: Alexey Goncharuk Committed: Fri Oct 19 10:39:17 2018 +0300 -- .../GridDhtPartitionsStateValidatorBenchmark.java | 17 + 1 file changed, 17 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/5427c098/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/misc/GridDhtPartitionsStateValidatorBenchmark.java -- diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/misc/GridDhtPartitionsStateValidatorBenchmark.java b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/misc/GridDhtPartitionsStateValidatorBenchmark.java index 151606d..f3bbcb9 100644 --- a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/misc/GridDhtPartitionsStateValidatorBenchmark.java +++ b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/misc/GridDhtPartitionsStateValidatorBenchmark.java @@ -1,3 +1,20 @@ +/* + * 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.benchmarks.jmh.misc; import com.google.common.collect.Lists;
[14/50] [abbrv] ignite git commit: IGNITE-9082 Throwing checked exception during tx commit without node stopping leads to data corruption - Fixes #4809.
http://git-wip-us.apache.org/repos/asf/ignite/blob/5eb871e1/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 775b61c..7e04292 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 @@ -558,7 +558,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig /** {@inheritDoc} */ @SuppressWarnings({"CatchGenericClass"}) -@Override public final void userCommit() throws IgniteCheckedException { +@Override public void userCommit() throws IgniteCheckedException { TransactionState state = state(); if (state != COMMITTING) { @@ -590,7 +590,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig WALPointer ptr = null; -Exception err = null; +IgniteCheckedException err = null; cctx.database().checkpointReadLock(); @@ -609,176 +609,175 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig UUID nodeId = txEntry.nodeId() == null ? this.nodeId : txEntry.nodeId(); -try { -while (true) { -try { -GridCacheEntryEx cached = txEntry.cached(); +while (true) { +try { +GridCacheEntryEx cached = txEntry.cached(); -// Must try to evict near entries before committing from -// transaction manager to make sure locks are held. -if (!evictNearEntry(txEntry, false)) { -if (cacheCtx.isNear() && cacheCtx.dr().receiveEnabled()) { -cached.markObsolete(xidVer); +// Must try to evict near entries before committing from +// transaction manager to make sure locks are held. +if (!evictNearEntry(txEntry, false)) { +if (cacheCtx.isNear() && cacheCtx.dr().receiveEnabled()) { +cached.markObsolete(xidVer); -break; -} +break; +} -if (cached.detached()) -break; +if (cached.detached()) +break; -boolean updateNearCache = updateNearCache(cacheCtx, txEntry.key(), topVer); +boolean updateNearCache = updateNearCache(cacheCtx, txEntry.key(), topVer); -boolean metrics = true; +boolean metrics = true; -if (!updateNearCache && cacheCtx.isNear() && txEntry.locallyMapped()) -metrics = false; +if (!updateNearCache && cacheCtx.isNear() && txEntry.locallyMapped()) +metrics = false; -boolean evt = !isNearLocallyMapped(txEntry, false); +boolean evt = !isNearLocallyMapped(txEntry, false); -if (!F.isEmpty(txEntry.entryProcessors()) || !F.isEmpty(txEntry.filters())) -txEntry.cached().unswap(false); +if (!F.isEmpty(txEntry.entryProcessors()) || !F.isEmpty(txEntry.filters())) +txEntry.cached().unswap(false); -IgniteBiTuple res = applyTransformClosures(txEntry, -true, null); +IgniteBiTuple res = applyTransformClosures(txEntry, +true, null); -GridCacheVersion dhtVer = null; +GridCacheVersion dhtVer = null; -// For near local transactions we must record DHT version -// in order to keep near entries on backup nodes until -
[02/50] [abbrv] ignite git commit: IGNITE-9882: Hadoop: fixed OOME on TC. This closes #5003.
IGNITE-9882: Hadoop: fixed OOME on TC. This closes #5003. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/cb0d1de3 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/cb0d1de3 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/cb0d1de3 Branch: refs/heads/ignite-gg-14206 Commit: cb0d1de30c44fb333f5ea7c4db087015a7cfe8b5 Parents: 8828c1d Author: tledkov-gridgain Authored: Wed Oct 17 17:11:09 2018 +0300 Committer: devozerov Committed: Wed Oct 17 17:11:09 2018 +0300 -- .../apache/ignite/internal/IgniteKernal.java| 4 ++ .../processors/hadoop/HadoopHelper.java | 5 ++ .../processors/hadoop/HadoopNoopHelper.java | 5 ++ .../internal/processors/igfs/IgfsImpl.java | 3 ++ .../processors/hadoop/HadoopHelperImpl.java | 8 ++- .../impl/HadoopAbstractMapReduceTest.java | 18 +++ .../taskexecutor/HadoopExecutorServiceTest.java | 52 ++-- 7 files changed, 45 insertions(+), 50 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/cb0d1de3/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 7f4310f..c6ec9be 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 @@ -2289,6 +2289,9 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { } } +if (ctx.hadoopHelper() != null) +ctx.hadoopHelper().close(); + if (starveTask != null) starveTask.close(); @@ -2377,6 +2380,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { MarshallerExclusions.clearCache(); BinaryEnumCache.clear(); + gw.writeLock(); try { http://git-wip-us.apache.org/repos/asf/ignite/blob/cb0d1de3/modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopHelper.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopHelper.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopHelper.java index 7936fef..ae9985d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopHelper.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopHelper.java @@ -59,4 +59,9 @@ public interface HadoopHelper { * @return Work directory. */ public String workDirectory(); + +/** + * Close helper. + */ +public void close(); } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/cb0d1de3/modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopNoopHelper.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopNoopHelper.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopNoopHelper.java index f8f870f..986af1f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopNoopHelper.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopNoopHelper.java @@ -62,6 +62,11 @@ public class HadoopNoopHelper implements HadoopHelper { throw unsupported(); } +/** {@inheritDoc} */ +@Override public void close() { +// No-op. +} + /** * @return Exception. */ http://git-wip-us.apache.org/repos/asf/ignite/blob/cb0d1de3/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java index ff53e00..bac536d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java @@ -276,6 +276,9 @@ public final class IgfsImpl implements IgfsEx { // Restore interrupted flag. if (interrupted) Thread.currentThread().interrupt(); + +if (dualPool != null) +dualPool.shutdownNow(); } /** http://git-wip-us.apache.org/repos/asf/ignite/blob/cb0d1de3/
[04/50] [abbrv] ignite git commit: IGNITE-9710 Exchange worker liveness checking improvements
IGNITE-9710 Exchange worker liveness checking improvements Signed-off-by: Andrey Gura Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/2bdc8982 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/2bdc8982 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/2bdc8982 Branch: refs/heads/ignite-gg-14206 Commit: 2bdc8982796626f41f39f7ae28af12966b04a24f Parents: e0e02ab Author: Andrey Kuznetsov Authored: Wed Oct 17 17:25:54 2018 +0300 Committer: Andrey Gura Committed: Wed Oct 17 17:25:54 2018 +0300 -- .../cache/CacheAffinitySharedManager.java | 35 +- .../processors/cache/GridCacheMvccManager.java | 2 + .../GridCachePartitionExchangeManager.java | 7 + .../processors/cache/GridCacheProcessor.java| 6 + .../GridDhtPartitionsExchangeFuture.java| 366 +++ 5 files changed, 341 insertions(+), 75 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/2bdc8982/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java index 9cbceb1..cedbde1 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java @@ -41,7 +41,6 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.events.DiscoveryEvent; import org.apache.ignite.events.Event; import org.apache.ignite.internal.IgniteInternalFuture; -import org.apache.ignite.internal.IgniteInterruptedCheckedException; import org.apache.ignite.internal.cluster.ClusterTopologyServerNotFoundException; import org.apache.ignite.internal.events.DiscoveryCustomEvent; import org.apache.ignite.internal.managers.discovery.DiscoCache; @@ -729,6 +728,8 @@ public class CacheAffinitySharedManager extends GridCacheSharedManagerAdap return; aff.clientEventTopologyChange(evts.lastEvent(), evts.topologyVersion()); + +cctx.exchange().exchangerUpdateHeartbeat(); } }); } @@ -1154,6 +1155,8 @@ public class CacheAffinitySharedManager extends GridCacheSharedManagerAdap } else aff.clientEventTopologyChange(exchFut.firstEvent(), topVer); + +cctx.exchange().exchangerUpdateHeartbeat(); } }); } @@ -1174,6 +1177,8 @@ public class CacheAffinitySharedManager extends GridCacheSharedManagerAdap AffinityTopologyVersion topVer = fut.initialVersion(); aff.clientEventTopologyChange(fut.firstEvent(), topVer); + +cctx.exchange().exchangerUpdateHeartbeat(); } }); } @@ -1318,16 +1323,22 @@ public class CacheAffinitySharedManager extends GridCacheSharedManagerAdap @Override public void applyx(CacheGroupDescriptor desc) throws IgniteCheckedException { CacheGroupHolder cache = groupHolder(fut.initialVersion(), desc); -if (cache.affinity().lastVersion().equals(AffinityTopologyVersion.NONE)) +if (cache.affinity().lastVersion().equals(AffinityTopologyVersion.NONE)) { calculateAndInit(fut.events(), cache.affinity(), fut.initialVersion()); + +cctx.exchange().exchangerUpdateHeartbeat(); +} } }); } else { forAllCacheGroups(false, new IgniteInClosureX() { @Override public void applyx(GridAffinityAssignmentCache aff) throws IgniteCheckedException { -if (aff.lastVersion().equals(AffinityTopologyVersion.NONE)) +if (aff.lastVersion().equals(AffinityTopologyVersion.NONE)) { initAffinity(cachesRegistry.group(aff.groupId()), aff, fut); + +cctx.exchange().exchangerUpdateHeartbeat(); +} } }); } @@ -1662,6 +1673,8 @@ public class CacheAffinitySharedManager extends GridCacheSharedManagerAdap CacheGroupHolder grpHolder = groupHolder(topVer, desc); calculateAndInit(fut.events(), grpHolder.affinity(), topVer); + +cctx.exchange().exchangerUpdateHeartbeat(); }
[39/50] [abbrv] ignite git commit: IGNITE-9960: SQL: Reverted IGNITE-9171 and IGNITE-9864 until performance is fixed. This closes #5045.
IGNITE-9960: SQL: Reverted IGNITE-9171 and IGNITE-9864 until performance is fixed. This closes #5045. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/75e414a4 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/75e414a4 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/75e414a4 Branch: refs/heads/ignite-gg-14206 Commit: 75e414a4ac53a36c421b31633723844faeb499af Parents: 7504880 Author: devozerov Authored: Tue Oct 23 10:33:26 2018 +0300 Committer: devozerov Committed: Tue Oct 23 10:33:26 2018 +0300 -- .../internal/jdbc2/JdbcConnectionSelfTest.java | 12 +- .../jdbc/thin/JdbcThinConnectionSelfTest.java | 38 +- .../jdbc/thin/JdbcThinDataSourceSelfTest.java | 12 +- .../apache/ignite/IgniteSystemProperties.java | 7 +- .../ignite/cache/query/SqlFieldsQuery.java | 20 +- .../jdbc/thin/ConnectionPropertiesImpl.java | 2 +- .../ignite/internal/jdbc2/JdbcConnection.java | 2 +- .../ignite/internal/util/IgniteUtils.java | 2 +- .../query/h2/H2ConnectionWrapper.java | 11 - .../internal/processors/query/h2/H2Utils.java | 15 - .../processors/query/h2/IgniteH2Indexing.java | 186 +++ .../processors/query/h2/ObjectPool.java | 97 .../processors/query/h2/ObjectPoolReusable.java | 58 --- .../query/h2/ThreadLocalObjectPool.java | 103 .../processors/query/h2/dml/UpdatePlan.java | 8 +- .../query/h2/opt/GridH2QueryContext.java| 33 +- .../processors/query/h2/opt/GridH2Table.java| 133 + .../query/h2/twostep/GridMapQueryExecutor.java | 498 +-- .../h2/twostep/GridReduceQueryExecutor.java | 16 +- .../query/h2/twostep/GridResultPage.java| 7 +- .../query/h2/twostep/MapNodeResults.java| 13 +- .../query/h2/twostep/MapQueryLazyWorker.java| 223 ++--- .../query/h2/twostep/MapQueryResult.java| 34 +- .../query/h2/twostep/MapQueryResults.java | 40 +- ...GridCacheLazyQueryPartitionsReleaseTest.java | 2 + .../IgniteCacheQueryH2IndexingLeakTest.java | 9 +- ...butedQueryStopOnCancelOrTimeoutSelfTest.java | 43 +- ...cheQueryAbstractDistributedJoinSelfTest.java | 5 - ...QueryNodeRestartDistributedJoinSelfTest.java | 14 +- ...nCancelOrTimeoutDistributedJoinSelfTest.java | 23 +- ...ynamicColumnsAbstractConcurrentSelfTest.java | 6 +- .../cache/index/H2ConnectionLeaksSelfTest.java | 2 +- .../processors/query/LazyQuerySelfTest.java | 202 +--- .../processors/query/h2/ObjectPoolSelfTest.java | 125 - .../query/h2/ThreadLocalObjectPoolSelfTest.java | 113 + .../h2/twostep/RetryCauseMessageSelfTest.java | 16 + .../IgniteCacheQuerySelfTestSuite.java | 4 +- .../ignite/cache/query/query_sql_fields.h | 4 +- .../cpp/odbc-test/src/configuration_test.cpp| 4 +- .../cpp/odbc/src/config/configuration.cpp | 2 +- .../Cache/Query/CacheQueriesTest.cs | 6 +- .../Query/Linq/CacheLinqTest.Introspection.cs | 2 - .../Client/Cache/SqlQueryTest.cs| 4 +- .../Cache/Query/SqlFieldsQuery.cs | 43 +- ...benchmark-native-sql-cache-select.properties | 96 .../benchmark-native-sql-select.properties | 17 +- .../ignite-localhost-sql-query-config.xml | 91 .../yardstick/IgniteAbstractBenchmark.java | 30 +- .../yardstick/IgniteBenchmarkArguments.java | 13 - .../yardstick/jdbc/AbstractNativeBenchmark.java | 3 - .../apache/ignite/yardstick/jdbc/JdbcUtils.java | 47 +- .../jdbc/NativeSqlCacheQueryRangeBenchmark.java | 145 -- .../jdbc/NativeSqlQueryRangeBenchmark.java | 13 +- 53 files changed, 848 insertions(+), 1806 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/75e414a4/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java -- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java index db0a959..d560d74 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java @@ -308,7 +308,7 @@ public class JdbcConnectionSelfTest extends GridCommonAbstractTest { assertTrue(((JdbcConnection)conn).isEnforceJoinOrder()); assertFalse(((JdbcConnection)conn).isDistributedJoins()); assertFalse(((JdbcConnection)conn).isCollocatedQuery()); -assertTrue(((JdbcConnection)conn).isLazy()); +assertFalse(((JdbcConnection)conn).isLazy()); ass
[16/50] [abbrv] ignite git commit: IGNITE-8570 Improved GridToStringLogger - Fixes #4786.
IGNITE-8570 Improved GridToStringLogger - Fixes #4786. Signed-off-by: Alexey Goncharuk Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a3b624d9 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a3b624d9 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a3b624d9 Branch: refs/heads/ignite-gg-14206 Commit: a3b624d9f34012eab1711dac14dc71af3c5bd9c4 Parents: 5eb871e Author: pereslegin-pa Authored: Thu Oct 18 19:08:44 2018 +0300 Committer: Alexey Goncharuk Committed: Thu Oct 18 19:08:44 2018 +0300 -- .../ignite/testframework/GridStringLogger.java | 3 + .../testframework/ListeningTestLogger.java | 205 + .../ignite/testframework/LogListener.java | 427 ++ .../test/ListeningTestLoggerTest.java | 428 +++ .../ignite/testsuites/IgniteBasicTestSuite.java | 3 + 5 files changed, 1066 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/a3b624d9/modules/core/src/test/java/org/apache/ignite/testframework/GridStringLogger.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/GridStringLogger.java b/modules/core/src/test/java/org/apache/ignite/testframework/GridStringLogger.java index 9056dd6..0b09d3e 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/GridStringLogger.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/GridStringLogger.java @@ -26,7 +26,10 @@ import org.jetbrains.annotations.Nullable; /** * Logger which logs to string buffer. + * + * @deprecated Use {@link ListeningTestLogger} instead. */ +@Deprecated public class GridStringLogger implements IgniteLogger { /** Initial string builder capacity in bytes */ private static final int INITIAL = 1024 * 33; http://git-wip-us.apache.org/repos/asf/ignite/blob/a3b624d9/modules/core/src/test/java/org/apache/ignite/testframework/ListeningTestLogger.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/ListeningTestLogger.java b/modules/core/src/test/java/org/apache/ignite/testframework/ListeningTestLogger.java new file mode 100644 index 000..1b05f4c --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/testframework/ListeningTestLogger.java @@ -0,0 +1,205 @@ +/* + * 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.testframework; + +import java.util.Collection; +import java.util.concurrent.CopyOnWriteArraySet; +import java.util.function.Consumer; +import org.apache.ignite.IgniteLogger; +import org.apache.ignite.internal.util.typedef.X; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * Implementation of {@link org.apache.ignite.IgniteLogger} that performs any actions when certain message is logged. + * It can be useful in tests to ensure that a specific message was (or was not) printed to the log. + */ +public class ListeningTestLogger implements IgniteLogger { +/** + * If set to {@code true}, enables debug and trace log messages processing. + */ +private final boolean dbg; + +/** + * Logger to echo all messages, limited by {@code dbg} flag. + */ +private final IgniteLogger echo; + +/** + * Registered log messages listeners. + */ +private final Collection> lsnrs = new CopyOnWriteArraySet<>(); + +/** + * Default constructor. + */ +public ListeningTestLogger() { +this(false); +} + +/** + * @param dbg If set to {@code true}, enables debug and trace log messages processing. + */ +public ListeningTestLogger(boolean dbg) { +this(dbg, null); +} + +/** + * @param dbg If set to {@code true}, enables debug and trace log messages processing. + * @param echo Logger to echo all messages, limited by {@code dbg} flag. + */ +public ListeningTestLogger(boolean dbg,
[48/50] [abbrv] ignite git commit: IGNITE-9632: SQL: support IN statement with constants/params for partition pruning. This closes #4857.
IGNITE-9632: SQL: support IN statement with constants/params for partition pruning. This closes #4857. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/324e6e38 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/324e6e38 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/324e6e38 Branch: refs/heads/ignite-gg-14206 Commit: 324e6e38eb1ef042bbf3a506d523201266893050 Parents: d669da1 Author: devozerov Authored: Tue Oct 23 15:16:56 2018 +0300 Committer: devozerov Committed: Tue Oct 23 15:16:56 2018 +0300 -- .../apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java | 4 .../apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/324e6e38/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java index 7633d2a..f29a79b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java @@ -186,6 +186,7 @@ import org.apache.ignite.internal.processors.query.h2.sql.BaseH2CompareQueryTest import org.apache.ignite.internal.processors.query.h2.sql.GridQueryParsingTest; import org.apache.ignite.internal.processors.query.h2.sql.H2CompareBigQueryDistributedJoinsTest; import org.apache.ignite.internal.processors.query.h2.sql.H2CompareBigQueryTest; +import org.apache.ignite.internal.processors.query.h2.twostep.InOperationExtractPartitionSelfTest; import org.apache.ignite.internal.processors.sql.IgniteCachePartitionedAtomicColumnConstraintsTest; import org.apache.ignite.internal.processors.sql.IgniteCachePartitionedTransactionalColumnConstraintsTest; import org.apache.ignite.internal.processors.sql.IgniteCacheReplicatedAtomicColumnConstraintsTest; @@ -486,6 +487,9 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite { suite.addTestSuite(IgniteSqlGroupConcatCollocatedTest.class); suite.addTestSuite(IgniteSqlGroupConcatNotCollocatedTest.class); +// Partition pruning. +suite.addTestSuite(InOperationExtractPartitionSelfTest.class); + return suite; } } http://git-wip-us.apache.org/repos/asf/ignite/blob/324e6e38/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java index ac8d10a..dba046b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java @@ -54,7 +54,6 @@ import org.apache.ignite.internal.processors.query.h2.twostep.CacheQueryMemoryLe import org.apache.ignite.internal.processors.query.h2.twostep.CreateTableWithDateKeySelfTest; import org.apache.ignite.internal.processors.query.h2.twostep.DisappearedCacheCauseRetryMessageSelfTest; import org.apache.ignite.internal.processors.query.h2.twostep.DisappearedCacheWasNotFoundMessageSelfTest; -import org.apache.ignite.internal.processors.query.h2.twostep.InOperationExtractPartitionSelfTest; import org.apache.ignite.internal.processors.query.h2.twostep.NonCollocatedRetryMessageSelfTest; import org.apache.ignite.internal.processors.query.h2.twostep.RetryCauseMessageSelfTest; import org.apache.ignite.internal.processors.query.h2.twostep.TableViewSubquerySelfTest; @@ -124,8 +123,6 @@ public class IgniteCacheQuerySelfTestSuite2 extends TestSuite { suite.addTestSuite(DisappearedCacheCauseRetryMessageSelfTest.class); suite.addTestSuite(DisappearedCacheWasNotFoundMessageSelfTest.class); -suite.addTestSuite(InOperationExtractPartitionSelfTest.class); - suite.addTestSuite(TableViewSubquerySelfTest.class); return suite;
[03/50] [abbrv] ignite git commit: IGNITE-9877 .NET: Fix AmbiguousMatchException in LINQ under .NET Core 2.1
IGNITE-9877 .NET: Fix AmbiguousMatchException in LINQ under .NET Core 2.1 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e0e02aba Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e0e02aba Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e0e02aba Branch: refs/heads/ignite-gg-14206 Commit: e0e02abaa58ed09ddd7e5eaf528b684dfcc21065 Parents: cb0d1de Author: Pavel Tupitsyn Authored: Wed Oct 17 17:20:37 2018 +0300 Committer: Pavel Tupitsyn Committed: Wed Oct 17 17:20:37 2018 +0300 -- .../Apache.Ignite.Core.Tests.DotNetCore.csproj | 4 +- .../Serializable/AdvancedSerializationTest.cs | 8 ++-- .../Binary/Serializable/SqlDmlTest.cs | 20 - .../Cache/CacheAbstractTest.cs | 45 ++-- .../Cache/Query/Linq/CacheLinqTest.Strings.cs | 10 ++--- .../Client/Cache/CacheTestSsl.cs| 2 +- .../Client/Cache/ScanQueryTest.cs | 4 +- .../Client/IgniteClientConfigurationTest.cs | 2 +- .../Compute/ComputeApiTest.JavaTask.cs | 2 +- .../Services/ServicesTest.cs| 2 +- .../Impl/Unmanaged/Jni/AppDomains.cs| 8 ++-- .../Impl/Unmanaged/Jni/Jvm.cs | 2 +- .../Impl/Unmanaged/Jni/JvmDll.cs| 8 ++-- .../Apache.Ignite.Linq/Impl/MethodVisitor.cs| 10 ++--- 14 files changed, 63 insertions(+), 64 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/e0e02aba/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.csproj -- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.csproj b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.csproj index e27f8b7..6550a7f 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.csproj +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.csproj @@ -107,7 +107,7 @@ - + @@ -184,7 +184,7 @@ - + http://git-wip-us.apache.org/repos/asf/ignite/blob/e0e02aba/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/Serializable/AdvancedSerializationTest.cs -- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/Serializable/AdvancedSerializationTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/Serializable/AdvancedSerializationTest.cs index 4a10922..d697e17 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/Serializable/AdvancedSerializationTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/Serializable/AdvancedSerializationTest.cs @@ -96,7 +96,7 @@ namespace Apache.Ignite.Core.Tests.Binary.Serializable Assert.AreEqual(expectedRes, jobResult.InnerXml); } -#if !NETCOREAPP2_0 // AppDomains are not supported in .NET Core +#if !NETCOREAPP2_0 && !NETCOREAPP2_1 // AppDomains are not supported in .NET Core /// /// Tests custom serialization binder. /// @@ -111,7 +111,7 @@ namespace Apache.Ignite.Core.Tests.Binary.Serializable for (var i = 0; i < count; i++) { dynamic val = Activator.CreateInstance(GenerateDynamicType()); - + val.Id = i; val.Name = "Name_" + i; @@ -143,7 +143,7 @@ namespace Apache.Ignite.Core.Tests.Binary.Serializable TypeAttributes.Class | TypeAttributes.Public | TypeAttributes.Serializable); typeBuilder.DefineField("Id", typeof (int), FieldAttributes.Public); - + typeBuilder.DefineField("Name", typeof (string), FieldAttributes.Public); return typeBuilder.CreateType(); @@ -258,4 +258,4 @@ namespace Apache.Ignite.Core.Tests.Binary.Serializable // No-op. } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/e0e02aba/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/Serializable/SqlDmlTest.cs -- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/Serializable/SqlDmlTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/Serializable/SqlDmlTest.cs index 0ffd068..005488a 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/Serializable/SqlDmlTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/Serializable/SqlDmlT
[05/50] [abbrv] ignite git commit: IGNITE-9272: j.u.zip.CRC32algo instead of PureJavaCrc32 - Fixes #4619.
IGNITE-9272: j.u.zip.CRC32algo instead of PureJavaCrc32 - Fixes #4619. Signed-off-by: Nikolay Izhikov Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/091ace90 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/091ace90 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/091ace90 Branch: refs/heads/ignite-gg-14206 Commit: 091ace90e56bac1f7bc76886a5dccff796cbe34e Parents: 2bdc898 Author: Evgeny Stanilovskiy Authored: Wed Oct 17 17:56:08 2018 +0300 Committer: Nikolay Izhikov Committed: Wed Oct 17 17:56:08 2018 +0300 -- .../benchmarks/jmh/algo/BenchmarkCRC.java | 95 + .../GridCacheDatabaseSharedManager.java | 4 +- .../cache/persistence/file/EncryptedFileIO.java | 7 +- .../cache/persistence/file/FilePageStore.java | 7 +- .../wal/FileWriteAheadLogManager.java | 4 +- .../wal/FsyncModeFileWriteAheadLogManager.java | 4 +- .../cache/persistence/wal/crc/FastCrc.java | 101 +++ .../persistence/wal/crc/PureJavaCrc32.java | 2 + .../cache/persistence/wal/io/FileInput.java | 10 +- .../persistence/wal/io/SimpleFileInput.java | 3 +- .../wal/serializer/RecordV1Serializer.java | 5 +- .../db/wal/crc/IgniteDataIntegrityTests.java| 6 +- .../wal/crc/IgnitePureJavaCrcCompatibility.java | 55 ++ .../ignite/testsuites/IgnitePdsTestSuite2.java | 2 + 14 files changed, 284 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/091ace90/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/algo/BenchmarkCRC.java -- diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/algo/BenchmarkCRC.java b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/algo/BenchmarkCRC.java new file mode 100644 index 000..5c922fe --- /dev/null +++ b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/algo/BenchmarkCRC.java @@ -0,0 +1,95 @@ +/* + * 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.benchmarks.jmh.algo; + +import org.apache.ignite.internal.processors.cache.persistence.wal.crc.FastCrc; +import org.apache.ignite.internal.processors.cache.persistence.wal.crc.PureJavaCrc32; +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.BenchmarkMode; +import org.openjdk.jmh.annotations.Fork; +import org.openjdk.jmh.annotations.Measurement; +import org.openjdk.jmh.annotations.OutputTimeUnit; +import org.openjdk.jmh.annotations.Setup; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; + +import java.nio.ByteBuffer; +import java.util.Random; + +import static java.util.concurrent.TimeUnit.NANOSECONDS; +import static org.openjdk.jmh.annotations.Mode.AverageTime; +import static org.openjdk.jmh.annotations.Scope.Thread; + +/** + * + */ +@State(Thread) +@OutputTimeUnit(NANOSECONDS) +@BenchmarkMode(AverageTime) +@Fork(value = 1, jvmArgsAppend = {"-XX:+UnlockDiagnosticVMOptions"}) +@Warmup(iterations = 5) +@Measurement(iterations = 5) +public class BenchmarkCRC { +/** */ +static final int SIZE = 1024; + +/** */ +static final int BUF_LEN = 4096; + +/** */ +@State(Thread) +public static class Context { +/** */ +final int[] results = new int[SIZE]; + +/** */ +final ByteBuffer bb = ByteBuffer.allocate(BUF_LEN); + +/** */ +@Setup +public void setup() { +new Random().ints(BUF_LEN, Byte.MIN_VALUE, Byte.MAX_VALUE).forEach(k -> bb.put((byte) k)); +} +} + +/** */ +@Benchmark +public int[] pureJavaCrc32(Context context) { +for (int i = 0; i < SIZE; i++) { +context.bb.rewind(); + +context.results[i] = PureJavaCrc32.calcCrc32(context.bb, BUF_LEN); +} + +return context.results; +} + +/** */ +@Benchmar
[25/50] [abbrv] ignite git commit: IGNITE-9659 Fixed testNonCollocatedRetryMessage flaky test - Fixes #5005.
IGNITE-9659 Fixed testNonCollocatedRetryMessage flaky test - Fixes #5005. Signed-off-by: Alexey Goncharuk Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6f287428 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6f287428 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6f287428 Branch: refs/heads/ignite-gg-14206 Commit: 6f2874285a9eb1132d589223a5aa2c8fa8891fb8 Parents: f156631 Author: NSAmelchev Authored: Mon Oct 22 13:29:44 2018 +0300 Committer: Alexey Goncharuk Committed: Mon Oct 22 13:29:44 2018 +0300 -- .../NonCollocatedRetryMessageSelfTest.java | 119 ++- 1 file changed, 62 insertions(+), 57 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/6f287428/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/NonCollocatedRetryMessageSelfTest.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/NonCollocatedRetryMessageSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/NonCollocatedRetryMessageSelfTest.java index c602225..e8f6624 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/NonCollocatedRetryMessageSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/NonCollocatedRetryMessageSelfTest.java @@ -22,19 +22,18 @@ import javax.cache.Cache; import javax.cache.CacheException; import org.apache.ignite.IgniteCache; import org.apache.ignite.IgniteException; -import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.cache.query.SqlQuery; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteInterruptedCheckedException; import org.apache.ignite.internal.managers.communication.GridIoMessage; -import org.apache.ignite.internal.processors.query.h2.twostep.msg.GridH2QueryRequest; +import org.apache.ignite.internal.processors.query.h2.twostep.msg.GridH2IndexRangeRequest; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.plugin.extensions.communication.Message; +import org.apache.ignite.spi.IgniteSpiException; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; -import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import static org.apache.ignite.IgniteSystemProperties.IGNITE_SQL_RETRY_TIMEOUT; @@ -44,23 +43,31 @@ import static org.apache.ignite.IgniteSystemProperties.IGNITE_SQL_RETRY_TIMEOUT; */ public class NonCollocatedRetryMessageSelfTest extends GridCommonAbstractTest { /** */ -private static final int NODES_COUNT = 3; +private static final int NODES_COUNT = 2; /** */ private static final String ORG = "org"; /** */ +private static final int TEST_SQL_RETRY_TIMEOUT = 500; + +/** */ +private String sqlRetryTimeoutBackup; + +/** */ private IgniteCache personCache; /** */ public void testNonCollocatedRetryMessage() { -SqlQuery qry = new SqlQuery(JoinSqlTestHelper.Person.class, JoinSqlTestHelper.JOIN_SQL).setArgs("Organization #0"); +SqlQuery qry = new SqlQuery( +JoinSqlTestHelper.Person.class, JoinSqlTestHelper.JOIN_SQL).setArgs("Organization #0"); qry.setDistributedJoins(true); try { -List> prsns = personCache.query(qry).getAll(); -fail("No CacheException emitted. Collection size="+prsns.size()); +List> prsns = personCache.query(qry).getAll(); + +fail("No CacheException emitted. Collection size=" + prsns.size()); } catch (CacheException e) { assertTrue(e.getMessage(), e.getMessage().contains("Failed to execute non-collocated query")); @@ -68,66 +75,35 @@ public class NonCollocatedRetryMessageSelfTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ -@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { -IgniteConfiguration cfg = super.getConfiguration(gridName); - -cfg.setCommunicationSpi(new TcpCommunicationSpi(){ -volatile long reqId = -1; -/** {@inheritDoc} */ -@Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure ackC) { -assert msg != null; - -if ( GridIoMessage.class.isAssignableFrom(msg.getClass())){ -
[09/50] [abbrv] ignite git commit: IGNITE-9918: Restore default-config.xml in the build. This closes #5014.
IGNITE-9918: Restore default-config.xml in the build. This closes #5014. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b3688ddf Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b3688ddf Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b3688ddf Branch: refs/heads/ignite-gg-14206 Commit: b3688ddf482e751e9a5626f0f83bcddf843c6aab Parents: ce73c9d Author: Peter Ivanov Authored: Thu Oct 18 10:56:34 2018 +0300 Committer: devozerov Committed: Thu Oct 18 10:56:34 2018 +0300 -- config/apache-ignite-lgpl/default-config.xml| 29 config/apache-ignite/default-config.xml | 29 config/fabric-lgpl/default-config.xml | 29 config/fabric/default-config.xml| 29 .../ignite/internal/GridFactorySelfTest.java| 9 -- 5 files changed, 58 insertions(+), 67 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/b3688ddf/config/apache-ignite-lgpl/default-config.xml -- diff --git a/config/apache-ignite-lgpl/default-config.xml b/config/apache-ignite-lgpl/default-config.xml new file mode 100644 index 000..5da95ba --- /dev/null +++ b/config/apache-ignite-lgpl/default-config.xml @@ -0,0 +1,29 @@ + + + + +http://www.springframework.org/schema/beans"; + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; + xsi:schemaLocation=" + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd";> + + + http://git-wip-us.apache.org/repos/asf/ignite/blob/b3688ddf/config/apache-ignite/default-config.xml -- diff --git a/config/apache-ignite/default-config.xml b/config/apache-ignite/default-config.xml new file mode 100644 index 000..5da95ba --- /dev/null +++ b/config/apache-ignite/default-config.xml @@ -0,0 +1,29 @@ + + + + +http://www.springframework.org/schema/beans"; + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; + xsi:schemaLocation=" + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd";> + + + http://git-wip-us.apache.org/repos/asf/ignite/blob/b3688ddf/config/fabric-lgpl/default-config.xml -- diff --git a/config/fabric-lgpl/default-config.xml b/config/fabric-lgpl/default-config.xml deleted file mode 100644 index 5da95ba..000 --- a/config/fabric-lgpl/default-config.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - -http://www.springframework.org/schema/beans"; - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; - xsi:schemaLocation=" - http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans.xsd";> - - - http://git-wip-us.apache.org/repos/asf/ignite/blob/b3688ddf/config/fabric/default-config.xml -- diff --git a/config/fabric/default-config.xml b/config/fabric/default-config.xml deleted file mode 100644 index 5da95ba..000 --- a/config/fabric/default-config.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - -http://www.springframework.org/schema/beans"; - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; - xsi:schemaLocation=" - http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans.xsd";> - - - http://git-wip-us.apache.org/repos/asf/ignite/blob/b3688ddf/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java -- diff --git a/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java b/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java index b453858..fd832a0 100644 --- a/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java @@ -148,15 +148,6 @@ public class GridFactorySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ -public void testStartFabricDefault() throws Exception { -try (Ignite ignite = Ignition.start("config/fabric/default-config.xml")) { -log.info("Started: " + ignite.name()); -} -} - -/** - * @throws Exception If failed. - */ public void testStartDefault() throws Exception { try (Ignite ignite = Ignition.start("config/default-config.xml")) { log.info("Started: " + ignite
[07/50] [abbrv] ignite git commit: IGNITE-9756 Fixed partition eviction deduplication logic - Fixes #4936.
IGNITE-9756 Fixed partition eviction deduplication logic - Fixes #4936. Signed-off-by: Alexey Goncharuk Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/aec3f91c Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/aec3f91c Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/aec3f91c Branch: refs/heads/ignite-gg-14206 Commit: aec3f91c22c26d3ceb56769d6d7a13a92c9036d4 Parents: 03cac75 Author: pereslegin-pa Authored: Wed Oct 17 19:58:29 2018 +0300 Committer: Alexey Goncharuk Committed: Wed Oct 17 19:58:29 2018 +0300 -- .../dht/topology/PartitionsEvictManager.java| 49 1 file changed, 20 insertions(+), 29 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/aec3f91c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/PartitionsEvictManager.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/PartitionsEvictManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/PartitionsEvictManager.java index 7f2a2a7..404e194 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/PartitionsEvictManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/PartitionsEvictManager.java @@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache.distributed.dht.topology; import java.util.Collection; import java.util.Comparator; +import java.util.HashSet; import java.util.Map; import java.util.Queue; import java.util.Set; @@ -31,7 +32,6 @@ import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.managers.communication.GridIoPolicy; import org.apache.ignite.internal.processors.cache.CacheGroupContext; import org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter; -import org.apache.ignite.internal.util.GridConcurrentHashSet; import org.apache.ignite.internal.util.future.GridFutureAdapter; import org.apache.ignite.internal.util.typedef.internal.LT; import org.apache.ignite.internal.util.typedef.internal.U; @@ -111,28 +111,28 @@ public class PartitionsEvictManager extends GridCacheSharedManagerAdapter { * @param part Partition to evict. */ public void evictPartitionAsync(CacheGroupContext grp, GridDhtLocalPartition part) { -// Check node stop. -if (sharedEvictionContext.shouldStop()) -return; - GroupEvictionContext groupEvictionContext = evictionGroupsMap.computeIfAbsent( grp.groupId(), (k) -> new GroupEvictionContext(grp)); -PartitionEvictionTask evictionTask = groupEvictionContext.createEvictPartitionTask(part); - -if (evictionTask == null) +// Check node stop. +if (groupEvictionContext.shouldStop()) return; -if (log.isDebugEnabled()) -log.debug("Partition has been scheduled for eviction [grp=" + grp.cacheOrGroupName() -+ ", p=" + part.id() + ", state=" + part.state() + "]"); - int bucket; synchronized (mux) { -bucket = evictionQueue.offer(evictionTask); +if (!groupEvictionContext.partIds.add(part.id())) +return; + +bucket = evictionQueue.offer(new PartitionEvictionTask(part, groupEvictionContext)); } +groupEvictionContext.totalTasks.incrementAndGet(); + +if (log.isDebugEnabled()) +log.debug("Partition has been scheduled for eviction [grp=" + grp.cacheOrGroupName() ++ ", p=" + part.id() + ", state=" + part.state() + "]"); + scheduleNextPartitionEviction(bucket); } @@ -271,7 +271,7 @@ public class PartitionsEvictManager extends GridCacheSharedManagerAdapter { private final CacheGroupContext grp; /** Deduplicate set partition ids. */ -private final Set partIds = new GridConcurrentHashSet<>(); +private final Set partIds = new HashSet<>(); /** Future for currently running partition eviction task. */ private final Map> partsEvictFutures = new ConcurrentHashMap<>(); @@ -299,19 +299,6 @@ public class PartitionsEvictManager extends GridCacheSharedManagerAdapter { /** * - * @param part Grid local partition. - */ -private PartitionEvictionTask createEvictPartitionTask(GridDhtLocalPartition part){ -if (shouldStop() || !partIds.add(part.id())) -return null; - -totalTasks.incrementAndGet(); - -return new PartitionEvicti
[29/50] [abbrv] ignite git commit: IGNITE-9694 Add tests to check that reading queries are not blocked on exchange events that don't change data visibility - Fixes #4926.
IGNITE-9694 Add tests to check that reading queries are not blocked on exchange events that don't change data visibility - Fixes #4926. Signed-off-by: Dmitriy Govorukhin Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3fae41b1 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3fae41b1 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3fae41b1 Branch: refs/heads/ignite-gg-14206 Commit: 3fae41b1fce89f2f05ff9027cdc37ed84f3a70a0 Parents: 3a4167a Author: ibessonov Authored: Mon Oct 22 14:59:19 2018 +0300 Committer: Dmitriy Govorukhin Committed: Mon Oct 22 14:59:19 2018 +0300 -- .../ignite/internal/util/IgniteUtils.java | 12 +- .../ignite/internal/util/lang/GridFunc.java |2 + .../distributed/CacheBlockOnGetAllTest.java | 196 +++ .../CacheBlockOnReadAbstractTest.java | 1277 ++ .../cache/distributed/CacheBlockOnScanTest.java | 73 + .../distributed/CacheBlockOnSingleGetTest.java | 190 +++ .../testframework/junits/GridAbstractTest.java | 33 + ...eBlockExchangeOnReadOperationsTestSuite.java | 51 + .../testsuites/IgniteCacheTestSuite7.java |2 +- .../CacheBlockOnCreateDestoryIndexTest.java | 480 +++ .../distributed/CacheBlockOnSqlQueryTest.java | 131 ++ ...ockExchangeOnSqlReadOperationsTestSuite.java | 39 + 12 files changed, 2475 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/3fae41b1/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java index d10a7c7..e6f374a 100755 --- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java @@ -8169,23 +8169,15 @@ public abstract class IgniteUtils { for (Class cls = obj.getClass(); cls != Object.class; cls = cls.getSuperclass()) { for (Field field : cls.getDeclaredFields()) { if (field.getName().equals(fieldName)) { -boolean accessible = field.isAccessible(); - field.setAccessible(true); -T val = (T)field.get(obj); - -if (!accessible) -field.setAccessible(false); - -return val; +return (T)field.get(obj); } } } } catch (Exception e) { -throw new IgniteException("Failed to get field value [fieldName=" + fieldName + ", obj=" + obj + ']', -e); +throw new IgniteException("Failed to get field value [fieldName=" + fieldName + ", obj=" + obj + ']', e); } throw new IgniteException("Failed to get field value [fieldName=" + fieldName + ", obj=" + obj + ']'); http://git-wip-us.apache.org/repos/asf/ignite/blob/3fae41b1/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java index ce5076b..3b3bbaa 100755 --- a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java @@ -94,6 +94,7 @@ import org.apache.ignite.internal.util.lang.gridfunc.TransformFilteringIterator; import org.apache.ignite.internal.util.lang.gridfunc.TransformMapView; import org.apache.ignite.internal.util.lang.gridfunc.TransformMapView2; import org.apache.ignite.internal.util.typedef.F; +import org.apache.ignite.internal.util.typedef.T2; import org.apache.ignite.internal.util.typedef.internal.A; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteBiClosure; @@ -2172,6 +2173,7 @@ public class GridFunc { * @param t2 Second object in pair. * @param Type of objects in pair. * @return Pair of objects. + * @deprecated Use {@link T2} instead. */ @Deprecated public static IgnitePair pair(@Nullable T t1, @Nullable T t2) { http://git-wip-us.apache.org/repos/asf/ignite/blob/3fae41b1/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnGetAllTest.java -- diff --git a/modules/core/src/test/java/org/apache/ign
[01/50] [abbrv] ignite git commit: IGNITE-9737 Added configuration parameters for system workers liveness checking
Repository: ignite Updated Branches: refs/heads/ignite-gg-14206 1a7a9c717 -> 1e91d477f IGNITE-9737 Added configuration parameters for system workers liveness checking Signed-off-by: Andrey Gura Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/8828c1d1 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/8828c1d1 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/8828c1d1 Branch: refs/heads/ignite-gg-14206 Commit: 8828c1d1910d209b9f520efcc8d256c6bc6b4251 Parents: 33b9611 Author: Andrey Kuznetsov Authored: Wed Oct 17 16:53:53 2018 +0300 Committer: Andrey Gura Committed: Wed Oct 17 16:58:07 2018 +0300 -- .../apache/ignite/IgniteSystemProperties.java | 11 + .../configuration/DataStorageConfiguration.java | 27 ++ .../configuration/IgniteConfiguration.java | 29 ++ .../apache/ignite/internal/IgniteKernal.java| 8 + .../org/apache/ignite/internal/IgnitionEx.java | 6 +- .../GridCacheDatabaseSharedManager.java | 139 +++--- .../IgniteCacheDatabaseSharedManager.java | 14 + .../processors/failure/FailureProcessor.java| 12 +- .../utils/PlatformConfigurationUtils.java | 42 ++- .../ignite/internal/util/IgniteUtils.java | 11 + .../worker/FailureHandlingMxBeanImpl.java | 73 ++ .../worker/WorkersControlMXBeanImpl.java| 10 - .../ignite/internal/worker/WorkersRegistry.java | 44 +++- .../ignite/mxbean/FailureHandlingMxBean.java| 47 .../ignite/mxbean/WorkersControlMXBean.java | 7 - .../FailureHandlingConfigurationTest.java | 262 +++ .../IgniteBasicWithPersistenceTestSuite.java| 2 + .../IgniteConfigurationTest.cs | 3 + .../Configuration/DataStorageConfiguration.cs | 7 + .../Apache.Ignite.Core/IgniteConfiguration.cs | 14 + .../IgniteConfigurationSection.xsd | 14 + 21 files changed, 697 insertions(+), 85 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/8828c1d1/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java index 02ebb25..521222c 100644 --- a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java +++ b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java @@ -1008,6 +1008,17 @@ public final class IgniteSystemProperties { public static final String IGNITE_REUSE_MEMORY_ON_DEACTIVATE = "IGNITE_REUSE_MEMORY_ON_DEACTIVATE"; /** + * Maximum inactivity period for system worker in milliseconds. When this value is exceeded, worker is considered + * blocked with consequent critical failure handler invocation. + */ +public static final String IGNITE_SYSTEM_WORKER_BLOCKED_TIMEOUT = "IGNITE_SYSTEM_WORKER_BLOCKED_TIMEOUT"; + +/** + * Timeout for checkpoint read lock acquisition in milliseconds. + */ +public static final String IGNITE_CHECKPOINT_READ_LOCK_TIMEOUT = "IGNITE_CHECKPOINT_READ_LOCK_TIMEOUT"; + +/** * Timeout for waiting schema update if schema was not found for last accepted version. */ public static final String IGNITE_WAIT_SCHEMA_UPDATE = "IGNITE_WAIT_SCHEMA_UPDATE"; http://git-wip-us.apache.org/repos/asf/ignite/blob/8828c1d1/modules/core/src/main/java/org/apache/ignite/configuration/DataStorageConfiguration.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/DataStorageConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/DataStorageConfiguration.java index 556e3cd..7bca0f9 100644 --- a/modules/core/src/main/java/org/apache/ignite/configuration/DataStorageConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/configuration/DataStorageConfiguration.java @@ -279,6 +279,9 @@ public class DataStorageConfiguration implements Serializable { */ private int walCompactionLevel = DFLT_WAL_COMPACTION_LEVEL; +/** Timeout for checkpoint read lock acquisition. */ +private Long checkpointReadLockTimeout; + /** * Initial size of a data region reserved for system cache. * @@ -983,6 +986,30 @@ public class DataStorageConfiguration implements Serializable { this.walCompactionLevel = walCompactionLevel; } +/** + * Returns timeout for checkpoint read lock acquisition. + * + * @see #setCheckpointReadLockTimeout(long) + * @return Returns timeout for checkpoint read lock acquisition in milliseconds. + */ +public Long getCheckpointReadLockTimeout(
[35/50] [abbrv] ignite git commit: IGNITE-9950 Python: Fixes for Decimal data type
IGNITE-9950 Python: Fixes for Decimal data type This closes #5041 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4bc08daa Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4bc08daa Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4bc08daa Branch: refs/heads/ignite-gg-14206 Commit: 4bc08daa0cea486d9d2caa616707000dad5a56dc Parents: d82b21e Author: Dmitry Melnichuk Authored: Mon Oct 22 18:25:31 2018 +0300 Committer: Igor Sapego Committed: Mon Oct 22 18:27:36 2018 +0300 -- .../python/pyignite/datatypes/standard.py | 34 ++-- modules/platforms/python/setup.py | 2 +- 2 files changed, 26 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/4bc08daa/modules/platforms/python/pyignite/datatypes/standard.py -- diff --git a/modules/platforms/python/pyignite/datatypes/standard.py b/modules/platforms/python/pyignite/datatypes/standard.py index 6109c7a..5f3af74 100644 --- a/modules/platforms/python/pyignite/datatypes/standard.py +++ b/modules/platforms/python/pyignite/datatypes/standard.py @@ -16,6 +16,7 @@ import ctypes from datetime import date, datetime, time, timedelta import decimal +from math import ceil import uuid from pyignite.constants import * @@ -163,7 +164,7 @@ class DecimalObject: { '_pack_': 1, '_fields_': [ -('data', ctypes.c_char * header.length), +('data', ctypes.c_ubyte * header.length), ], } ) @@ -179,12 +180,18 @@ class DecimalObject: return None sign = 1 if ctype_object.data[0] & 0x80 else 0 -data = bytes([ctype_object.data[0] & 0x7f]) + ctype_object.data[1:] -result = decimal.Decimal(data.decode(PROTOCOL_STRING_ENCODING)) +data = ctype_object.data[1:] +data.insert(0, ctype_object.data[0] & 0x7f) +# decode n-byte integer +result = sum([ +[x for x in reversed(data)][i] * 0x100 ** i for i in +range(len(data)) +]) # apply scale result = ( result -* decimal.Decimal('10') ** decimal.Decimal(ctype_object.scale) +/ decimal.Decimal('10') +** decimal.Decimal(ctype_object.scale) ) if sign: # apply sign @@ -197,12 +204,20 @@ class DecimalObject: return Null.from_python() sign, digits, scale = value.normalize().as_tuple() -data = bytearray([ord('0') + digit for digit in digits]) +integer = int(''.join([str(d) for d in digits])) +# calculate number of bytes (at least one, and not forget the sign bit) +length = ceil((integer.bit_length() + 1)/8) +# write byte string +data = [] +for i in range(length): +digit = integer % 0x100 +integer //= 0x100 +data.insert(0, digit) +# apply sign if sign: data[0] |= 0x80 else: data[0] &= 0x7f -length = len(digits) header_class = cls.build_c_header() data_class = type( cls.__name__, @@ -210,7 +225,7 @@ class DecimalObject: { '_pack_': 1, '_fields_': [ -('data', ctypes.c_char * length), +('data', ctypes.c_ubyte * length), ], } ) @@ -220,8 +235,9 @@ class DecimalObject: byteorder=PROTOCOL_BYTE_ORDER ) data_object.length = length -data_object.scale = scale -data_object.data = bytes(data) +data_object.scale = -scale +for i in range(length): +data_object.data[i] = data[i] return bytes(data_object) http://git-wip-us.apache.org/repos/asf/ignite/blob/4bc08daa/modules/platforms/python/setup.py -- diff --git a/modules/platforms/python/setup.py b/modules/platforms/python/setup.py index 5d14dae..7419c97 100644 --- a/modules/platforms/python/setup.py +++ b/modules/platforms/python/setup.py @@ -65,7 +65,7 @@ for section in requirement_sections: if is_a_requirement(line): requirements[section].append(line) -with open('README.md', 'r') as readme_file: +with open('README.md', 'r', encoding='utf-8') as readme_file: long_description = readme_file.read() setuptools.setup(
ignite git commit: Revert "IGNITE-5795 Register binary metadata during cache start - Fixes #4852."
Repository: ignite Updated Branches: refs/heads/master 324e6e38e -> 86f543713 Revert "IGNITE-5795 Register binary metadata during cache start - Fixes #4852." This reverts commit 3bb03444246f863096063d084393676a84d2bc0e. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/86f54371 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/86f54371 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/86f54371 Branch: refs/heads/master Commit: 86f543713b148541a6d497c4ab6404e7e7edf815 Parents: 324e6e3 Author: Alexey Goncharuk Authored: Tue Oct 23 17:54:24 2018 +0300 Committer: Alexey Goncharuk Committed: Tue Oct 23 17:54:24 2018 +0300 -- .../apache/ignite/internal/IgniteKernal.java| 2 +- .../binary/BinaryCachingMetadataHandler.java| 25 +- .../ignite/internal/binary/BinaryContext.java | 59 +--- .../internal/binary/BinaryMetadataHandler.java | 10 - .../binary/BinaryNoopMetadataHandler.java | 6 - .../binary/builder/BinaryObjectBuilderImpl.java | 2 +- .../internal/client/thin/TcpIgniteClient.java | 6 - .../processors/cache/GridCacheProcessor.java| 9 +- .../binary/CacheObjectBinaryProcessorImpl.java | 5 - .../processors/query/GridQueryProcessor.java| 77 + .../binary/TestCachingMetadataHandler.java | 6 - .../cache/CacheRegisterMetadataLocallyTest.java | 287 --- .../cache/index/AbstractSchemaSelfTest.java | 6 +- .../index/H2DynamicIndexAbstractSelfTest.java | 48 ++-- .../IgniteCacheWithIndexingTestSuite.java | 2 - 15 files changed, 56 insertions(+), 494 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/86f54371/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 1546da3..1f9a5e8 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 @@ -1005,7 +1005,6 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { // Start processors before discovery manager, so they will // be able to start receiving messages once discovery completes. try { -startProcessor(new GridMarshallerMappingProcessor(ctx)); startProcessor(new PdsConsistentIdProcessor(ctx)); startProcessor(new MvccProcessorImpl(ctx)); startProcessor(createComponent(DiscoveryNodeValidationProcessor.class, ctx)); @@ -1029,6 +1028,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { startProcessor(createHadoopComponent()); startProcessor(new DataStructuresProcessor(ctx)); startProcessor(createComponent(PlatformProcessor.class, ctx)); +startProcessor(new GridMarshallerMappingProcessor(ctx)); // Start plugins. for (PluginProvider provider : ctx.plugins().allProviders()) { http://git-wip-us.apache.org/repos/asf/ignite/blob/86f54371/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryCachingMetadataHandler.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryCachingMetadataHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryCachingMetadataHandler.java index b60dc097..a0559cb 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryCachingMetadataHandler.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryCachingMetadataHandler.java @@ -46,29 +46,24 @@ public class BinaryCachingMetadataHandler implements BinaryMetadataHandler { } /** {@inheritDoc} */ -@Override public synchronized void addMeta(int typeId, BinaryType type, -boolean failIfUnregistered) throws BinaryObjectException { -BinaryType oldType = metas.put(typeId, type); +@Override public synchronized void addMeta(int typeId, BinaryType type, boolean failIfUnregistered) throws BinaryObjectException { +synchronized (this) { +BinaryType oldType = metas.put(typeId, type); -if (oldType != null) { -BinaryMetadata oldMeta = ((BinaryTypeImpl)oldType).metadata(); -BinaryMetadata newMeta = ((BinaryTypeImpl)type).metadata(); +if (oldType != null) { +BinaryMetadata oldMeta = ((BinaryTypeImpl)oldType).metadata(); +BinaryMetadata newMeta = ((Bin
ignite git commit: IGNITE-9632: SQL: support IN statement with constants/params for partition pruning. This closes #4857.
Repository: ignite Updated Branches: refs/heads/master d76ff5426 -> d669da154 IGNITE-9632: SQL: support IN statement with constants/params for partition pruning. This closes #4857. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d669da15 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d669da15 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d669da15 Branch: refs/heads/master Commit: d669da154f79e48a833a754a59606b65159406c3 Parents: d76ff54 Author: devozerov Authored: Tue Oct 23 15:15:23 2018 +0300 Committer: devozerov Committed: Tue Oct 23 15:15:23 2018 +0300 -- .../query/h2/sql/GridSqlQuerySplitter.java | 137 +++-- .../InOperationExtractPartitionSelfTest.java| 201 +++ .../query/h2/twostep/JoinSqlTestHelper.java | 9 +- .../IgniteCacheQuerySelfTestSuite2.java | 3 + 4 files changed, 331 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/d669da15/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java -- diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java index ca9c5bb..b19dd14 100644 --- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java +++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java @@ -53,6 +53,7 @@ import org.apache.ignite.internal.util.typedef.internal.S; import org.h2.command.Prepared; import org.h2.command.dml.Query; import org.h2.command.dml.SelectUnion; +import org.h2.table.Column; import org.h2.table.IndexColumn; import org.h2.value.Value; import org.jetbrains.annotations.Nullable; @@ -2342,6 +2343,64 @@ public class GridSqlQuerySplitter { return null; } +case IN: { +// Operation should contain at least two children: left (column) and right (const or column). +if (op.size() < 2) +return null; + +// Left operand should be column. +GridSqlAst left = op.child(); + +GridSqlColumn leftCol; + +if (left instanceof GridSqlColumn) +leftCol = (GridSqlColumn)left; +else +return null; + +// Can work only with Ignite's tables. +if (!(leftCol.column().getTable() instanceof GridH2Table)) +return null; + +CacheQueryPartitionInfo[] res = new CacheQueryPartitionInfo[op.size() - 1]; + +for (int i = 1; i < op.size(); i++) { +GridSqlAst right = op.child(i); + +GridSqlConst rightConst; +GridSqlParameter rightParam; + +if (right instanceof GridSqlConst) { +rightConst = (GridSqlConst)right; +rightParam = null; +} +else if (right instanceof GridSqlParameter) { +rightConst = null; +rightParam = (GridSqlParameter)right; +} +else +// One of members of "IN" list is neither const, nor param, so we do no know it's partition. +// As this is disjunction, not knowing partition of a single element leads to unknown partition +// set globally. Hence, returning null. +return null; + +CacheQueryPartitionInfo cur = getCacheQueryPartitionInfo( +leftCol.column(), +rightConst, +rightParam, +ctx +); + +// Same thing as above: single unknown partition in disjunction defeats optimization. +if (cur == null) +return null; + +res[i - 1] = cur; +} + +return res; +} + default: return null; } @@ -2362,39 +2421,85 @@ public class GridSqlQuerySplitter { GridSqlElement left = op.child(0); GridSqlElement right = op.child(1); -if (!(left instanceof GridSqlColumn)) +GridSqlColumn leftCol; + +if (left instanceof GridSqlColumn) +leftCol = (GridSqlColumn)left; +else return null; -if
[9/9] ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-9720
Merge remote-tracking branch 'remotes/origin/master' into ignite-9720 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d98bfd95 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d98bfd95 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d98bfd95 Branch: refs/heads/ignite-9720 Commit: d98bfd955d3188c1685be42e842e806347ab0bb7 Parents: 23d4f72 d4af213 Author: sboikov Authored: Tue Oct 23 15:27:56 2018 +0300 Committer: sboikov Committed: Tue Oct 23 15:27:56 2018 +0300 -- .../internal/jdbc2/JdbcConnectionSelfTest.java | 12 +- .../jdbc/thin/JdbcThinConnectionSelfTest.java | 38 +- .../jdbc/thin/JdbcThinDataSourceSelfTest.java | 12 +- .../apache/ignite/IgniteSystemProperties.java | 7 +- .../ignite/cache/query/SqlFieldsQuery.java | 20 +- .../jdbc/thin/ConnectionPropertiesImpl.java | 2 +- .../ignite/internal/jdbc2/JdbcConnection.java | 2 +- .../dht/GridDhtTxAbstractEnlistFuture.java | 8 +- .../ignite/internal/util/IgniteUtils.java | 2 +- .../ignite/spi/discovery/tcp/ClientImpl.java| 10 +- .../IgniteCacheConfigVariationsFullApiTest.java | 40 +- .../distributed/CacheStartInParallelTest.java | 219 .../CacheMvccRemoteTxOnNearNodeStartTest.java | 90 .../LongClientConnectToClusterTest.java | 173 +++ .../testsuites/IgniteCacheMvccTestSuite.java| 3 + .../testsuites/IgniteCacheTestSuite7.java | 3 - .../IgniteSpiDiscoverySelfTestSuite.java| 2 + .../query/h2/H2ConnectionWrapper.java | 11 - .../internal/processors/query/h2/H2Utils.java | 15 - .../processors/query/h2/IgniteH2Indexing.java | 186 +++ .../processors/query/h2/ObjectPool.java | 97 .../processors/query/h2/ObjectPoolReusable.java | 58 --- .../query/h2/ThreadLocalObjectPool.java | 103 .../processors/query/h2/dml/UpdatePlan.java | 8 +- .../query/h2/opt/GridH2QueryContext.java| 33 +- .../processors/query/h2/opt/GridH2Table.java| 133 + .../query/h2/twostep/GridMapQueryExecutor.java | 498 +-- .../h2/twostep/GridReduceQueryExecutor.java | 16 +- .../query/h2/twostep/GridResultPage.java| 7 +- .../query/h2/twostep/MapNodeResults.java| 13 +- .../query/h2/twostep/MapQueryLazyWorker.java| 223 ++--- .../query/h2/twostep/MapQueryResult.java| 34 +- .../query/h2/twostep/MapQueryResults.java | 40 +- ...GridCacheLazyQueryPartitionsReleaseTest.java | 2 + .../IgniteCacheQueryH2IndexingLeakTest.java | 9 +- ...butedQueryStopOnCancelOrTimeoutSelfTest.java | 43 +- ...cheQueryAbstractDistributedJoinSelfTest.java | 5 - ...QueryNodeRestartDistributedJoinSelfTest.java | 14 +- ...nCancelOrTimeoutDistributedJoinSelfTest.java | 23 +- ...ynamicColumnsAbstractConcurrentSelfTest.java | 6 +- .../cache/index/H2ConnectionLeaksSelfTest.java | 2 +- .../processors/query/LazyQuerySelfTest.java | 202 +--- .../processors/query/h2/ObjectPoolSelfTest.java | 125 - .../query/h2/ThreadLocalObjectPoolSelfTest.java | 113 + .../h2/twostep/RetryCauseMessageSelfTest.java | 16 + .../IgniteCacheQuerySelfTestSuite.java | 4 +- .../ignite/cache/query/query_sql_fields.h | 4 +- .../cpp/odbc-test/src/configuration_test.cpp| 4 +- .../cpp/odbc/src/config/configuration.cpp | 2 +- .../Cache/Query/CacheQueriesTest.cs | 6 +- .../Query/Linq/CacheLinqTest.Introspection.cs | 2 - .../Client/Cache/SqlQueryTest.cs| 4 +- .../Cache/Query/SqlFieldsQuery.cs | 43 +- .../python/pyignite/datatypes/standard.py | 34 +- modules/platforms/python/setup.py | 2 +- ...benchmark-native-sql-cache-select.properties | 96 .../benchmark-native-sql-select.properties | 17 +- .../ignite-localhost-sql-query-config.xml | 91 .../yardstick/IgniteAbstractBenchmark.java | 30 +- .../yardstick/IgniteBenchmarkArguments.java | 13 - .../yardstick/jdbc/AbstractNativeBenchmark.java | 3 - .../apache/ignite/yardstick/jdbc/JdbcUtils.java | 47 +- .../jdbc/NativeSqlCacheQueryRangeBenchmark.java | 145 -- .../jdbc/NativeSqlQueryRangeBenchmark.java | 13 +- 64 files changed, 1187 insertions(+), 2051 deletions(-) --
[8/9] ignite git commit: Attempt to make ttl tests more robust.
Attempt to make ttl tests more robust. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d4af2138 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d4af2138 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d4af2138 Branch: refs/heads/ignite-9720 Commit: d4af2138f333eaa5a9b183659d32c96d3e165bad Parents: 1f068e0 Author: sboikov Authored: Tue Oct 23 11:03:23 2018 +0300 Committer: sboikov Committed: Tue Oct 23 11:03:50 2018 +0300 -- .../IgniteCacheConfigVariationsFullApiTest.java | 40 1 file changed, 33 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/d4af2138/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java index e449b3b..e2b1a2e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java @@ -4212,8 +4212,31 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar * @throws Exception If failed. */ private void checkTtl(boolean inTx, boolean oldEntry) throws Exception { -int ttl = 1000; +int ttlVals[] = {600, 1000, 3000}; +int i = 0; +while (i < ttlVals.length) { +try { +checkTtl0(inTx, oldEntry, ttlVals[i]); +break; +} +catch (AssertionFailedError e) { +if (i < ttlVals.length - 1) +info("Ttl test failed, try execute with increased ttl"); +else +throw e; +} +i++; +} +} + +/** + * @param inTx In tx flag. + * @param oldEntry {@code True} to check TTL on old entry, {@code false} on new. + * @param ttl TTL value. + * @throws Exception If failed. + */ +private void checkTtl0(boolean inTx, boolean oldEntry, int ttl) throws Exception { final ExpiryPolicy expiry = new TouchedExpiryPolicy(new Duration(MILLISECONDS, ttl)); final IgniteCache c = jcache(); @@ -4409,11 +4432,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar // Ensure that old TTL and expire time are not longer "visible". entryTtl = entryTtl(srvNodeCache, key); - -assertNotNull(entryTtl.get1()); -assertNotNull(entryTtl.get2()); -assertEquals(0, (long)entryTtl.get1()); -assertEquals(0, (long)entryTtl.get2()); +assertNull(entryTtl); // Ensure that next update will not pick old expire time. @@ -4430,7 +4449,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar tx.close(); } -U.sleep(2000); +U.sleep(ttl + 500); entryTtl = entryTtl(srvNodeCache, key); @@ -6315,6 +6334,13 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar entry.unswap(); +if (!entry.hasValue()) { +assertEquals(0, entry.ttl()); +assertEquals(0, entry.expireTime()); + +return null; +} + IgnitePair pair = new IgnitePair<>(entry.ttl(), entry.expireTime()); if (!entry.isNear())
[5/9] ignite git commit: IGNITE-9960: SQL: Reverted IGNITE-9171 and IGNITE-9864 until performance is fixed. This closes #5045.
http://git-wip-us.apache.org/repos/asf/ignite/blob/75e414a4/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java -- diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java index 9b7d268..f228111 100644 --- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java +++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java @@ -40,6 +40,7 @@ import javax.cache.CacheException; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteException; import org.apache.ignite.IgniteLogger; +import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.cache.PartitionLossPolicy; import org.apache.ignite.cache.query.QueryCancelledException; import org.apache.ignite.cache.query.SqlFieldsQuery; @@ -57,12 +58,12 @@ import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.cache.CacheInvalidStateException; import org.apache.ignite.internal.processors.cache.GridCacheContext; import org.apache.ignite.internal.processors.cache.distributed.dht.CompoundLockFuture; -import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactionalCacheAdapter; -import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxLocalAdapter; -import org.apache.ignite.internal.processors.cache.distributed.dht.GridReservable; import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition; import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState; import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionsReservation; +import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactionalCacheAdapter; +import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxLocalAdapter; +import org.apache.ignite.internal.processors.cache.distributed.dht.GridReservable; import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot; import org.apache.ignite.internal.processors.cache.mvcc.MvccUtils; import org.apache.ignite.internal.processors.cache.query.CacheQueryType; @@ -70,10 +71,8 @@ import org.apache.ignite.internal.processors.cache.query.GridCacheQueryMarshalla import org.apache.ignite.internal.processors.cache.query.GridCacheSqlQuery; import org.apache.ignite.internal.processors.query.GridQueryCancel; import org.apache.ignite.internal.processors.query.IgniteSQLException; -import org.apache.ignite.internal.processors.query.h2.H2ConnectionWrapper; import org.apache.ignite.internal.processors.query.h2.H2Utils; import org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing; -import org.apache.ignite.internal.processors.query.h2.ObjectPoolReusable; import org.apache.ignite.internal.processors.query.h2.ResultSetEnlistFuture; import org.apache.ignite.internal.processors.query.h2.UpdateResult; import org.apache.ignite.internal.processors.query.h2.opt.DistributedJoinMode; @@ -98,13 +97,13 @@ import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.lang.IgniteUuid; import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.spi.indexing.IndexingQueryFilter; -import org.h2.api.ErrorCode; +import org.apache.ignite.thread.IgniteThread; import org.h2.command.Prepared; import org.h2.jdbc.JdbcResultSet; -import org.h2.jdbc.JdbcSQLException; import org.h2.value.Value; import org.jetbrains.annotations.Nullable; +import static org.apache.ignite.IgniteSystemProperties.IGNITE_SQL_FORCE_LAZY_RESULT_SET; import static org.apache.ignite.cache.PartitionLossPolicy.READ_ONLY_SAFE; import static org.apache.ignite.cache.PartitionLossPolicy.READ_WRITE_SAFE; import static org.apache.ignite.events.EventType.EVT_CACHE_QUERY_EXECUTED; @@ -124,6 +123,9 @@ import static org.apache.ignite.internal.processors.query.h2.twostep.msg.GridH2V @SuppressWarnings("ForLoopReplaceableByForEach") public class GridMapQueryExecutor { /** */ +public static final boolean FORCE_LAZY = IgniteSystemProperties.getBoolean(IGNITE_SQL_FORCE_LAZY_RESULT_SET); + +/** */ private IgniteLogger log; /** */ @@ -147,8 +149,8 @@ public class GridMapQueryExecutor { /** Busy lock for lazy workers. */ private final GridSpinBusyLock lazyWorkerBusyLock = new GridSpinBusyLock(); -/** Stop guard. */ -private final AtomicBoolean stopGuard = new AtomicBoolean(); +/** Lazy worker stop guard. */ +private final AtomicBoolean lazyWorkerStopGuard = new AtomicBoolean(); /**
[7/9] ignite git commit: IGNITE-8006 Removed non-representative flaky test
IGNITE-8006 Removed non-representative flaky test Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1f068e01 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1f068e01 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1f068e01 Branch: refs/heads/ignite-9720 Commit: 1f068e01cb0479975c8c6c1a56d46671bee0e515 Parents: 75e414a Author: Alexey Goncharuk Authored: Tue Oct 23 11:01:40 2018 +0300 Committer: Alexey Goncharuk Committed: Tue Oct 23 11:02:51 2018 +0300 -- .../distributed/CacheStartInParallelTest.java | 219 --- .../testsuites/IgniteCacheTestSuite7.java | 3 - 2 files changed, 222 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/1f068e01/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartInParallelTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartInParallelTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartInParallelTest.java deleted file mode 100644 index 4e30d1c..000 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartInParallelTest.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * 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.distributed; - -import java.util.ArrayList; -import org.apache.ignite.IgniteSystemProperties; -import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.DataRegionConfiguration; -import org.apache.ignite.configuration.DataStorageConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.configuration.WALMode; -import org.apache.ignite.internal.IgniteEx; -import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; -import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; -import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; - -/** - * - */ -public class CacheStartInParallelTest extends GridCommonAbstractTest { -/** */ -private static final int CACHES_COUNT = 40; - -/** */ -private static final String STATIC_CACHE_PREFIX = "static-cache-"; - -/** */ -private static final String DYNAMIC_CACHE_PREFIX = "dynamic-cache-"; - -/** */ -private static boolean isStaticCache = true; - -/** */ -private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); - -/** {@inheritDoc} */ -@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { -IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - -cfg.setSystemThreadPoolSize(10); - -TcpDiscoverySpi discoSpi = new TcpDiscoverySpi(); - -discoSpi.setIpFinder(IP_FINDER); - -cfg.setDiscoverySpi(discoSpi); - -long sz = 100 * 1024 * 1024; - -DataStorageConfiguration memCfg = new DataStorageConfiguration().setPageSize(1024) -.setDefaultDataRegionConfiguration( -new DataRegionConfiguration().setPersistenceEnabled(true).setInitialSize(sz).setMaxSize(sz)) -.setWalMode(WALMode.LOG_ONLY).setCheckpointFrequency(24L * 60 * 60 * 1000); - -cfg.setDataStorageConfiguration(memCfg); - -if (isStaticCache) { -ArrayList staticCaches = new ArrayList<>(CACHES_COUNT); - -for (int i = 0; i < CACHES_COUNT; i++) -staticCaches.add(cacheConfiguration(STATIC_CACHE_PREFIX + i)); - -cfg.setCacheConfiguration(staticCaches.toArray(new CacheConfiguration[CACHES_COUNT])); -} - -return cfg; -} - -/** - * @param cacheName Cache name. - * @return Cache configuration. - */ -private CacheConfiguration cacheConfiguration(String cacheName) { -CacheConfiguration cfg
[4/9] ignite git commit: IGNITE-9960: SQL: Reverted IGNITE-9171 and IGNITE-9864 until performance is fixed. This closes #5045.
http://git-wip-us.apache.org/repos/asf/ignite/blob/75e414a4/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java index 140eb6e..d5cc0eb 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java @@ -17,21 +17,13 @@ package org.apache.ignite.internal.processors.query; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.concurrent.CountDownLatch; -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.Ignition; -import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction; import org.apache.ignite.cache.query.FieldsQueryCursor; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing; import org.apache.ignite.internal.processors.query.h2.twostep.MapQueryLazyWorker; @@ -39,11 +31,16 @@ import org.apache.ignite.internal.util.lang.GridAbsPredicate; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.concurrent.ThreadLocalRandom; + /** * Tests for lazy query execution. */ public class LazyQuerySelfTest extends GridCommonAbstractTest { -/** Keys count. */ +/** Keys ocunt. */ private static final int KEY_CNT = 200; /** Base query argument. */ @@ -97,91 +94,6 @@ public class LazyQuerySelfTest extends GridCommonAbstractTest { } /** - * Test DDL operation on table with high load queries. - * - * @throws Exception If failed. - */ -public void testTableWriteLockStarvation() throws Exception { -final Ignite srv = startGrid(1); - -srv.createCache(cacheConfiguration(4)); - -populateBaseQueryData(srv); - -final AtomicBoolean end = new AtomicBoolean(false); - -final int qryThreads = 10; - -final CountDownLatch latch = new CountDownLatch(qryThreads); - -// Do many concurrent queries. -IgniteInternalFuture fut = GridTestUtils.runMultiThreadedAsync(new Runnable() { -@Override public void run() { -latch.countDown(); - -while(!end.get()) { -FieldsQueryCursor> cursor = execute(srv, query(0) -.setPageSize(PAGE_SIZE_SMALL)); - -cursor.getAll(); -} -} -}, qryThreads, "usr-qry"); - -latch.await(); - -Thread.sleep(500); - -execute(srv, new SqlFieldsQuery("CREATE INDEX PERSON_NAME ON Person (name asc)")).getAll(); -execute(srv, new SqlFieldsQuery("DROP INDEX PERSON_NAME")).getAll(); - -// Test is OK in case DDL operations is passed on hi load queries pressure. -end.set(true); -fut.get(); -} - -/** - * Test release reserved partition after query complete (results is bigger than one page). - * - * @throws Exception If failed. - */ -public void testReleasePartitionReservationSeveralPagesResults() throws Exception { -checkReleasePartitionReservation(PAGE_SIZE_SMALL); -} - -/** - * Test release reserved partition after query complete (results is placed on one page). - * - * @throws Exception If failed. - */ -public void testReleasePartitionReservationOnePageResults() throws Exception { -checkReleasePartitionReservation(KEY_CNT); -} - -/** - * Test release reserved partition after query complete. - * - * @param pageSize Results page size. - * @throws Exception If failed. - */ -public void checkReleasePartitionReservation(int pageSize) throws Exception { -Ignite srv1 = startGrid(1); -startGrid(2); - -srv1.createCache(cacheConfiguration(1)); - -populateBaseQueryData(srv1); - -FieldsQueryCursor> cursor = execute(srv1, query(0).setPageSize(pageSize)); - -cursor.getAll(); - -startGrid(3); - -awaitPartitionMapExchange(); -} - -/** * Check local query execution. * * @par
[2/9] ignite git commit: IGNITE-9950 Python: Fixes for Decimal data type
IGNITE-9950 Python: Fixes for Decimal data type This closes #5041 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4bc08daa Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4bc08daa Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4bc08daa Branch: refs/heads/ignite-9720 Commit: 4bc08daa0cea486d9d2caa616707000dad5a56dc Parents: d82b21e Author: Dmitry Melnichuk Authored: Mon Oct 22 18:25:31 2018 +0300 Committer: Igor Sapego Committed: Mon Oct 22 18:27:36 2018 +0300 -- .../python/pyignite/datatypes/standard.py | 34 ++-- modules/platforms/python/setup.py | 2 +- 2 files changed, 26 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/4bc08daa/modules/platforms/python/pyignite/datatypes/standard.py -- diff --git a/modules/platforms/python/pyignite/datatypes/standard.py b/modules/platforms/python/pyignite/datatypes/standard.py index 6109c7a..5f3af74 100644 --- a/modules/platforms/python/pyignite/datatypes/standard.py +++ b/modules/platforms/python/pyignite/datatypes/standard.py @@ -16,6 +16,7 @@ import ctypes from datetime import date, datetime, time, timedelta import decimal +from math import ceil import uuid from pyignite.constants import * @@ -163,7 +164,7 @@ class DecimalObject: { '_pack_': 1, '_fields_': [ -('data', ctypes.c_char * header.length), +('data', ctypes.c_ubyte * header.length), ], } ) @@ -179,12 +180,18 @@ class DecimalObject: return None sign = 1 if ctype_object.data[0] & 0x80 else 0 -data = bytes([ctype_object.data[0] & 0x7f]) + ctype_object.data[1:] -result = decimal.Decimal(data.decode(PROTOCOL_STRING_ENCODING)) +data = ctype_object.data[1:] +data.insert(0, ctype_object.data[0] & 0x7f) +# decode n-byte integer +result = sum([ +[x for x in reversed(data)][i] * 0x100 ** i for i in +range(len(data)) +]) # apply scale result = ( result -* decimal.Decimal('10') ** decimal.Decimal(ctype_object.scale) +/ decimal.Decimal('10') +** decimal.Decimal(ctype_object.scale) ) if sign: # apply sign @@ -197,12 +204,20 @@ class DecimalObject: return Null.from_python() sign, digits, scale = value.normalize().as_tuple() -data = bytearray([ord('0') + digit for digit in digits]) +integer = int(''.join([str(d) for d in digits])) +# calculate number of bytes (at least one, and not forget the sign bit) +length = ceil((integer.bit_length() + 1)/8) +# write byte string +data = [] +for i in range(length): +digit = integer % 0x100 +integer //= 0x100 +data.insert(0, digit) +# apply sign if sign: data[0] |= 0x80 else: data[0] &= 0x7f -length = len(digits) header_class = cls.build_c_header() data_class = type( cls.__name__, @@ -210,7 +225,7 @@ class DecimalObject: { '_pack_': 1, '_fields_': [ -('data', ctypes.c_char * length), +('data', ctypes.c_ubyte * length), ], } ) @@ -220,8 +235,9 @@ class DecimalObject: byteorder=PROTOCOL_BYTE_ORDER ) data_object.length = length -data_object.scale = scale -data_object.data = bytes(data) +data_object.scale = -scale +for i in range(length): +data_object.data[i] = data[i] return bytes(data_object) http://git-wip-us.apache.org/repos/asf/ignite/blob/4bc08daa/modules/platforms/python/setup.py -- diff --git a/modules/platforms/python/setup.py b/modules/platforms/python/setup.py index 5d14dae..7419c97 100644 --- a/modules/platforms/python/setup.py +++ b/modules/platforms/python/setup.py @@ -65,7 +65,7 @@ for section in requirement_sections: if is_a_requirement(line): requirements[section].append(line) -with open('README.md', 'r') as readme_file: +with open('README.md', 'r', encoding='utf-8') as readme_file: long_description = readme_file.read() setuptools.setup(
[6/9] ignite git commit: IGNITE-9960: SQL: Reverted IGNITE-9171 and IGNITE-9864 until performance is fixed. This closes #5045.
IGNITE-9960: SQL: Reverted IGNITE-9171 and IGNITE-9864 until performance is fixed. This closes #5045. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/75e414a4 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/75e414a4 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/75e414a4 Branch: refs/heads/ignite-9720 Commit: 75e414a4ac53a36c421b31633723844faeb499af Parents: 7504880 Author: devozerov Authored: Tue Oct 23 10:33:26 2018 +0300 Committer: devozerov Committed: Tue Oct 23 10:33:26 2018 +0300 -- .../internal/jdbc2/JdbcConnectionSelfTest.java | 12 +- .../jdbc/thin/JdbcThinConnectionSelfTest.java | 38 +- .../jdbc/thin/JdbcThinDataSourceSelfTest.java | 12 +- .../apache/ignite/IgniteSystemProperties.java | 7 +- .../ignite/cache/query/SqlFieldsQuery.java | 20 +- .../jdbc/thin/ConnectionPropertiesImpl.java | 2 +- .../ignite/internal/jdbc2/JdbcConnection.java | 2 +- .../ignite/internal/util/IgniteUtils.java | 2 +- .../query/h2/H2ConnectionWrapper.java | 11 - .../internal/processors/query/h2/H2Utils.java | 15 - .../processors/query/h2/IgniteH2Indexing.java | 186 +++ .../processors/query/h2/ObjectPool.java | 97 .../processors/query/h2/ObjectPoolReusable.java | 58 --- .../query/h2/ThreadLocalObjectPool.java | 103 .../processors/query/h2/dml/UpdatePlan.java | 8 +- .../query/h2/opt/GridH2QueryContext.java| 33 +- .../processors/query/h2/opt/GridH2Table.java| 133 + .../query/h2/twostep/GridMapQueryExecutor.java | 498 +-- .../h2/twostep/GridReduceQueryExecutor.java | 16 +- .../query/h2/twostep/GridResultPage.java| 7 +- .../query/h2/twostep/MapNodeResults.java| 13 +- .../query/h2/twostep/MapQueryLazyWorker.java| 223 ++--- .../query/h2/twostep/MapQueryResult.java| 34 +- .../query/h2/twostep/MapQueryResults.java | 40 +- ...GridCacheLazyQueryPartitionsReleaseTest.java | 2 + .../IgniteCacheQueryH2IndexingLeakTest.java | 9 +- ...butedQueryStopOnCancelOrTimeoutSelfTest.java | 43 +- ...cheQueryAbstractDistributedJoinSelfTest.java | 5 - ...QueryNodeRestartDistributedJoinSelfTest.java | 14 +- ...nCancelOrTimeoutDistributedJoinSelfTest.java | 23 +- ...ynamicColumnsAbstractConcurrentSelfTest.java | 6 +- .../cache/index/H2ConnectionLeaksSelfTest.java | 2 +- .../processors/query/LazyQuerySelfTest.java | 202 +--- .../processors/query/h2/ObjectPoolSelfTest.java | 125 - .../query/h2/ThreadLocalObjectPoolSelfTest.java | 113 + .../h2/twostep/RetryCauseMessageSelfTest.java | 16 + .../IgniteCacheQuerySelfTestSuite.java | 4 +- .../ignite/cache/query/query_sql_fields.h | 4 +- .../cpp/odbc-test/src/configuration_test.cpp| 4 +- .../cpp/odbc/src/config/configuration.cpp | 2 +- .../Cache/Query/CacheQueriesTest.cs | 6 +- .../Query/Linq/CacheLinqTest.Introspection.cs | 2 - .../Client/Cache/SqlQueryTest.cs| 4 +- .../Cache/Query/SqlFieldsQuery.cs | 43 +- ...benchmark-native-sql-cache-select.properties | 96 .../benchmark-native-sql-select.properties | 17 +- .../ignite-localhost-sql-query-config.xml | 91 .../yardstick/IgniteAbstractBenchmark.java | 30 +- .../yardstick/IgniteBenchmarkArguments.java | 13 - .../yardstick/jdbc/AbstractNativeBenchmark.java | 3 - .../apache/ignite/yardstick/jdbc/JdbcUtils.java | 47 +- .../jdbc/NativeSqlCacheQueryRangeBenchmark.java | 145 -- .../jdbc/NativeSqlQueryRangeBenchmark.java | 13 +- 53 files changed, 848 insertions(+), 1806 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/75e414a4/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java -- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java index db0a959..d560d74 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java @@ -308,7 +308,7 @@ public class JdbcConnectionSelfTest extends GridCommonAbstractTest { assertTrue(((JdbcConnection)conn).isEnforceJoinOrder()); assertFalse(((JdbcConnection)conn).isDistributedJoins()); assertFalse(((JdbcConnection)conn).isCollocatedQuery()); -assertTrue(((JdbcConnection)conn).isLazy()); +assertFalse(((JdbcConnection)conn).isLazy()); assertF
[3/9] ignite git commit: IGNITE-9944: MVCC: Fixed "first request" handling for DHT transactions. This closes #5040.
IGNITE-9944: MVCC: Fixed "first request" handling for DHT transactions. This closes #5040. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/7504880a Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/7504880a Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/7504880a Branch: refs/heads/ignite-9720 Commit: 7504880a443737bf03bb03e455dbea7d8757ae27 Parents: 4bc08da Author: ipavlukhin Authored: Mon Oct 22 22:15:20 2018 +0300 Committer: devozerov Committed: Mon Oct 22 22:15:20 2018 +0300 -- .../dht/GridDhtTxAbstractEnlistFuture.java | 8 +- .../CacheMvccRemoteTxOnNearNodeStartTest.java | 90 .../testsuites/IgniteCacheMvccTestSuite.java| 3 + 3 files changed, 100 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/7504880a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java index e2c8237..68669b7 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java @@ -193,6 +193,9 @@ public abstract class GridDhtTxAbstractEnlistFuture extends GridCacheFutureAd /** Moving partitions. */ private Map movingParts; +/** Map for tracking nodes to which first request was already sent in order to send smaller subsequent requests. */ +private final Set firstReqSent = new HashSet<>(); + /** * @param nearNodeId Near node ID. * @param nearLockVer Near lock version. @@ -823,9 +826,12 @@ public abstract class GridDhtTxAbstractEnlistFuture extends GridCacheFutureAd GridDhtTxQueryEnlistRequest req; -if (newRemoteTx(node)) { +if (newRemoteTx(node)) addNewRemoteTxNode(node); +if (!firstReqSent.contains(node)) { +firstReqSent.add(node); + // If this is a first request to this node, send full info. req = new GridDhtTxQueryFirstEnlistRequest(cctx.cacheId(), futId, http://git-wip-us.apache.org/repos/asf/ignite/blob/7504880a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccRemoteTxOnNearNodeStartTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccRemoteTxOnNearNodeStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccRemoteTxOnNearNodeStartTest.java new file mode 100644 index 000..ee23e38 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccRemoteTxOnNearNodeStartTest.java @@ -0,0 +1,90 @@ +/* + * 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.mvcc; + +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import org.apache.ignite.IgniteCache; +import org.apache.ignite.cache.CacheAtomicityMode; +import org.apache.ignite.cache.CacheMode; +import org.apache.ignite.cache.affinity.Affinity; +import org.apache.ignite.configuration.CacheConfiguration; +import org.apache.ignite.internal.IgniteEx; +import org.apache.ignite.testframework.GridTestUtils; +import org.apache.ignite.transactions.Transaction; +import org.apache.ignite.transactions.TransactionConcurrency; +import org.apache.ignite.transactions.TransactionIsolation; + +import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; +import static org.ap
[1/9] ignite git commit: IGNITE-9738 Client node can suddenly fail on start - Fixes #4968.
Repository: ignite Updated Branches: refs/heads/ignite-9720 23d4f7217 -> d98bfd955 IGNITE-9738 Client node can suddenly fail on start - Fixes #4968. Signed-off-by: Dmitriy Govorukhin Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d82b21ec Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d82b21ec Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d82b21ec Branch: refs/heads/ignite-9720 Commit: d82b21ec56a956fa7cc5374e3f15e279e7c492ac Parents: e1f8f46 Author: vd-pyatkov Authored: Mon Oct 22 18:19:53 2018 +0300 Committer: Dmitriy Govorukhin Committed: Mon Oct 22 18:19:53 2018 +0300 -- .../ignite/spi/discovery/tcp/ClientImpl.java| 10 +- .../LongClientConnectToClusterTest.java | 173 +++ .../IgniteSpiDiscoverySelfTestSuite.java| 2 + 3 files changed, 180 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/d82b21ec/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java index d3a8b18..92c197a 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java @@ -305,6 +305,11 @@ class ClientImpl extends TcpDiscoveryImpl { } }.start(); +timer.schedule( +new MetricsSender(), +spi.metricsUpdateFreq, +spi.metricsUpdateFreq); + try { joinLatch.await(); @@ -317,11 +322,6 @@ class ClientImpl extends TcpDiscoveryImpl { throw new IgniteSpiException("Thread has been interrupted.", e); } -timer.schedule( -new MetricsSender(), -spi.metricsUpdateFreq, -spi.metricsUpdateFreq); - spi.printStartInfo(); } http://git-wip-us.apache.org/repos/asf/ignite/blob/d82b21ec/modules/core/src/test/java/org/apache/ignite/spi/discovery/LongClientConnectToClusterTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/LongClientConnectToClusterTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/LongClientConnectToClusterTest.java new file mode 100644 index 000..a079926 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/LongClientConnectToClusterTest.java @@ -0,0 +1,173 @@ +/* + * 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.spi.discovery; + +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.configuration.IgniteConfiguration; +import org.apache.ignite.events.EventType; +import org.apache.ignite.internal.IgniteEx; +import org.apache.ignite.internal.util.future.IgniteFinishedFutureImpl; +import org.apache.ignite.lang.IgniteFuture; +import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; +import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryAbstractMessage; +import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryNodeAddFinishedMessage; +import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.jetbrains.annotations.Nullable; +import java.io.IOException; +import java.io.OutputStream; +import java.net.Socket; +import java.util.Collection; +import java.util.Collections; +import java.util.Map; + +/** + * Test client connects to two nodes cluster during time more than the + * {@link org.apache.ignite.configuration.IgniteConfiguration#clientFailureDetectionTimeout}. + */ +public class LongClientConnectToClusterTest extends GridCommonAbstractTest { +/** Client ins
ignite git commit: ignite-9720
Repository: ignite Updated Branches: refs/heads/ignite-9720 9c3304676 -> 23d4f7217 ignite-9720 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/23d4f721 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/23d4f721 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/23d4f721 Branch: refs/heads/ignite-9720 Commit: 23d4f72176febac0be9c97ed020d00ffa81461e6 Parents: 9c33046 Author: sboikov Authored: Tue Oct 23 15:27:29 2018 +0300 Committer: sboikov Committed: Tue Oct 23 15:27:29 2018 +0300 -- .../FreeListLazyInitializationTest.java | 25 1 file changed, 20 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/23d4f721/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/FreeListLazyInitializationTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/FreeListLazyInitializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/FreeListLazyInitializationTest.java index 6a17c56..45660ad 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/FreeListLazyInitializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/FreeListLazyInitializationTest.java @@ -17,6 +17,7 @@ package org.apache.ignite.internal.processors.cache.persistence; +import org.apache.ignite.IgniteCache; import org.apache.ignite.configuration.BinaryConfiguration; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.DataRegionConfiguration; @@ -36,6 +37,7 @@ import java.util.List; import java.util.Map; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; +import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.testframework.GridTestUtils.getFieldValue; @@ -65,12 +67,17 @@ public class FreeListLazyInitializationTest extends GridCommonAbstractTest { ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER); -CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); -ccfg.setWriteSynchronizationMode(FULL_SYNC); -ccfg.setAtomicityMode(TRANSACTIONAL); -ccfg.setCacheMode(REPLICATED); +CacheConfiguration ccfg1 = new CacheConfiguration(DEFAULT_CACHE_NAME); +ccfg1.setWriteSynchronizationMode(FULL_SYNC); +ccfg1.setAtomicityMode(TRANSACTIONAL); +ccfg1.setCacheMode(REPLICATED); -cfg.setCacheConfiguration(ccfg); +CacheConfiguration ccfg2 = new CacheConfiguration("cache-2"); +ccfg2.setWriteSynchronizationMode(FULL_SYNC); +ccfg2.setAtomicityMode(TRANSACTIONAL); +ccfg2.setCacheMode(PARTITIONED); + +cfg.setCacheConfiguration(ccfg1, ccfg2); return cfg; } @@ -127,6 +134,14 @@ public class FreeListLazyInitializationTest extends GridCommonAbstractTest { checkLazyFreeList(node, parts, false); +// Check second cache and checkpoints do not force unnecessary free lists initialization. +node.cache("cache-2").putAll(map); +node.cache("cache-2").removeAll(map.keySet()); + +forceCheckpoint(node); + +checkLazyFreeList(node, parts, false); + node.cache(DEFAULT_CACHE_NAME).putAll(map); checkLazyFreeList(node, parts, true);
ignite git commit: IGNITE-9632: SQL: support IN statement with constants/params for partition pruning. This closes #4857.
Repository: ignite Updated Branches: refs/heads/master d669da154 -> 324e6e38e IGNITE-9632: SQL: support IN statement with constants/params for partition pruning. This closes #4857. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/324e6e38 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/324e6e38 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/324e6e38 Branch: refs/heads/master Commit: 324e6e38eb1ef042bbf3a506d523201266893050 Parents: d669da1 Author: devozerov Authored: Tue Oct 23 15:16:56 2018 +0300 Committer: devozerov Committed: Tue Oct 23 15:16:56 2018 +0300 -- .../apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java | 4 .../apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/324e6e38/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java index 7633d2a..f29a79b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java @@ -186,6 +186,7 @@ import org.apache.ignite.internal.processors.query.h2.sql.BaseH2CompareQueryTest import org.apache.ignite.internal.processors.query.h2.sql.GridQueryParsingTest; import org.apache.ignite.internal.processors.query.h2.sql.H2CompareBigQueryDistributedJoinsTest; import org.apache.ignite.internal.processors.query.h2.sql.H2CompareBigQueryTest; +import org.apache.ignite.internal.processors.query.h2.twostep.InOperationExtractPartitionSelfTest; import org.apache.ignite.internal.processors.sql.IgniteCachePartitionedAtomicColumnConstraintsTest; import org.apache.ignite.internal.processors.sql.IgniteCachePartitionedTransactionalColumnConstraintsTest; import org.apache.ignite.internal.processors.sql.IgniteCacheReplicatedAtomicColumnConstraintsTest; @@ -486,6 +487,9 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite { suite.addTestSuite(IgniteSqlGroupConcatCollocatedTest.class); suite.addTestSuite(IgniteSqlGroupConcatNotCollocatedTest.class); +// Partition pruning. +suite.addTestSuite(InOperationExtractPartitionSelfTest.class); + return suite; } } http://git-wip-us.apache.org/repos/asf/ignite/blob/324e6e38/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java index ac8d10a..dba046b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java @@ -54,7 +54,6 @@ import org.apache.ignite.internal.processors.query.h2.twostep.CacheQueryMemoryLe import org.apache.ignite.internal.processors.query.h2.twostep.CreateTableWithDateKeySelfTest; import org.apache.ignite.internal.processors.query.h2.twostep.DisappearedCacheCauseRetryMessageSelfTest; import org.apache.ignite.internal.processors.query.h2.twostep.DisappearedCacheWasNotFoundMessageSelfTest; -import org.apache.ignite.internal.processors.query.h2.twostep.InOperationExtractPartitionSelfTest; import org.apache.ignite.internal.processors.query.h2.twostep.NonCollocatedRetryMessageSelfTest; import org.apache.ignite.internal.processors.query.h2.twostep.RetryCauseMessageSelfTest; import org.apache.ignite.internal.processors.query.h2.twostep.TableViewSubquerySelfTest; @@ -124,8 +123,6 @@ public class IgniteCacheQuerySelfTestSuite2 extends TestSuite { suite.addTestSuite(DisappearedCacheCauseRetryMessageSelfTest.class); suite.addTestSuite(DisappearedCacheWasNotFoundMessageSelfTest.class); -suite.addTestSuite(InOperationExtractPartitionSelfTest.class); - suite.addTestSuite(TableViewSubquerySelfTest.class); return suite;
ignite git commit: IGNITE-9663: MVCC: Fixes to transaction mapping. This closes #5018.
Repository: ignite Updated Branches: refs/heads/ignite-2.7 0b36e9905 -> e4d20d296 IGNITE-9663: MVCC: Fixes to transaction mapping. This closes #5018. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e4d20d29 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e4d20d29 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e4d20d29 Branch: refs/heads/ignite-2.7 Commit: e4d20d2966ba6bfc868798045ec78aca8832486c Parents: 0b36e99 Author: rkondakov Authored: Tue Oct 23 14:59:12 2018 +0300 Committer: devozerov Committed: Tue Oct 23 15:00:21 2018 +0300 -- .../near/GridNearTxEnlistFuture.java| 4 +- .../near/GridNearTxQueryEnlistFuture.java | 3 +- .../GridNearTxQueryResultsEnlistFuture.java | 4 +- .../cache/mvcc/MvccProcessorImpl.java | 9 ++- .../cache/mvcc/MvccQueryTrackerImpl.java| 16 - .../cache/mvcc/msg/MvccSnapshotResponse.java| 4 ++ .../cache/mvcc/CacheMvccAbstractTest.java | 67 +++- .../query/h2/database/H2TreeFilterClosure.java | 19 +- .../query/h2/database/H2TreeIndex.java | 2 +- .../h2/twostep/GridReduceQueryExecutor.java | 5 +- ...ccPartitionedSqlCoordinatorFailoverTest.java | 9 +++ 11 files changed, 121 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/e4d20d29/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java index ed75c36..3ddedd0 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java @@ -575,9 +575,7 @@ public class GridNearTxEnlistFuture extends GridNearTxAbstractEnlistFuturehttp://git-wip-us.apache.org/repos/asf/ignite/blob/e4d20d29/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java index 8528345..70fbd1f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java @@ -363,8 +363,7 @@ public class GridNearTxQueryEnlistFuture extends GridNearTxQueryAbstractEnlistFu completed = true; } -if (X.hasCause(err, ClusterTopologyCheckedException.class) -|| (res != null && res.removeMapping())) { +if (res != null && res.removeMapping()) { GridDistributedTxMapping m = tx.mappings().get(node.id()); assert m != null && m.empty(); http://git-wip-us.apache.org/repos/asf/ignite/blob/e4d20d29/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java index f375405..9783582 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java @@ -552,9 +552,7 @@ public class GridNearTxQueryResultsEnlistFuture extends GridNearTxQueryAbstractE if (err == null && res.error() != null) err = res.error(); -if (X.hasCause(err, ClusterTopologyCheckedException.class)) -tx.removeMapping(nodeId); -else if (res != null) +if (res != null) tx.mappings().get(nodeId).addBackups(res.newDhtNodes()); if (err != null) http://git-wip-us.apache.org/repos/asf/ignite/blob/e4d20d29/modules/core/src/main/java/org/
ignite git commit: IGNITE-9663: MVCC: Fixes to transaction mapping. This closes #5018.
Repository: ignite Updated Branches: refs/heads/master 685c008af -> d76ff5426 IGNITE-9663: MVCC: Fixes to transaction mapping. This closes #5018. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d76ff542 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d76ff542 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d76ff542 Branch: refs/heads/master Commit: d76ff54264498f49f070d0ff5e6d7d67f29d93ba Parents: 685c008 Author: rkondakov Authored: Tue Oct 23 14:59:12 2018 +0300 Committer: devozerov Committed: Tue Oct 23 14:59:12 2018 +0300 -- .../near/GridNearTxEnlistFuture.java| 4 +- .../near/GridNearTxQueryEnlistFuture.java | 3 +- .../GridNearTxQueryResultsEnlistFuture.java | 4 +- .../cache/mvcc/MvccProcessorImpl.java | 9 ++- .../cache/mvcc/MvccQueryTrackerImpl.java| 16 - .../cache/mvcc/msg/MvccSnapshotResponse.java| 4 ++ .../cache/mvcc/CacheMvccAbstractTest.java | 67 +++- .../query/h2/database/H2TreeFilterClosure.java | 19 +- .../query/h2/database/H2TreeIndex.java | 2 +- .../h2/twostep/GridReduceQueryExecutor.java | 5 +- ...ccPartitionedSqlCoordinatorFailoverTest.java | 9 +++ 11 files changed, 121 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/d76ff542/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java index ed75c36..3ddedd0 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java @@ -575,9 +575,7 @@ public class GridNearTxEnlistFuture extends GridNearTxAbstractEnlistFuturehttp://git-wip-us.apache.org/repos/asf/ignite/blob/d76ff542/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java index 8528345..70fbd1f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java @@ -363,8 +363,7 @@ public class GridNearTxQueryEnlistFuture extends GridNearTxQueryAbstractEnlistFu completed = true; } -if (X.hasCause(err, ClusterTopologyCheckedException.class) -|| (res != null && res.removeMapping())) { +if (res != null && res.removeMapping()) { GridDistributedTxMapping m = tx.mappings().get(node.id()); assert m != null && m.empty(); http://git-wip-us.apache.org/repos/asf/ignite/blob/d76ff542/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java index f375405..9783582 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java @@ -552,9 +552,7 @@ public class GridNearTxQueryResultsEnlistFuture extends GridNearTxQueryAbstractE if (err == null && res.error() != null) err = res.error(); -if (X.hasCause(err, ClusterTopologyCheckedException.class)) -tx.removeMapping(nodeId); -else if (res != null) +if (res != null) tx.mappings().get(nodeId).addBackups(res.newDhtNodes()); if (err != null) http://git-wip-us.apache.org/repos/asf/ignite/blob/d76ff542/modules/core/src/main/java/org/apache/i
ignite git commit: IGNITE-9951 PHP: Fixes for Date data type
Repository: ignite Updated Branches: refs/heads/ignite-2.7 b29a1bd96 -> 0b36e9905 IGNITE-9951 PHP: Fixes for Date data type This closes #5043 (cherry picked from commit 685c008af3c5c07f02e7d311fdf0c39f6e3941e0) Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/0b36e990 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/0b36e990 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/0b36e990 Branch: refs/heads/ignite-2.7 Commit: 0b36e99058d69f95c58d71fe1da985be9cf078e2 Parents: b29a1bd Author: Pavel Petroshenko Authored: Tue Oct 23 13:35:37 2018 +0300 Committer: Igor Sapego Committed: Tue Oct 23 13:38:22 2018 +0300 -- modules/platforms/php/src/Apache/Ignite/Data/Date.php | 9 - modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php | 4 +++- 2 files changed, 7 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/0b36e990/modules/platforms/php/src/Apache/Ignite/Data/Date.php -- diff --git a/modules/platforms/php/src/Apache/Ignite/Data/Date.php b/modules/platforms/php/src/Apache/Ignite/Data/Date.php index 356cc36..fa5f394 100644 --- a/modules/platforms/php/src/Apache/Ignite/Data/Date.php +++ b/modules/platforms/php/src/Apache/Ignite/Data/Date.php @@ -47,7 +47,8 @@ class Date */ public static function fromDateTime(DateTime $dateTime) { -return new Date($dateTime->getTimestamp() * 1000); +$millis = intval($dateTime->format('u') / 1000); +return new Date($dateTime->getTimestamp() * 1000 + $millis); } /** @@ -57,11 +58,9 @@ class Date */ public function toDateTime(): DateTime { -$dateTime = new DateTime(); -$dateTime->setTimestamp($this->getSeconds()); -return $dateTime; +return DateTime::createFromFormat('U.u', number_format($this->getMillis() / 1000, 6, '.', '')); } - + /** * Returns the date value as number of milliseconds elapsed since January 1, 1970, 00:00:00 UTC. * http://git-wip-us.apache.org/repos/asf/ignite/blob/0b36e990/modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php -- diff --git a/modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php b/modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php index 39ef984..a404d46 100644 --- a/modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php +++ b/modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php @@ -49,7 +49,9 @@ class Timestamp extends Date */ public static function fromDateTime(DateTime $dateTime) { -return new Timestamp($dateTime->getTimestamp() * 1000, 0); +$micros = $dateTime->format('u'); +$millis = intval($micros / 1000); +return new Timestamp($dateTime->getTimestamp() * 1000 + $millis, ($micros % 1000) * 1000); } /**
ignite git commit: IGNITE-9951 PHP: Fixes for Date data type
Repository: ignite Updated Branches: refs/heads/master 3f7109ff5 -> 685c008af IGNITE-9951 PHP: Fixes for Date data type This closes #5043 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/685c008a Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/685c008a Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/685c008a Branch: refs/heads/master Commit: 685c008af3c5c07f02e7d311fdf0c39f6e3941e0 Parents: 3f7109f Author: Pavel Petroshenko Authored: Tue Oct 23 13:35:37 2018 +0300 Committer: Igor Sapego Committed: Tue Oct 23 13:35:37 2018 +0300 -- modules/platforms/php/src/Apache/Ignite/Data/Date.php | 9 - modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php | 4 +++- 2 files changed, 7 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/685c008a/modules/platforms/php/src/Apache/Ignite/Data/Date.php -- diff --git a/modules/platforms/php/src/Apache/Ignite/Data/Date.php b/modules/platforms/php/src/Apache/Ignite/Data/Date.php index 356cc36..fa5f394 100644 --- a/modules/platforms/php/src/Apache/Ignite/Data/Date.php +++ b/modules/platforms/php/src/Apache/Ignite/Data/Date.php @@ -47,7 +47,8 @@ class Date */ public static function fromDateTime(DateTime $dateTime) { -return new Date($dateTime->getTimestamp() * 1000); +$millis = intval($dateTime->format('u') / 1000); +return new Date($dateTime->getTimestamp() * 1000 + $millis); } /** @@ -57,11 +58,9 @@ class Date */ public function toDateTime(): DateTime { -$dateTime = new DateTime(); -$dateTime->setTimestamp($this->getSeconds()); -return $dateTime; +return DateTime::createFromFormat('U.u', number_format($this->getMillis() / 1000, 6, '.', '')); } - + /** * Returns the date value as number of milliseconds elapsed since January 1, 1970, 00:00:00 UTC. * http://git-wip-us.apache.org/repos/asf/ignite/blob/685c008a/modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php -- diff --git a/modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php b/modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php index 39ef984..a404d46 100644 --- a/modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php +++ b/modules/platforms/php/src/Apache/Ignite/Data/Timestamp.php @@ -49,7 +49,9 @@ class Timestamp extends Date */ public static function fromDateTime(DateTime $dateTime) { -return new Timestamp($dateTime->getTimestamp() * 1000, 0); +$micros = $dateTime->format('u'); +$millis = intval($micros / 1000); +return new Timestamp($dateTime->getTimestamp() * 1000 + $millis, ($micros % 1000) * 1000); } /**
ignite git commit: IGNITE-8879 Fix blinking baseline node sometimes unable to connect to cluster - Fixes #4893.
Repository: ignite Updated Branches: refs/heads/master b1584a8f2 -> 3f7109ff5 IGNITE-8879 Fix blinking baseline node sometimes unable to connect to cluster - Fixes #4893. Signed-off-by: Dmitriy Govorukhin Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3f7109ff Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3f7109ff Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3f7109ff Branch: refs/heads/master Commit: 3f7109ff52bdfc3157987b2230216cc982392eff Parents: b1584a8 Author: Ivan Daschinskiy Authored: Tue Oct 23 12:33:24 2018 +0300 Committer: Dmitriy Govorukhin Committed: Tue Oct 23 12:33:24 2018 +0300 -- .../GridDhtPartitionsExchangeFuture.java| 19 - .../GridCacheDatabaseSharedManager.java | 22 -- .../IgniteCacheDatabaseSharedManager.java | 6 ++- .../metastorage/IgniteMetaStorageBasicTest.java | 45 4 files changed, 66 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/3f7109ff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java index 0c2cbe2..63d3635 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java @@ -871,16 +871,13 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte * @throws IgniteCheckedException If failed. */ private IgniteInternalFuture initCachesOnLocalJoin() throws IgniteCheckedException { -if (isLocalNodeNotInBaseline()) { +boolean baselineNode = isLocalNodeInBaseline(); + +if (!baselineNode) { cctx.exchange().exchangerBlockingSectionBegin(); try { cctx.cache().cleanupCachesDirectories(); - -cctx.database().cleanupCheckpointDirectory(); - -if (cctx.wal() != null) -cctx.wal().cleanupWalDirectories(); } finally { cctx.exchange().exchangerBlockingSectionEnd(); @@ -916,7 +913,7 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte cctx.exchange().exchangerBlockingSectionBegin(); try { -cctx.database().readCheckpointAndRestoreMemory(startDescs); +cctx.database().readCheckpointAndRestoreMemory(startDescs, !baselineNode); } finally { cctx.exchange().exchangerBlockingSectionEnd(); @@ -950,12 +947,12 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte } /** - * @return {@code true} if local node is not in baseline and {@code false} otherwise. + * @return {@code true} if local node is in baseline and {@code false} otherwise. */ -private boolean isLocalNodeNotInBaseline() { +private boolean isLocalNodeInBaseline() { BaselineTopology topology = cctx.discovery().discoCache().state().baselineTopology(); -return topology!= null && !topology.consistentIds().contains(cctx.localNode().consistentId()); +return topology != null && topology.consistentIds().contains(cctx.localNode().consistentId()); } /** @@ -1098,7 +1095,7 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte cctx.exchange().exchangerBlockingSectionBegin(); try { - cctx.database().readCheckpointAndRestoreMemory(startDescs); + cctx.database().readCheckpointAndRestoreMemory(startDescs, false); } finally { cctx.exchange().exchangerBlockingSectionEnd(); http://git-wip-us.apache.org/repos/asf/ignite/blob/3f7109ff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/proce
ignite git commit: Attempt to make ttl tests more robust.
Repository: ignite Updated Branches: refs/heads/ignite-9720 144ca212e -> 9c3304676 Attempt to make ttl tests more robust. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9c330467 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9c330467 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9c330467 Branch: refs/heads/ignite-9720 Commit: 9c330467687078438b3cd89527c9a4e0cb55af4b Parents: 144ca212e Author: sboikov Authored: Tue Oct 23 12:32:26 2018 +0300 Committer: sboikov Committed: Tue Oct 23 12:32:26 2018 +0300 -- .../cache/persistence/FreeListLazyInitializationTest.java | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/9c330467/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/FreeListLazyInitializationTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/FreeListLazyInitializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/FreeListLazyInitializationTest.java index e0a4aae..6a17c56 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/FreeListLazyInitializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/FreeListLazyInitializationTest.java @@ -116,6 +116,8 @@ public class FreeListLazyInitializationTest extends GridCommonAbstractTest { node.cache(DEFAULT_CACHE_NAME).putAll(map); node.cache(DEFAULT_CACHE_NAME).removeAll(map.keySet()); +forceCheckpoint(node); + checkLazyFreeList(node, parts, true); stopAllGrids();
ignite git commit: IGNITE-9911: MVCC: Fixed a hang during vacuum. This closes #5035.
Repository: ignite Updated Branches: refs/heads/ignite-2.7 0ccde7c42 -> b29a1bd96 IGNITE-9911: MVCC: Fixed a hang during vacuum. This closes #5035. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b29a1bd9 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b29a1bd9 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b29a1bd9 Branch: refs/heads/ignite-2.7 Commit: b29a1bd963c817f04079ff53c08ffaf8de8d61d2 Parents: 0ccde7c Author: Igor Seliverstov Authored: Tue Oct 23 12:05:23 2018 +0300 Committer: devozerov Committed: Tue Oct 23 12:27:43 2018 +0300 -- .../cache/mvcc/MvccProcessorImpl.java | 228 --- .../cache/mvcc/CacheMvccAbstractTest.java | 21 +- ...cheMvccSelectForUpdateQueryAbstractTest.java | 11 +- 3 files changed, 115 insertions(+), 145 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/b29a1bd9/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java index 617e814..6c1c3e3 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java @@ -90,8 +90,8 @@ import org.apache.ignite.internal.util.future.GridCompoundFuture; import org.apache.ignite.internal.util.future.GridCompoundIdentityFuture; import org.apache.ignite.internal.util.future.GridFinishedFuture; import org.apache.ignite.internal.util.future.GridFutureAdapter; +import org.apache.ignite.internal.util.lang.GridClosureException; import org.apache.ignite.internal.util.lang.GridCursor; -import org.apache.ignite.internal.util.typedef.CI1; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.internal.util.typedef.internal.S; @@ -115,7 +115,6 @@ import static org.apache.ignite.events.EventType.EVT_NODE_SEGMENTED; import static org.apache.ignite.internal.GridTopic.TOPIC_CACHE_COORDINATOR; import static org.apache.ignite.internal.events.DiscoveryCustomEvent.EVT_DISCOVERY_CUSTOM_EVT; import static org.apache.ignite.internal.managers.communication.GridIoPolicy.SYSTEM_POOL; -import static org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.OWNING; import static org.apache.ignite.internal.processors.cache.mvcc.MvccQueryTracker.MVCC_TRACKER_ID_NA; import static org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.MVCC_COUNTER_NA; import static org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.MVCC_CRD_COUNTER_NA; @@ -181,9 +180,6 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce */ private final Object mux = new Object(); -/** For tests only. */ -private volatile Throwable vacuumError; - /** */ private final GridAtomicLong futIdCntr = new GridAtomicLong(0); @@ -1136,8 +1132,7 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce crdVer == 0 && ctx.localNodeId().equals(crd0.nodeId())) return new GridFinishedFuture<>(new VacuumMetrics()); -final GridCompoundIdentityFuture res = -new GridCompoundIdentityFuture<>(new VacuumMetricsReducer()); +final GridFutureAdapter res = new GridFutureAdapter<>(); MvccSnapshot snapshot; @@ -1174,28 +1169,10 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce } /** - * For tests only. - * - * @return Vacuum error. - */ -Throwable vacuumError() { -return vacuumError; -} - -/** - * For tests only. - * - * @param e Vacuum error. - */ -void vacuumError(Throwable e) { -this.vacuumError = e; -} - -/** * @param res Result. * @param snapshot Snapshot. */ -private void continueRunVacuum(GridCompoundIdentityFuture res, MvccSnapshot snapshot) { +private void continueRunVacuum(GridFutureAdapter res, MvccSnapshot snapshot) { ackTxCommit(snapshot) .listen(new IgniteInClosure() { @Override public void apply(IgniteInternalFuture fut) { @@ -1220,23 +1197,45 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce return; } +GridCompoundIdentityFuture res0 = +
[ignite] Git Push Summary
Repository: ignite Updated Branches: refs/heads/ignite-9720-1 [deleted] fc0d0080d
ignite git commit: IGNITE-9911: MVCC: Fixed a hang during vacuum. This closes #5035.
Repository: ignite Updated Branches: refs/heads/master 962d6a297 -> b1584a8f2 IGNITE-9911: MVCC: Fixed a hang during vacuum. This closes #5035. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b1584a8f Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b1584a8f Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b1584a8f Branch: refs/heads/master Commit: b1584a8f2636d390b3f8cc754ce1195ccc797807 Parents: 962d6a2 Author: Igor Seliverstov Authored: Tue Oct 23 12:05:23 2018 +0300 Committer: devozerov Committed: Tue Oct 23 12:05:23 2018 +0300 -- .../cache/mvcc/MvccProcessorImpl.java | 228 --- .../cache/mvcc/CacheMvccAbstractTest.java | 21 +- ...cheMvccSelectForUpdateQueryAbstractTest.java | 11 +- 3 files changed, 115 insertions(+), 145 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/b1584a8f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java index 9fcafb0..e58151f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java @@ -90,8 +90,8 @@ import org.apache.ignite.internal.util.future.GridCompoundFuture; import org.apache.ignite.internal.util.future.GridCompoundIdentityFuture; import org.apache.ignite.internal.util.future.GridFinishedFuture; import org.apache.ignite.internal.util.future.GridFutureAdapter; +import org.apache.ignite.internal.util.lang.GridClosureException; import org.apache.ignite.internal.util.lang.GridCursor; -import org.apache.ignite.internal.util.typedef.CI1; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.internal.util.typedef.internal.S; @@ -115,7 +115,6 @@ import static org.apache.ignite.events.EventType.EVT_NODE_SEGMENTED; import static org.apache.ignite.internal.GridTopic.TOPIC_CACHE_COORDINATOR; import static org.apache.ignite.internal.events.DiscoveryCustomEvent.EVT_DISCOVERY_CUSTOM_EVT; import static org.apache.ignite.internal.managers.communication.GridIoPolicy.SYSTEM_POOL; -import static org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.OWNING; import static org.apache.ignite.internal.processors.cache.mvcc.MvccQueryTracker.MVCC_TRACKER_ID_NA; import static org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.MVCC_COUNTER_NA; import static org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.MVCC_CRD_COUNTER_NA; @@ -181,9 +180,6 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce */ private final Object mux = new Object(); -/** For tests only. */ -private volatile Throwable vacuumError; - /** */ private final GridAtomicLong futIdCntr = new GridAtomicLong(0); @@ -1136,8 +1132,7 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce crdVer == 0 && ctx.localNodeId().equals(crd0.nodeId())) return new GridFinishedFuture<>(new VacuumMetrics()); -final GridCompoundIdentityFuture res = -new GridCompoundIdentityFuture<>(new VacuumMetricsReducer()); +final GridFutureAdapter res = new GridFutureAdapter<>(); MvccSnapshot snapshot; @@ -1174,28 +1169,10 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce } /** - * For tests only. - * - * @return Vacuum error. - */ -Throwable vacuumError() { -return vacuumError; -} - -/** - * For tests only. - * - * @param e Vacuum error. - */ -void vacuumError(Throwable e) { -this.vacuumError = e; -} - -/** * @param res Result. * @param snapshot Snapshot. */ -private void continueRunVacuum(GridCompoundIdentityFuture res, MvccSnapshot snapshot) { +private void continueRunVacuum(GridFutureAdapter res, MvccSnapshot snapshot) { ackTxCommit(snapshot) .listen(new IgniteInClosure() { @Override public void apply(IgniteInternalFuture fut) { @@ -1220,23 +1197,45 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce return; } +GridCompoundIdentityFuture res0 = +
ignite git commit: IGNITE-9719 Extra rebalanceThreadPoolSize check on client node - Fixes #4911.
Repository: ignite Updated Branches: refs/heads/master d4af2138f -> 962d6a297 IGNITE-9719 Extra rebalanceThreadPoolSize check on client node - Fixes #4911. Signed-off-by: Ivan Rakov Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/962d6a29 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/962d6a29 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/962d6a29 Branch: refs/heads/master Commit: 962d6a29716195c13519ca48b6d79f3b8541653c Parents: d4af213 Author: luchnikovnsk Authored: Tue Oct 23 11:16:40 2018 +0300 Committer: Ivan Rakov Committed: Tue Oct 23 11:16:40 2018 +0300 -- .../apache/ignite/internal/IgniteKernal.java| 32 +-- .../ignite/client/ClientConfigurationTest.java | 42 2 files changed, 61 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/962d6a29/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 40347d7..1546da3 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 @@ -2581,19 +2581,25 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { * */ private void ackRebalanceConfiguration() throws IgniteCheckedException { -if (cfg.getSystemThreadPoolSize() <= cfg.getRebalanceThreadPoolSize()) -throw new IgniteCheckedException("Rebalance thread pool size exceed or equals System thread pool size. " + -"Change IgniteConfiguration.rebalanceThreadPoolSize property before next start."); - -if (cfg.getRebalanceThreadPoolSize() < 1) -throw new IgniteCheckedException("Rebalance thread pool size minimal allowed value is 1. " + -"Change IgniteConfiguration.rebalanceThreadPoolSize property before next start."); - -for (CacheConfiguration ccfg : cfg.getCacheConfiguration()) { -if (ccfg.getRebalanceBatchesPrefetchCount() < 1) -throw new IgniteCheckedException("Rebalance batches prefetch count minimal allowed value is 1. " + -"Change CacheConfiguration.rebalanceBatchesPrefetchCount property before next start. " + -"[cache=" + ccfg.getName() + "]"); +if (cfg.isClientMode()) { +if (cfg.getRebalanceThreadPoolSize() != IgniteConfiguration.DFLT_REBALANCE_THREAD_POOL_SIZE) +U.warn(log, "Setting the rebalance pool size has no effect on the client mode"); +} +else { +if (cfg.getSystemThreadPoolSize() <= cfg.getRebalanceThreadPoolSize()) +throw new IgniteCheckedException("Rebalance thread pool size exceed or equals System thread pool size. " + +"Change IgniteConfiguration.rebalanceThreadPoolSize property before next start."); + +if (cfg.getRebalanceThreadPoolSize() < 1) +throw new IgniteCheckedException("Rebalance thread pool size minimal allowed value is 1. " + +"Change IgniteConfiguration.rebalanceThreadPoolSize property before next start."); + +for (CacheConfiguration ccfg : cfg.getCacheConfiguration()) { +if (ccfg.getRebalanceBatchesPrefetchCount() < 1) +throw new IgniteCheckedException("Rebalance batches prefetch count minimal allowed value is 1. " + +"Change CacheConfiguration.rebalanceBatchesPrefetchCount property before next start. " + +"[cache=" + ccfg.getName() + "]"); +} } } http://git-wip-us.apache.org/repos/asf/ignite/blob/962d6a29/modules/core/src/test/java/org/apache/ignite/client/ClientConfigurationTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/client/ClientConfigurationTest.java b/modules/core/src/test/java/org/apache/ignite/client/ClientConfigurationTest.java index bcc212a..287c6ec 100644 --- a/modules/core/src/test/java/org/apache/ignite/client/ClientConfigurationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/client/ClientConfigurationTest.java @@ -25,9 +25,19 @@ import java.io.ObjectInputStream; import java.io.ObjectOutput; import java.io.ObjectOutputStream; import java.util.Collections; +import java.util.Set; +import java.util.function.Predicate; +import java.util.stream.Collectors; + +import org.apache.ignite.Ignite; +import org.apache.ignite.Ignition; +impo
ignite git commit: Attempt to make ttl tests more robust.
Repository: ignite Updated Branches: refs/heads/master 1f068e01c -> d4af2138f Attempt to make ttl tests more robust. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d4af2138 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d4af2138 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d4af2138 Branch: refs/heads/master Commit: d4af2138f333eaa5a9b183659d32c96d3e165bad Parents: 1f068e0 Author: sboikov Authored: Tue Oct 23 11:03:23 2018 +0300 Committer: sboikov Committed: Tue Oct 23 11:03:50 2018 +0300 -- .../IgniteCacheConfigVariationsFullApiTest.java | 40 1 file changed, 33 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/d4af2138/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java index e449b3b..e2b1a2e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java @@ -4212,8 +4212,31 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar * @throws Exception If failed. */ private void checkTtl(boolean inTx, boolean oldEntry) throws Exception { -int ttl = 1000; +int ttlVals[] = {600, 1000, 3000}; +int i = 0; +while (i < ttlVals.length) { +try { +checkTtl0(inTx, oldEntry, ttlVals[i]); +break; +} +catch (AssertionFailedError e) { +if (i < ttlVals.length - 1) +info("Ttl test failed, try execute with increased ttl"); +else +throw e; +} +i++; +} +} + +/** + * @param inTx In tx flag. + * @param oldEntry {@code True} to check TTL on old entry, {@code false} on new. + * @param ttl TTL value. + * @throws Exception If failed. + */ +private void checkTtl0(boolean inTx, boolean oldEntry, int ttl) throws Exception { final ExpiryPolicy expiry = new TouchedExpiryPolicy(new Duration(MILLISECONDS, ttl)); final IgniteCache c = jcache(); @@ -4409,11 +4432,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar // Ensure that old TTL and expire time are not longer "visible". entryTtl = entryTtl(srvNodeCache, key); - -assertNotNull(entryTtl.get1()); -assertNotNull(entryTtl.get2()); -assertEquals(0, (long)entryTtl.get1()); -assertEquals(0, (long)entryTtl.get2()); +assertNull(entryTtl); // Ensure that next update will not pick old expire time. @@ -4430,7 +4449,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar tx.close(); } -U.sleep(2000); +U.sleep(ttl + 500); entryTtl = entryTtl(srvNodeCache, key); @@ -6315,6 +6334,13 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar entry.unswap(); +if (!entry.hasValue()) { +assertEquals(0, entry.ttl()); +assertEquals(0, entry.expireTime()); + +return null; +} + IgnitePair pair = new IgnitePair<>(entry.ttl(), entry.expireTime()); if (!entry.isNear())
ignite git commit: IGNITE-8006 Removed non-representative flaky test
Repository: ignite Updated Branches: refs/heads/master 75e414a4a -> 1f068e01c IGNITE-8006 Removed non-representative flaky test Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1f068e01 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1f068e01 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1f068e01 Branch: refs/heads/master Commit: 1f068e01cb0479975c8c6c1a56d46671bee0e515 Parents: 75e414a Author: Alexey Goncharuk Authored: Tue Oct 23 11:01:40 2018 +0300 Committer: Alexey Goncharuk Committed: Tue Oct 23 11:02:51 2018 +0300 -- .../distributed/CacheStartInParallelTest.java | 219 --- .../testsuites/IgniteCacheTestSuite7.java | 3 - 2 files changed, 222 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/1f068e01/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartInParallelTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartInParallelTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartInParallelTest.java deleted file mode 100644 index 4e30d1c..000 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartInParallelTest.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * 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.distributed; - -import java.util.ArrayList; -import org.apache.ignite.IgniteSystemProperties; -import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.DataRegionConfiguration; -import org.apache.ignite.configuration.DataStorageConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.configuration.WALMode; -import org.apache.ignite.internal.IgniteEx; -import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; -import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; -import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; - -/** - * - */ -public class CacheStartInParallelTest extends GridCommonAbstractTest { -/** */ -private static final int CACHES_COUNT = 40; - -/** */ -private static final String STATIC_CACHE_PREFIX = "static-cache-"; - -/** */ -private static final String DYNAMIC_CACHE_PREFIX = "dynamic-cache-"; - -/** */ -private static boolean isStaticCache = true; - -/** */ -private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); - -/** {@inheritDoc} */ -@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { -IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - -cfg.setSystemThreadPoolSize(10); - -TcpDiscoverySpi discoSpi = new TcpDiscoverySpi(); - -discoSpi.setIpFinder(IP_FINDER); - -cfg.setDiscoverySpi(discoSpi); - -long sz = 100 * 1024 * 1024; - -DataStorageConfiguration memCfg = new DataStorageConfiguration().setPageSize(1024) -.setDefaultDataRegionConfiguration( -new DataRegionConfiguration().setPersistenceEnabled(true).setInitialSize(sz).setMaxSize(sz)) -.setWalMode(WALMode.LOG_ONLY).setCheckpointFrequency(24L * 60 * 60 * 1000); - -cfg.setDataStorageConfiguration(memCfg); - -if (isStaticCache) { -ArrayList staticCaches = new ArrayList<>(CACHES_COUNT); - -for (int i = 0; i < CACHES_COUNT; i++) -staticCaches.add(cacheConfiguration(STATIC_CACHE_PREFIX + i)); - -cfg.setCacheConfiguration(staticCaches.toArray(new CacheConfiguration[CACHES_COUNT])); -} - -return cfg; -} - -/** - * @param cacheName Cache name. - * @return Cache configuration. - */ -private CacheConfigu
ignite git commit: ignite-9720
Repository: ignite Updated Branches: refs/heads/ignite-9720 a6cd973a2 -> 144ca212e ignite-9720 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/144ca212 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/144ca212 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/144ca212 Branch: refs/heads/ignite-9720 Commit: 144ca212edf6dfcbd93feca5bc4c1244fb4edc5e Parents: a6cd973 Author: sboikov Authored: Tue Oct 23 10:56:08 2018 +0300 Committer: sboikov Committed: Tue Oct 23 10:56:08 2018 +0300 -- .../FreeListLazyInitializationTest.java | 159 +++ .../ignite/testsuites/IgnitePdsTestSuite4.java | 3 + 2 files changed, 162 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/144ca212/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/FreeListLazyInitializationTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/FreeListLazyInitializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/FreeListLazyInitializationTest.java new file mode 100644 index 000..e0a4aae --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/FreeListLazyInitializationTest.java @@ -0,0 +1,159 @@ +/* + * 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.persistence; + +import org.apache.ignite.configuration.BinaryConfiguration; +import org.apache.ignite.configuration.CacheConfiguration; +import org.apache.ignite.configuration.DataRegionConfiguration; +import org.apache.ignite.configuration.DataStorageConfiguration; +import org.apache.ignite.configuration.IgniteConfiguration; +import org.apache.ignite.configuration.WALMode; +import org.apache.ignite.internal.IgniteEx; +import org.apache.ignite.internal.processors.cache.GridCacheContext; +import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition; +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.junits.common.GridCommonAbstractTest; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; +import static org.apache.ignite.cache.CacheMode.REPLICATED; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; +import static org.apache.ignite.testframework.GridTestUtils.getFieldValue; + +/** + * + */ +public class FreeListLazyInitializationTest extends GridCommonAbstractTest { +/** */ +private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); + +/** {@inheritDoc} */ +@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { +IgniteConfiguration cfg = super.getConfiguration(gridName); + +cfg.setConsistentId(gridName); + +DataStorageConfiguration memCfg = new DataStorageConfiguration() +.setDefaultDataRegionConfiguration( +new DataRegionConfiguration().setMaxSize(100L * 1024 * 1024).setPersistenceEnabled(true)) +.setPageSize(1024) +.setWalMode(WALMode.LOG_ONLY); + +cfg.setDataStorageConfiguration(memCfg); + +cfg.setBinaryConfiguration(new BinaryConfiguration().setCompactFooter(false)); + +((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER); + +CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); +ccfg.setWriteSynchronizationMode(FULL_SYNC); +ccfg.setAtomicityMode(TRANSACTIONAL); +ccfg.setCacheMode(REPLICATED); + +cfg.setCacheConfiguration(ccfg); + +return cfg; +} + +
[2/3] ignite git commit: IGNITE-9960: SQL: Reverted IGNITE-9171 and IGNITE-9864 until performance is fixed. This closes #5045.
http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccde7c4/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java -- diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java index 9b7d268..f228111 100644 --- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java +++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java @@ -40,6 +40,7 @@ import javax.cache.CacheException; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteException; import org.apache.ignite.IgniteLogger; +import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.cache.PartitionLossPolicy; import org.apache.ignite.cache.query.QueryCancelledException; import org.apache.ignite.cache.query.SqlFieldsQuery; @@ -57,12 +58,12 @@ import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.cache.CacheInvalidStateException; import org.apache.ignite.internal.processors.cache.GridCacheContext; import org.apache.ignite.internal.processors.cache.distributed.dht.CompoundLockFuture; -import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactionalCacheAdapter; -import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxLocalAdapter; -import org.apache.ignite.internal.processors.cache.distributed.dht.GridReservable; import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition; import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState; import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionsReservation; +import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactionalCacheAdapter; +import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxLocalAdapter; +import org.apache.ignite.internal.processors.cache.distributed.dht.GridReservable; import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot; import org.apache.ignite.internal.processors.cache.mvcc.MvccUtils; import org.apache.ignite.internal.processors.cache.query.CacheQueryType; @@ -70,10 +71,8 @@ import org.apache.ignite.internal.processors.cache.query.GridCacheQueryMarshalla import org.apache.ignite.internal.processors.cache.query.GridCacheSqlQuery; import org.apache.ignite.internal.processors.query.GridQueryCancel; import org.apache.ignite.internal.processors.query.IgniteSQLException; -import org.apache.ignite.internal.processors.query.h2.H2ConnectionWrapper; import org.apache.ignite.internal.processors.query.h2.H2Utils; import org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing; -import org.apache.ignite.internal.processors.query.h2.ObjectPoolReusable; import org.apache.ignite.internal.processors.query.h2.ResultSetEnlistFuture; import org.apache.ignite.internal.processors.query.h2.UpdateResult; import org.apache.ignite.internal.processors.query.h2.opt.DistributedJoinMode; @@ -98,13 +97,13 @@ import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.lang.IgniteUuid; import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.spi.indexing.IndexingQueryFilter; -import org.h2.api.ErrorCode; +import org.apache.ignite.thread.IgniteThread; import org.h2.command.Prepared; import org.h2.jdbc.JdbcResultSet; -import org.h2.jdbc.JdbcSQLException; import org.h2.value.Value; import org.jetbrains.annotations.Nullable; +import static org.apache.ignite.IgniteSystemProperties.IGNITE_SQL_FORCE_LAZY_RESULT_SET; import static org.apache.ignite.cache.PartitionLossPolicy.READ_ONLY_SAFE; import static org.apache.ignite.cache.PartitionLossPolicy.READ_WRITE_SAFE; import static org.apache.ignite.events.EventType.EVT_CACHE_QUERY_EXECUTED; @@ -124,6 +123,9 @@ import static org.apache.ignite.internal.processors.query.h2.twostep.msg.GridH2V @SuppressWarnings("ForLoopReplaceableByForEach") public class GridMapQueryExecutor { /** */ +public static final boolean FORCE_LAZY = IgniteSystemProperties.getBoolean(IGNITE_SQL_FORCE_LAZY_RESULT_SET); + +/** */ private IgniteLogger log; /** */ @@ -147,8 +149,8 @@ public class GridMapQueryExecutor { /** Busy lock for lazy workers. */ private final GridSpinBusyLock lazyWorkerBusyLock = new GridSpinBusyLock(); -/** Stop guard. */ -private final AtomicBoolean stopGuard = new AtomicBoolean(); +/** Lazy worker stop guard. */ +private final AtomicBoolean lazyWorkerStopGuard = new AtomicBoolean(); /**
[1/3] ignite git commit: IGNITE-9960: SQL: Reverted IGNITE-9171 and IGNITE-9864 until performance is fixed. This closes #5045.
Repository: ignite Updated Branches: refs/heads/ignite-2.7 42ab0ebe3 -> 0ccde7c42 http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccde7c4/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java index 140eb6e..d5cc0eb 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java @@ -17,21 +17,13 @@ package org.apache.ignite.internal.processors.query; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.concurrent.CountDownLatch; -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.Ignition; -import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction; import org.apache.ignite.cache.query.FieldsQueryCursor; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing; import org.apache.ignite.internal.processors.query.h2.twostep.MapQueryLazyWorker; @@ -39,11 +31,16 @@ import org.apache.ignite.internal.util.lang.GridAbsPredicate; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.concurrent.ThreadLocalRandom; + /** * Tests for lazy query execution. */ public class LazyQuerySelfTest extends GridCommonAbstractTest { -/** Keys count. */ +/** Keys ocunt. */ private static final int KEY_CNT = 200; /** Base query argument. */ @@ -97,91 +94,6 @@ public class LazyQuerySelfTest extends GridCommonAbstractTest { } /** - * Test DDL operation on table with high load queries. - * - * @throws Exception If failed. - */ -public void testTableWriteLockStarvation() throws Exception { -final Ignite srv = startGrid(1); - -srv.createCache(cacheConfiguration(4)); - -populateBaseQueryData(srv); - -final AtomicBoolean end = new AtomicBoolean(false); - -final int qryThreads = 10; - -final CountDownLatch latch = new CountDownLatch(qryThreads); - -// Do many concurrent queries. -IgniteInternalFuture fut = GridTestUtils.runMultiThreadedAsync(new Runnable() { -@Override public void run() { -latch.countDown(); - -while(!end.get()) { -FieldsQueryCursor> cursor = execute(srv, query(0) -.setPageSize(PAGE_SIZE_SMALL)); - -cursor.getAll(); -} -} -}, qryThreads, "usr-qry"); - -latch.await(); - -Thread.sleep(500); - -execute(srv, new SqlFieldsQuery("CREATE INDEX PERSON_NAME ON Person (name asc)")).getAll(); -execute(srv, new SqlFieldsQuery("DROP INDEX PERSON_NAME")).getAll(); - -// Test is OK in case DDL operations is passed on hi load queries pressure. -end.set(true); -fut.get(); -} - -/** - * Test release reserved partition after query complete (results is bigger than one page). - * - * @throws Exception If failed. - */ -public void testReleasePartitionReservationSeveralPagesResults() throws Exception { -checkReleasePartitionReservation(PAGE_SIZE_SMALL); -} - -/** - * Test release reserved partition after query complete (results is placed on one page). - * - * @throws Exception If failed. - */ -public void testReleasePartitionReservationOnePageResults() throws Exception { -checkReleasePartitionReservation(KEY_CNT); -} - -/** - * Test release reserved partition after query complete. - * - * @param pageSize Results page size. - * @throws Exception If failed. - */ -public void checkReleasePartitionReservation(int pageSize) throws Exception { -Ignite srv1 = startGrid(1); -startGrid(2); - -srv1.createCache(cacheConfiguration(1)); - -populateBaseQueryData(srv1); - -FieldsQueryCursor> cursor = execute(srv1, query(0).setPageSize(pageSize)); - -cursor.getAll(); - -startGrid(3); - -awaitPartitionMapE
[3/3] ignite git commit: IGNITE-9960: SQL: Reverted IGNITE-9171 and IGNITE-9864 until performance is fixed. This closes #5045.
IGNITE-9960: SQL: Reverted IGNITE-9171 and IGNITE-9864 until performance is fixed. This closes #5045. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/0ccde7c4 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/0ccde7c4 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/0ccde7c4 Branch: refs/heads/ignite-2.7 Commit: 0ccde7c429df12aef07a617ca38fd48df2f92b0a Parents: 42ab0eb Author: devozerov Authored: Tue Oct 23 10:33:26 2018 +0300 Committer: devozerov Committed: Tue Oct 23 10:35:00 2018 +0300 -- .../internal/jdbc2/JdbcConnectionSelfTest.java | 12 +- .../jdbc/thin/JdbcThinConnectionSelfTest.java | 38 +- .../jdbc/thin/JdbcThinDataSourceSelfTest.java | 12 +- .../apache/ignite/IgniteSystemProperties.java | 7 +- .../ignite/cache/query/SqlFieldsQuery.java | 20 +- .../jdbc/thin/ConnectionPropertiesImpl.java | 2 +- .../ignite/internal/jdbc2/JdbcConnection.java | 2 +- .../ignite/internal/util/IgniteUtils.java | 2 +- .../query/h2/H2ConnectionWrapper.java | 11 - .../internal/processors/query/h2/H2Utils.java | 15 - .../processors/query/h2/IgniteH2Indexing.java | 186 +++ .../processors/query/h2/ObjectPool.java | 97 .../processors/query/h2/ObjectPoolReusable.java | 58 --- .../query/h2/ThreadLocalObjectPool.java | 103 .../processors/query/h2/dml/UpdatePlan.java | 8 +- .../query/h2/opt/GridH2QueryContext.java| 33 +- .../processors/query/h2/opt/GridH2Table.java| 133 + .../query/h2/twostep/GridMapQueryExecutor.java | 498 +-- .../h2/twostep/GridReduceQueryExecutor.java | 16 +- .../query/h2/twostep/GridResultPage.java| 7 +- .../query/h2/twostep/MapNodeResults.java| 13 +- .../query/h2/twostep/MapQueryLazyWorker.java| 223 ++--- .../query/h2/twostep/MapQueryResult.java| 34 +- .../query/h2/twostep/MapQueryResults.java | 40 +- ...GridCacheLazyQueryPartitionsReleaseTest.java | 2 + .../IgniteCacheQueryH2IndexingLeakTest.java | 9 +- ...butedQueryStopOnCancelOrTimeoutSelfTest.java | 43 +- ...cheQueryAbstractDistributedJoinSelfTest.java | 5 - ...QueryNodeRestartDistributedJoinSelfTest.java | 14 +- ...nCancelOrTimeoutDistributedJoinSelfTest.java | 23 +- ...ynamicColumnsAbstractConcurrentSelfTest.java | 6 +- .../cache/index/H2ConnectionLeaksSelfTest.java | 2 +- .../processors/query/LazyQuerySelfTest.java | 202 +--- .../processors/query/h2/ObjectPoolSelfTest.java | 125 - .../query/h2/ThreadLocalObjectPoolSelfTest.java | 113 + .../h2/twostep/RetryCauseMessageSelfTest.java | 16 + .../IgniteCacheQuerySelfTestSuite.java | 4 +- .../ignite/cache/query/query_sql_fields.h | 4 +- .../cpp/odbc-test/src/configuration_test.cpp| 4 +- .../cpp/odbc/src/config/configuration.cpp | 2 +- .../Cache/Query/CacheQueriesTest.cs | 6 +- .../Query/Linq/CacheLinqTest.Introspection.cs | 2 - .../Client/Cache/SqlQueryTest.cs| 4 +- .../Cache/Query/SqlFieldsQuery.cs | 43 +- ...benchmark-native-sql-cache-select.properties | 96 .../benchmark-native-sql-select.properties | 17 +- .../ignite-localhost-sql-query-config.xml | 91 .../yardstick/IgniteAbstractBenchmark.java | 30 +- .../yardstick/IgniteBenchmarkArguments.java | 13 - .../yardstick/jdbc/AbstractNativeBenchmark.java | 3 - .../apache/ignite/yardstick/jdbc/JdbcUtils.java | 47 +- .../jdbc/NativeSqlCacheQueryRangeBenchmark.java | 145 -- .../jdbc/NativeSqlQueryRangeBenchmark.java | 13 +- 53 files changed, 848 insertions(+), 1806 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccde7c4/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java -- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java index db0a959..d560d74 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java @@ -308,7 +308,7 @@ public class JdbcConnectionSelfTest extends GridCommonAbstractTest { assertTrue(((JdbcConnection)conn).isEnforceJoinOrder()); assertFalse(((JdbcConnection)conn).isDistributedJoins()); assertFalse(((JdbcConnection)conn).isCollocatedQuery()); -assertTrue(((JdbcConnection)conn).isLazy()); +assertFalse(((JdbcConnection)conn).isLazy()); assertFa
[3/3] ignite git commit: IGNITE-9960: SQL: Reverted IGNITE-9171 and IGNITE-9864 until performance is fixed. This closes #5045.
IGNITE-9960: SQL: Reverted IGNITE-9171 and IGNITE-9864 until performance is fixed. This closes #5045. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/75e414a4 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/75e414a4 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/75e414a4 Branch: refs/heads/master Commit: 75e414a4ac53a36c421b31633723844faeb499af Parents: 7504880 Author: devozerov Authored: Tue Oct 23 10:33:26 2018 +0300 Committer: devozerov Committed: Tue Oct 23 10:33:26 2018 +0300 -- .../internal/jdbc2/JdbcConnectionSelfTest.java | 12 +- .../jdbc/thin/JdbcThinConnectionSelfTest.java | 38 +- .../jdbc/thin/JdbcThinDataSourceSelfTest.java | 12 +- .../apache/ignite/IgniteSystemProperties.java | 7 +- .../ignite/cache/query/SqlFieldsQuery.java | 20 +- .../jdbc/thin/ConnectionPropertiesImpl.java | 2 +- .../ignite/internal/jdbc2/JdbcConnection.java | 2 +- .../ignite/internal/util/IgniteUtils.java | 2 +- .../query/h2/H2ConnectionWrapper.java | 11 - .../internal/processors/query/h2/H2Utils.java | 15 - .../processors/query/h2/IgniteH2Indexing.java | 186 +++ .../processors/query/h2/ObjectPool.java | 97 .../processors/query/h2/ObjectPoolReusable.java | 58 --- .../query/h2/ThreadLocalObjectPool.java | 103 .../processors/query/h2/dml/UpdatePlan.java | 8 +- .../query/h2/opt/GridH2QueryContext.java| 33 +- .../processors/query/h2/opt/GridH2Table.java| 133 + .../query/h2/twostep/GridMapQueryExecutor.java | 498 +-- .../h2/twostep/GridReduceQueryExecutor.java | 16 +- .../query/h2/twostep/GridResultPage.java| 7 +- .../query/h2/twostep/MapNodeResults.java| 13 +- .../query/h2/twostep/MapQueryLazyWorker.java| 223 ++--- .../query/h2/twostep/MapQueryResult.java| 34 +- .../query/h2/twostep/MapQueryResults.java | 40 +- ...GridCacheLazyQueryPartitionsReleaseTest.java | 2 + .../IgniteCacheQueryH2IndexingLeakTest.java | 9 +- ...butedQueryStopOnCancelOrTimeoutSelfTest.java | 43 +- ...cheQueryAbstractDistributedJoinSelfTest.java | 5 - ...QueryNodeRestartDistributedJoinSelfTest.java | 14 +- ...nCancelOrTimeoutDistributedJoinSelfTest.java | 23 +- ...ynamicColumnsAbstractConcurrentSelfTest.java | 6 +- .../cache/index/H2ConnectionLeaksSelfTest.java | 2 +- .../processors/query/LazyQuerySelfTest.java | 202 +--- .../processors/query/h2/ObjectPoolSelfTest.java | 125 - .../query/h2/ThreadLocalObjectPoolSelfTest.java | 113 + .../h2/twostep/RetryCauseMessageSelfTest.java | 16 + .../IgniteCacheQuerySelfTestSuite.java | 4 +- .../ignite/cache/query/query_sql_fields.h | 4 +- .../cpp/odbc-test/src/configuration_test.cpp| 4 +- .../cpp/odbc/src/config/configuration.cpp | 2 +- .../Cache/Query/CacheQueriesTest.cs | 6 +- .../Query/Linq/CacheLinqTest.Introspection.cs | 2 - .../Client/Cache/SqlQueryTest.cs| 4 +- .../Cache/Query/SqlFieldsQuery.cs | 43 +- ...benchmark-native-sql-cache-select.properties | 96 .../benchmark-native-sql-select.properties | 17 +- .../ignite-localhost-sql-query-config.xml | 91 .../yardstick/IgniteAbstractBenchmark.java | 30 +- .../yardstick/IgniteBenchmarkArguments.java | 13 - .../yardstick/jdbc/AbstractNativeBenchmark.java | 3 - .../apache/ignite/yardstick/jdbc/JdbcUtils.java | 47 +- .../jdbc/NativeSqlCacheQueryRangeBenchmark.java | 145 -- .../jdbc/NativeSqlQueryRangeBenchmark.java | 13 +- 53 files changed, 848 insertions(+), 1806 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/75e414a4/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java -- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java index db0a959..d560d74 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java @@ -308,7 +308,7 @@ public class JdbcConnectionSelfTest extends GridCommonAbstractTest { assertTrue(((JdbcConnection)conn).isEnforceJoinOrder()); assertFalse(((JdbcConnection)conn).isDistributedJoins()); assertFalse(((JdbcConnection)conn).isCollocatedQuery()); -assertTrue(((JdbcConnection)conn).isLazy()); +assertFalse(((JdbcConnection)conn).isLazy()); assertFalse(
[2/3] ignite git commit: IGNITE-9960: SQL: Reverted IGNITE-9171 and IGNITE-9864 until performance is fixed. This closes #5045.
http://git-wip-us.apache.org/repos/asf/ignite/blob/75e414a4/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java -- diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java index 9b7d268..f228111 100644 --- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java +++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java @@ -40,6 +40,7 @@ import javax.cache.CacheException; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteException; import org.apache.ignite.IgniteLogger; +import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.cache.PartitionLossPolicy; import org.apache.ignite.cache.query.QueryCancelledException; import org.apache.ignite.cache.query.SqlFieldsQuery; @@ -57,12 +58,12 @@ import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.cache.CacheInvalidStateException; import org.apache.ignite.internal.processors.cache.GridCacheContext; import org.apache.ignite.internal.processors.cache.distributed.dht.CompoundLockFuture; -import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactionalCacheAdapter; -import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxLocalAdapter; -import org.apache.ignite.internal.processors.cache.distributed.dht.GridReservable; import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition; import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState; import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionsReservation; +import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTransactionalCacheAdapter; +import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxLocalAdapter; +import org.apache.ignite.internal.processors.cache.distributed.dht.GridReservable; import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot; import org.apache.ignite.internal.processors.cache.mvcc.MvccUtils; import org.apache.ignite.internal.processors.cache.query.CacheQueryType; @@ -70,10 +71,8 @@ import org.apache.ignite.internal.processors.cache.query.GridCacheQueryMarshalla import org.apache.ignite.internal.processors.cache.query.GridCacheSqlQuery; import org.apache.ignite.internal.processors.query.GridQueryCancel; import org.apache.ignite.internal.processors.query.IgniteSQLException; -import org.apache.ignite.internal.processors.query.h2.H2ConnectionWrapper; import org.apache.ignite.internal.processors.query.h2.H2Utils; import org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing; -import org.apache.ignite.internal.processors.query.h2.ObjectPoolReusable; import org.apache.ignite.internal.processors.query.h2.ResultSetEnlistFuture; import org.apache.ignite.internal.processors.query.h2.UpdateResult; import org.apache.ignite.internal.processors.query.h2.opt.DistributedJoinMode; @@ -98,13 +97,13 @@ import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.lang.IgniteUuid; import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.spi.indexing.IndexingQueryFilter; -import org.h2.api.ErrorCode; +import org.apache.ignite.thread.IgniteThread; import org.h2.command.Prepared; import org.h2.jdbc.JdbcResultSet; -import org.h2.jdbc.JdbcSQLException; import org.h2.value.Value; import org.jetbrains.annotations.Nullable; +import static org.apache.ignite.IgniteSystemProperties.IGNITE_SQL_FORCE_LAZY_RESULT_SET; import static org.apache.ignite.cache.PartitionLossPolicy.READ_ONLY_SAFE; import static org.apache.ignite.cache.PartitionLossPolicy.READ_WRITE_SAFE; import static org.apache.ignite.events.EventType.EVT_CACHE_QUERY_EXECUTED; @@ -124,6 +123,9 @@ import static org.apache.ignite.internal.processors.query.h2.twostep.msg.GridH2V @SuppressWarnings("ForLoopReplaceableByForEach") public class GridMapQueryExecutor { /** */ +public static final boolean FORCE_LAZY = IgniteSystemProperties.getBoolean(IGNITE_SQL_FORCE_LAZY_RESULT_SET); + +/** */ private IgniteLogger log; /** */ @@ -147,8 +149,8 @@ public class GridMapQueryExecutor { /** Busy lock for lazy workers. */ private final GridSpinBusyLock lazyWorkerBusyLock = new GridSpinBusyLock(); -/** Stop guard. */ -private final AtomicBoolean stopGuard = new AtomicBoolean(); +/** Lazy worker stop guard. */ +private final AtomicBoolean lazyWorkerStopGuard = new AtomicBoolean(); /**
[1/3] ignite git commit: IGNITE-9960: SQL: Reverted IGNITE-9171 and IGNITE-9864 until performance is fixed. This closes #5045.
Repository: ignite Updated Branches: refs/heads/master 7504880a4 -> 75e414a4a http://git-wip-us.apache.org/repos/asf/ignite/blob/75e414a4/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java index 140eb6e..d5cc0eb 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java @@ -17,21 +17,13 @@ package org.apache.ignite.internal.processors.query; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.concurrent.CountDownLatch; -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.Ignition; -import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction; import org.apache.ignite.cache.query.FieldsQueryCursor; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing; import org.apache.ignite.internal.processors.query.h2.twostep.MapQueryLazyWorker; @@ -39,11 +31,16 @@ import org.apache.ignite.internal.util.lang.GridAbsPredicate; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.concurrent.ThreadLocalRandom; + /** * Tests for lazy query execution. */ public class LazyQuerySelfTest extends GridCommonAbstractTest { -/** Keys count. */ +/** Keys ocunt. */ private static final int KEY_CNT = 200; /** Base query argument. */ @@ -97,91 +94,6 @@ public class LazyQuerySelfTest extends GridCommonAbstractTest { } /** - * Test DDL operation on table with high load queries. - * - * @throws Exception If failed. - */ -public void testTableWriteLockStarvation() throws Exception { -final Ignite srv = startGrid(1); - -srv.createCache(cacheConfiguration(4)); - -populateBaseQueryData(srv); - -final AtomicBoolean end = new AtomicBoolean(false); - -final int qryThreads = 10; - -final CountDownLatch latch = new CountDownLatch(qryThreads); - -// Do many concurrent queries. -IgniteInternalFuture fut = GridTestUtils.runMultiThreadedAsync(new Runnable() { -@Override public void run() { -latch.countDown(); - -while(!end.get()) { -FieldsQueryCursor> cursor = execute(srv, query(0) -.setPageSize(PAGE_SIZE_SMALL)); - -cursor.getAll(); -} -} -}, qryThreads, "usr-qry"); - -latch.await(); - -Thread.sleep(500); - -execute(srv, new SqlFieldsQuery("CREATE INDEX PERSON_NAME ON Person (name asc)")).getAll(); -execute(srv, new SqlFieldsQuery("DROP INDEX PERSON_NAME")).getAll(); - -// Test is OK in case DDL operations is passed on hi load queries pressure. -end.set(true); -fut.get(); -} - -/** - * Test release reserved partition after query complete (results is bigger than one page). - * - * @throws Exception If failed. - */ -public void testReleasePartitionReservationSeveralPagesResults() throws Exception { -checkReleasePartitionReservation(PAGE_SIZE_SMALL); -} - -/** - * Test release reserved partition after query complete (results is placed on one page). - * - * @throws Exception If failed. - */ -public void testReleasePartitionReservationOnePageResults() throws Exception { -checkReleasePartitionReservation(KEY_CNT); -} - -/** - * Test release reserved partition after query complete. - * - * @param pageSize Results page size. - * @throws Exception If failed. - */ -public void checkReleasePartitionReservation(int pageSize) throws Exception { -Ignite srv1 = startGrid(1); -startGrid(2); - -srv1.createCache(cacheConfiguration(1)); - -populateBaseQueryData(srv1); - -FieldsQueryCursor> cursor = execute(srv1, query(0).setPageSize(pageSize)); - -cursor.getAll(); - -startGrid(3); - -awaitPartitionMapExcha