[ignite] branch master updated: IGNITE-11233 Fix for .NET build: Ignite Build for Java 11 does not reuse ignite-tools from Build Apache Ignite (Fixes #6127)
This is an automated email from the ASF dual-hosted git repository. dpavlov pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/master by this push: new 1dbf57b IGNITE-11233 Fix for .NET build: Ignite Build for Java 11 does not reuse ignite-tools from Build Apache Ignite (Fixes #6127) 1dbf57b is described below commit 1dbf57bc58c480a4c5500ed0ecb04a18d07fbcd3 Author: Pavel Tupitsyn AuthorDate: Wed Feb 20 10:46:45 2019 +0300 IGNITE-11233 Fix for .NET build: Ignite Build for Java 11 does not reuse ignite-tools from Build Apache Ignite (Fixes #6127) --- .../Common/TestUtils.DotNetCore.cs | 1 + .../Impl/Unmanaged/Jni/ConsoleWriter.cs| 44 ++ 2 files changed, 45 insertions(+) diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Common/TestUtils.DotNetCore.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Common/TestUtils.DotNetCore.cs index 08cae96..f524878 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Common/TestUtils.DotNetCore.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Common/TestUtils.DotNetCore.cs @@ -34,6 +34,7 @@ namespace Apache.Ignite.Core.Tests TestLogger.Instance.Info("GetTestConfiguration: " + GetTestName()); Environment.SetEnvironmentVariable("IGNITE_NATIVE_TEST_CLASSPATH", "true"); + Environment.SetEnvironmentVariable("IGNITE_NET_SUPPRESS_JAVA_ILLEGAL_ACCESS_WARNINGS", "true"); return new IgniteConfiguration { diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/ConsoleWriter.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/ConsoleWriter.cs index b1baf79..512afed 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/ConsoleWriter.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/ConsoleWriter.cs @@ -26,6 +26,29 @@ namespace Apache.Ignite.Core.Impl.Unmanaged.Jni /// internal sealed class ConsoleWriter : MarshalByRefObject { +/** Environment variable: whether to suppress stderr warnings from Java 11. */ +private const string EnvIgniteNetSuppressJavaIllegalAccessWarnings = +"IGNITE_NET_SUPPRESS_JAVA_ILLEGAL_ACCESS_WARNINGS"; + +/** Warnings to suppress. */ +private static readonly string[] JavaIllegalAccessWarnings = +{ +"WARNING: An illegal reflective access operation has occurred", +"WARNING: Illegal reflective access by org.apache.ignite.internal.util.GridUnsafe$2", +"WARNING: Please consider reporting this to the maintainers of", +"WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations", +"WARNING: All illegal access operations will be denied in a future release" +}; + +/** Flag: whether to suppress stderr warnings from Java 11. */ +private readonly bool _suppressIllegalAccessWarnings; + +public ConsoleWriter() +{ +_suppressIllegalAccessWarnings = + Environment.GetEnvironmentVariable(EnvIgniteNetSuppressJavaIllegalAccessWarnings) == "true"; +} + /// /// Writes the specified message to console. /// @@ -33,6 +56,11 @@ namespace Apache.Ignite.Core.Impl.Unmanaged.Jni Justification = "Only instance methods can be called across AppDomain boundaries.")] public void Write(string message, bool isError) { +if (_suppressIllegalAccessWarnings && isError && IsKnownWarning(message)) +{ +return; +} + var target = isError ? Console.Error : Console.Out; target.Write(message); } @@ -43,5 +71,21 @@ namespace Apache.Ignite.Core.Impl.Unmanaged.Jni // Ensure that cross-AppDomain reference lives forever. return null; } + +/// +/// Returns a value indicating whether provided message is a known warning. +/// +private static bool IsKnownWarning(string message) +{ +foreach (var warning in JavaIllegalAccessWarnings) +{ +if (message.StartsWith(warning, StringComparison.Ordinal)) +{ +return true; +} +} + +return false; +} } }
[ignite] branch ignite-invokeAll updated: invokeAll
This is an automated email from the ASF dual-hosted git repository. sboikov pushed a commit to branch ignite-invokeAll in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/ignite-invokeAll by this push: new 84b431c invokeAll 84b431c is described below commit 84b431c25ba2e7168f0bc2d4eedaf259e09db564 Author: sboikov AuthorDate: Wed Feb 20 09:23:19 2019 +0300 invokeAll --- .../distributed/dht/atomic/GridDhtAtomicCache.java | 27 ++ .../processors/cache/tree/CacheDataTree.java | 5 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java index 9c8ae3e..5f694be 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java @@ -2663,7 +2663,6 @@ public class GridDhtAtomicCache extends GridDhtCacheAdapter { c.rdrs, c.reqIdx, updRes, -dhtFut, affAssignment, sndPrevVal); } @@ -2733,7 +2732,6 @@ public class GridDhtAtomicCache extends GridDhtCacheAdapter { readers, i, updRes, -dhtFut, affAssignment, sndPrevVal); } @@ -2756,11 +2754,12 @@ public class GridDhtAtomicCache extends GridDhtCacheAdapter { GridDhtCacheEntry.ReaderId[] readers, int idx, GridCacheUpdateAtomicResult updRes, -GridDhtAtomicAbstractUpdateFuture dhtFut, AffinityAssignment affAssignment, boolean sndPrevVal ) throws GridCacheEntryRemovedException { +GridDhtAtomicAbstractUpdateFuture dhtFut = dhtUpdRes.dhtFuture(); + GridCacheOperation op = req.operation(); if (dhtFut != null) { @@ -2858,11 +2857,11 @@ public class GridDhtAtomicCache extends GridDhtCacheAdapter { dhtUpdRes.returnValue(retVal = new GridCacheReturn(nearNode.isLocal())); retVal.addEntryProcessResult(ctx, -entry.key(), -null, -compRes.get1(), -compRes.get2(), -req.keepBinary()); +entry.key(), +null, +compRes.get1(), +compRes.get2(), +req.keepBinary()); } } else { @@ -2870,13 +2869,11 @@ public class GridDhtAtomicCache extends GridDhtCacheAdapter { if (retVal == null) { CacheObject ret = updRes.oldValue(); -if (retVal == null) { -dhtUpdRes.returnValue(retVal = new GridCacheReturn(ctx, -nearNode.isLocal(), -req.keepBinary(), -req.returnValue() ? ret : null, -updRes.success())); -} +dhtUpdRes.returnValue(new GridCacheReturn(ctx, +nearNode.isLocal(), +req.keepBinary(), +req.returnValue() ? ret : null, +updRes.success())); } } } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/CacheDataTree.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/CacheDataTree.java index d2b72ec..947b589 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/CacheDataTree.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/CacheDataTree.java @@ -117,6 +117,11 @@ public class CacheDataTree extends BPlusTree { rowsComparator = new Comparator() { @Override public int compare(CacheSearchRow row1, CacheSearchRow row2) { try { +int cmp = Integer.compare(row1.hash(), row2.hash()); + +if (cmp != 0) +return cmp; + return compareKeyBytes( row1.key().valueBytes(grp.cacheObjectContext()), row2.key().valueBytes(grp.cacheObjectContext()));
[ignite] branch master updated: IGNITE-11353 Web console: Fixed redirect to signin page from with status "403" page.
This is an automated email from the ASF dual-hosted git repository. akuznetsov pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/master by this push: new cc36b88 IGNITE-11353 Web console: Fixed redirect to signin page from with status "403" page. cc36b88 is described below commit cc36b8818c10d60bba2b6db14f3e96c3db7e5610 Author: Ilya Borisov AuthorDate: Wed Feb 20 10:02:29 2019 +0700 IGNITE-11353 Web console: Fixed redirect to signin page from with status "403" page. --- .../app/components/timed-redirection/controller.ts | 16 .../web-console/frontend/app/modules/user/user.module.js | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/modules/web-console/frontend/app/components/timed-redirection/controller.ts b/modules/web-console/frontend/app/components/timed-redirection/controller.ts index 034ff3c..c8fa892 100644 --- a/modules/web-console/frontend/app/components/timed-redirection/controller.ts +++ b/modules/web-console/frontend/app/components/timed-redirection/controller.ts @@ -17,6 +17,7 @@ import {StateOrName, StateService} from '@uirouter/angularjs'; import {RawParams} from '@uirouter/core/lib/params/interface'; +import {default as UserFactory} from 'app/modules/user/User.service'; interface State { name: StateOrName, @@ -24,7 +25,7 @@ interface State { } export class TimedRedirectionCtrl implements ng.IComponentController, ng.IOnInit, ng.IOnDestroy { -static $inject = ['$state', '$interval']; +static $inject = ['$state', '$interval', 'User']; lastSuccessState = JSON.parse(localStorage.getItem('lastStateChangeSuccess')); @@ -34,7 +35,7 @@ export class TimedRedirectionCtrl implements ng.IComponentController, ng.IOnInit countDown: ng.IPromise; -constructor(private $state: StateService, private $interval: ng.IIntervalService) {} +constructor(private $state: StateService, private $interval: ng.IIntervalService, private user: ReturnType) {} $onInit() { this.startCountDown(); @@ -44,8 +45,15 @@ export class TimedRedirectionCtrl implements ng.IComponentController, ng.IOnInit this.$interval.cancel(this.countDown); } -go(): void { -this.$state.go(this.stateToGo.name, this.stateToGo.params); +async go(): void { +try { +await this.user.load(); + +this.$state.go(this.stateToGo.name, this.stateToGo.params); +} +catch (ignored) { +this.$state.go('signin'); +} } startCountDown(): void { diff --git a/modules/web-console/frontend/app/modules/user/user.module.js b/modules/web-console/frontend/app/modules/user/user.module.js index c78cc8c..370d470 100644 --- a/modules/web-console/frontend/app/modules/user/user.module.js +++ b/modules/web-console/frontend/app/modules/user/user.module.js @@ -88,7 +88,7 @@ function run($root, $transitions, AclService, User, Activities) { throw new Error('Illegal access error'); }) .catch(() => { -return $state.target(trans.to().failState || '403'); +return $state.target(trans.to().failState || 'base.403'); }); }); }
[ignite] branch master updated: IGNITE-11313 Fix cluster hangs on cache invoke with binary objects creation - Fixes #6102.
This is an automated email from the ASF dual-hosted git repository. dgovorukhin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/master by this push: new 0058d3f IGNITE-11313 Fix cluster hangs on cache invoke with binary objects creation - Fixes #6102. 0058d3f is described below commit 0058d3f896f159a2d809eed91fb338209b2c06a4 Author: ibessonov AuthorDate: Tue Feb 19 21:50:54 2019 +0300 IGNITE-11313 Fix cluster hangs on cache invoke with binary objects creation - Fixes #6102. Signed-off-by: Dmitriy Govorukhin --- .../ignite/internal/MarshallerContextImpl.java | 29 - .../internal/UnregisteredBinaryTypeException.java | 59 ++- .../internal/binary/BinaryClassDescriptor.java | 8 +- .../ignite/internal/binary/BinaryContext.java | 12 ++- .../internal/binary/BinaryFieldAccessor.java | 6 +- .../binary/builder/BinaryObjectBuilderImpl.java| 2 +- .../internal/client/thin/TcpIgniteClient.java | 15 ++- .../optimized/OptimizedMarshallerUtils.java| 2 +- .../processors/cache/GridCacheMapEntry.java| 6 +- .../binary/CacheObjectBinaryProcessorImpl.java | 11 +- .../distributed/dht/atomic/GridDhtAtomicCache.java | 17 ++- .../platform/binary/PlatformBinaryProcessor.java | 2 +- .../binary/ClientBinaryTypeNamePutRequest.java | 3 +- .../ignite/marshaller/MarshallerContext.java | 26 - .../org/apache/ignite/thread/IgniteThread.java | 9 ++ .../internal/binary/BinaryMarshallerSelfTest.java | 4 +- .../GridBinaryMarshallerCtxDisabledSelfTest.java | 6 +- ...tadataRegistrationInsideEntryProcessorTest.java | 118 + .../cache/GridCacheEntryMemorySizeSelfTest.java| 6 +- .../marshaller/MarshallerContextTestImpl.java | 2 +- 20 files changed, 275 insertions(+), 68 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java index a9ac22d..bfe2da0 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java @@ -258,9 +258,10 @@ public class MarshallerContextImpl implements MarshallerContext { /** {@inheritDoc} */ @Override public boolean registerClassName( -byte platformId, -int typeId, -String clsName +byte platformId, +int typeId, +String clsName, +boolean failIfUnregistered ) throws IgniteCheckedException { ConcurrentMap cache = getCacheFor(platformId); @@ -276,7 +277,13 @@ public class MarshallerContextImpl implements MarshallerContext { if (transport.stopping()) return false; -IgniteInternalFuture fut = transport.awaitMappingAcceptance(new MarshallerMappingItem(platformId, typeId, clsName), cache); +MarshallerMappingItem item = new MarshallerMappingItem(platformId, typeId, clsName); + +GridFutureAdapter fut = transport.awaitMappingAcceptance(item, cache); + +if (failIfUnregistered && !fut.isDone()) +throw new UnregisteredBinaryTypeException(typeId, fut); + MappingExchangeResult res = fut.get(); return convertXchRes(res); @@ -286,7 +293,13 @@ public class MarshallerContextImpl implements MarshallerContext { if (transport.stopping()) return false; -IgniteInternalFuture fut = transport.proposeMapping(new MarshallerMappingItem(platformId, typeId, clsName), cache); +MarshallerMappingItem item = new MarshallerMappingItem(platformId, typeId, clsName); + +GridFutureAdapter fut = transport.proposeMapping(item, cache); + +if (failIfUnregistered && !fut.isDone()) +throw new UnregisteredBinaryTypeException(typeId, fut); + MappingExchangeResult res = fut.get(); return convertXchRes(res); @@ -294,6 +307,12 @@ public class MarshallerContextImpl implements MarshallerContext { } /** {@inheritDoc} */ +@Override +public boolean registerClassName(byte platformId, int typeId, String clsName) { +throw new UnsupportedOperationException("registerClassName"); +} + +/** {@inheritDoc} */ @Override public boolean registerClassNameLocally(byte platformId, int typeId, String clsName) throws IgniteCheckedException { diff --git a/modules/core/src/main/java/org/apache/ignite/internal/UnregisteredBinaryTypeException.java b/modules/core/src/main/java/org/apache/ignite/internal/UnregisteredBinaryTypeException.java index f46de12..de507be 100644 ---
[ignite] branch master updated: IGNITE-8575 Change Baseline auto-adjust parameters via console.sh
This is an automated email from the ASF dual-hosted git repository. dgovorukhin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/master by this push: new 1693f0e IGNITE-8575 Change Baseline auto-adjust parameters via console.sh 1693f0e is described below commit 1693f0ef0ada2afd504846abfc029cc607662e90 Author: ibessonov AuthorDate: Tue Dec 25 14:01:50 2018 +0300 IGNITE-8575 Change Baseline auto-adjust parameters via console.sh --- .../ignite/internal/commandline/Command.java | 5 +- .../internal/commandline/CommandHandler.java | 108 -- .../baseline/VisorBaselineAutoAdjustSettings.java | 70 .../visor/baseline/VisorBaselineOperation.java | 4 +- .../internal/visor/baseline/VisorBaselineTask.java | 35 +- .../visor/baseline/VisorBaselineTaskArg.java | 22 +++- .../visor/baseline/VisorBaselineTaskResult.java| 17 ++- .../visor/baseline/VisorBaselineViewTask.java | 8 +- .../apache/ignite/util/GridCommandHandlerTest.java | 123 + 9 files changed, 378 insertions(+), 14 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/commandline/Command.java b/modules/core/src/main/java/org/apache/ignite/internal/commandline/Command.java index 1f7c0a3..8ed4dac 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/commandline/Command.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/commandline/Command.java @@ -42,6 +42,9 @@ public enum Command { /** */ WAL("--wal"); +/** Private values copy so there's no need in cloning it every time. */ +private static final Command[] VALUES = Command.values(); + /** */ private final String text; @@ -57,7 +60,7 @@ public enum Command { * @return Command for the text. */ public static Command of(String text) { -for (Command cmd : Command.values()) { +for (Command cmd : VALUES) { if (cmd.text().equalsIgnoreCase(text)) return cmd; } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommandHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommandHandler.java index 41e67a10..f2b4237 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommandHandler.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommandHandler.java @@ -80,6 +80,7 @@ import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.internal.util.typedef.internal.SB; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.internal.visor.VisorTaskArgument; +import org.apache.ignite.internal.visor.baseline.VisorBaselineAutoAdjustSettings; import org.apache.ignite.internal.visor.baseline.VisorBaselineNode; import org.apache.ignite.internal.visor.baseline.VisorBaselineOperation; import org.apache.ignite.internal.visor.baseline.VisorBaselineTask; @@ -165,6 +166,7 @@ import static org.apache.ignite.internal.commandline.cache.argument.ListCommandA import static org.apache.ignite.internal.commandline.cache.argument.ValidateIndexesCommandArg.CHECK_FIRST; import static org.apache.ignite.internal.commandline.cache.argument.ValidateIndexesCommandArg.CHECK_THROUGH; import static org.apache.ignite.internal.visor.baseline.VisorBaselineOperation.ADD; +import static org.apache.ignite.internal.visor.baseline.VisorBaselineOperation.AUTOADJUST; import static org.apache.ignite.internal.visor.baseline.VisorBaselineOperation.COLLECT; import static org.apache.ignite.internal.visor.baseline.VisorBaselineOperation.REMOVE; import static org.apache.ignite.internal.visor.baseline.VisorBaselineOperation.SET; @@ -293,6 +295,15 @@ public class CommandHandler { private static final String BASELINE_SET_VERSION = "version"; /** */ +private static final String BASELINE_AUTO_ADJUST = "autoadjust"; + +/** */ +private static final String BASELINE_AUTO_ADJUST_ENABLE = "enable"; + +/** */ +private static final String BASELINE_AUTO_ADJUST_DISABLE = "disable"; + +/** */ static final String WAL_PRINT = "print"; /** */ @@ -1236,6 +1247,10 @@ public class CommandHandler { baselineVersion(client, baselineArgs); break; +case BASELINE_AUTO_ADJUST: +baselineAutoAdjust(client, baselineArgs); +break; + case BASELINE_COLLECT: baselinePrint(client); break; @@ -1256,20 +1271,38 @@ public class CommandHandler { case SET: List consistentIds = getConsistentIds(s); -return new VisorBaselineTaskArg(op, -1, consistentIds); +return new VisorBaselineTaskArg(op, -1, consistentIds, null); case VERSION:
[ignite] branch master updated: IGNITE-11243 Fixed NPE when using control.sh script with an older node - Fixes #6118.
This is an automated email from the ASF dual-hosted git repository. agoncharuk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/master by this push: new a66e679 IGNITE-11243 Fixed NPE when using control.sh script with an older node - Fixes #6118. a66e679 is described below commit a66e679e4f91b099724fca67ea88689c8e4e7907 Author: Sergey Kosarev AuthorDate: Tue Feb 19 16:28:03 2019 +0300 IGNITE-11243 Fixed NPE when using control.sh script with an older node - Fixes #6118. Signed-off-by: Alexey Goncharuk --- .../apache/ignite/internal/commandline/CommandHandler.java | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommandHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommandHandler.java index 03bb1cc..41e67a10 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommandHandler.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommandHandler.java @@ -30,7 +30,6 @@ import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import java.util.Optional; import java.util.Scanner; import java.util.Set; import java.util.UUID; @@ -1302,14 +1301,17 @@ public class CommandHandler { Map srvs = res.getServers(); -Optional crdOpt = srvs.values().stream() -.min(Comparator.comparing(VisorBaselineNode::getOrder)); +// if task runs on a node with VisorBaselineNode of old version (V1) we'll get order=null for all nodes. -String crdStr = crdOpt.map( -crd -> "ConsistentId=" + crd.getConsistentId() + ", Order=" + crd.getOrder()) +String crdStr = srvs.values().stream() +// check for not null +.filter(node -> node.getOrder() != null) +.min(Comparator.comparing(VisorBaselineNode::getOrder)) +// format +.map(crd -> " (Coordinator: ConsistentId=" + crd.getConsistentId() + ", Order=" + crd.getOrder() + ")") .orElse(""); -log("Current topology version: " + res.getTopologyVersion() + " (Coordinator: " + crdStr + ")"); +log("Current topology version: " + res.getTopologyVersion() + crdStr); nl(); if (F.isEmpty(baseline))
[ignite] branch master updated: IGNITE-11214 Use discovery topology version when fetching affinity - Fixes #6033.
This is an automated email from the ASF dual-hosted git repository. agoncharuk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/master by this push: new a69e610 IGNITE-11214 Use discovery topology version when fetching affinity - Fixes #6033. a69e610 is described below commit a69e6103789c38caf5328af9fde64ac2549735b1 Author: Alexey Goncharuk AuthorDate: Tue Feb 19 15:59:13 2019 +0300 IGNITE-11214 Use discovery topology version when fetching affinity - Fixes #6033. Signed-off-by: Alexey Goncharuk --- .../processors/affinity/GridAffinityProcessor.java | 70 +++--- 1 file changed, 62 insertions(+), 8 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java index c0b810f..81f6093 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java @@ -191,7 +191,7 @@ public class GridAffinityProcessor extends GridProcessorAdapter { assert cacheName != null; if (aff == null) { -aff = affinityCache(cacheName, ctx.cache().context().exchange().readyAffinityVersion()); +aff = affinityCache(cacheName); if (aff == null) throw new IgniteCheckedException("Failed to get cache affinity (cache was not started " + @@ -337,7 +337,7 @@ public class GridAffinityProcessor extends GridProcessorAdapter { if (key == null) return null; -AffinityInfo affInfo = affinityCache(cacheName, ctx.cache().context().exchange().readyAffinityVersion()); +AffinityInfo affInfo = affinityCache(cacheName); if (affInfo == null) return null; @@ -363,7 +363,7 @@ public class GridAffinityProcessor extends GridProcessorAdapter { */ private Map> keysToNodes(@Nullable final String cacheName, Collection keys) throws IgniteCheckedException { -return keysToNodes(cacheName, keys, ctx.cache().context().exchange().readyAffinityVersion()); +return keysToNodes(cacheName, keys, null); } /** @@ -380,7 +380,17 @@ public class GridAffinityProcessor extends GridProcessorAdapter { AffinityInfo affInfo = affinityCache(cacheName, topVer); -return affInfo != null ? affinityMap(affInfo, keys) : Collections.>emptyMap(); +return affInfo != null ? affinityMap(affInfo, keys) : Collections.emptyMap(); +} + +/** + * @param cacheName Cache name. + * @return Affinity cache. + * @throws IgniteCheckedException In case of error. + */ +@Nullable private AffinityInfo affinityCache(final String cacheName) +throws IgniteCheckedException { +return affinityCache(cacheName, null); } /** @@ -389,7 +399,7 @@ public class GridAffinityProcessor extends GridProcessorAdapter { * @return Affinity cache. * @throws IgniteCheckedException In case of error. */ -@Nullable private AffinityInfo affinityCache(final String cacheName, AffinityTopologyVersion topVer) +@Nullable private AffinityInfo affinityCache(final String cacheName, @Nullable AffinityTopologyVersion topVer) throws IgniteCheckedException { return affinityCacheFuture(cacheName, topVer).get(); } @@ -400,10 +410,34 @@ public class GridAffinityProcessor extends GridProcessorAdapter { * @return Affinity cache. * @throws IgniteCheckedException In case of error. */ -public IgniteInternalFuture affinityCacheFuture(final String cacheName, AffinityTopologyVersion topVer) +public IgniteInternalFuture affinityCacheFuture(final String cacheName, @Nullable AffinityTopologyVersion topVer) throws IgniteCheckedException { assert cacheName != null; +IgniteInternalFuture locFetchFut = localAffinityInfo(cacheName, topVer); + +if (locFetchFut != null) +return locFetchFut; + +return remoteAffinityInfo(cacheName, topVer); +} + +/** + * Tries to fetch affinity info based on local cache affinity info. If cache with the given name is not started + * locally, will return {@code null}. + * + * @param cacheName Cache name to fetch. + * @param topVer Topology version to use. + * @return Future with affinity info or {@code null} if cache is not started locally. + * @throws IgniteCheckedException If failed to start for local cache context initialization. + */ +private IgniteInternalFuture localAffinityInfo( +String cacheName, +@Nullable AffinityTopologyVersion topVer +) throws IgniteCheckedException { +if (topVer ==
[ignite] branch master updated: IGNITE-8571 Added Baseline auto-adjust feature - Fixes #5907.
This is an automated email from the ASF dual-hosted git repository. dgovorukhin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/master by this push: new 9a3de134 IGNITE-8571 Added Baseline auto-adjust feature - Fixes #5907. 9a3de134 is described below commit 9a3de134a5dfdb4385d0f5b8f7b1b16eda93b604 Author: Anton Kalashnikov AuthorDate: Tue Feb 19 11:35:14 2019 +0300 IGNITE-8571 Added Baseline auto-adjust feature - Fixes #5907. Signed-off-by: Dmitriy Govorukhin --- .../rest/JettyRestProcessorBaselineSelfTest.java | 10 + .../org/apache/ignite/IgniteSystemProperties.java | 5 + .../ignite/configuration/IgniteConfiguration.java | 77 - .../cluster/DistributedBaselineConfiguration.java | 76 +++-- .../ignite/internal/cluster/IgniteClusterImpl.java | 21 +- .../cache/GridCachePartitionExchangeManager.java | 4 +- .../dht/GridDhtTopologyFutureAdapter.java | 8 + .../preloader/GridDhtPartitionsExchangeFuture.java | 3 +- .../cluster/BaselineAdjustForbiddenException.java | 41 +++ .../cluster/ChangeGlobalStateFinishMessage.java| 5 +- .../cluster/ChangeGlobalStateMessage.java | 4 +- .../processors/cluster/ClusterProcessor.java | 10 +- .../cluster/GridClusterStateProcessor.java | 27 +- .../autoadjust/BaselineAutoAdjustData.java | 75 + .../autoadjust/BaselineAutoAdjustExecutor.java | 84 + .../autoadjust/BaselineAutoAdjustScheduler.java| 63 .../baseline/autoadjust/ChangeTopologyWatcher.java | 124 .../distributed/DistributedBooleanProperty.java| 2 +- .../DistributedConfigurationProcessor.java | 4 +- .../distributed/DistributedLongProperty.java | 2 +- .../distributed/DistributedProperty.java | 47 ++- ...erty.java => NotWritablePropertyException.java} | 22 +- .../distributed/PropertyUpdateClosure.java}| 23 +- .../metastorage/DistributedMetaStorage.java| 26 ++ .../persistence/DistributedMetaStorageImpl.java| 60 ++-- .../platform/utils/PlatformConfigurationUtils.java | 12 - .../apache/ignite/internal/util/IgniteUtils.java | 13 + .../ClusterBaselineNodesMetricsSelfTest.java | 16 + ...usterActivateDeactivateTestWithPersistence.java | 15 + ...teDynamicCacheStartFailWithPersistenceTest.java | 6 + .../distributed/CacheBaselineTopologyTest.java | 15 + .../CacheDataLossOnPartitionMoveTest.java | 15 + .../distributed/CacheRentingStateRepairTest.java | 15 + .../GridCacheRebalancingWithAsyncClearingTest.java | 16 + .../processors/cache/mvcc/CacheMvccVacuumTest.java | 15 + ...niteBaselineAffinityTopologyActivationTest.java | 15 + .../persistence/IgnitePdsCorruptedIndexTest.java | 16 + .../IgnitePdsPartitionFilesDestroyTest.java| 15 + ...gniteRebalanceScheduleResendPartitionsTest.java | 15 + ...ocalWalModeChangeDuringRebalancingSelfTest.java | 5 + .../ClientAffinityAssignmentWithBaselineTest.java | 15 + .../IgniteAbsentEvictionNodeOutOfBaselineTest.java | 11 + ...hangingBaselineDownCachePutAllFailoverTest.java | 6 + ...hangingBaselineDownCacheRemoveFailoverTest.java | 5 + ...eChangingBaselineUpCachePutAllFailoverTest.java | 6 + ...eChangingBaselineUpCacheRemoveFailoverTest.java | 5 + .../persistence/db/IgniteLogicalRecoveryTest.java | 16 + ...IgnitePdsCacheWalDisabledOnRebalancingTest.java | 15 + .../db/IgnitePdsDataRegionMetricsTest.java | 14 + .../cache/persistence/db/IgnitePdsWithTtlTest.java | 16 + .../SlowHistoricalRebalanceSmallHistoryTest.java | 16 + ...eWalFlushMultiNodeFailoverAbstractSelfTest.java | 16 + .../persistence/db/wal/WalCompactionTest.java | 16 + .../cluster/ChangeTopologyWatcherTest.java | 350 + .../distributed/DistributedConfigurationTest.java | 25 +- .../service/IgniteServiceReassignmentTest.java | 16 + .../ServiceDeploymentOutsideBaselineTest.java | 18 ++ .../testsuites/IgniteKernalSelfTestSuite.java | 3 + .../apache/ignite/util/GridCommandHandlerTest.java | 10 + ...ngingBaselineCacheQueryNodeRestartSelfTest.java | 6 + .../Cache/PersistenceTest.cs | 4 + .../IgniteConfigurationTest.cs | 4 - .../Apache.Ignite.Core/IgniteConfiguration.cs | 60 .../IgniteConfigurationSection.xsd | 15 - 64 files changed, 1410 insertions(+), 285 deletions(-) diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorBaselineSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorBaselineSelfTest.java index 1a83a43..aa20c50 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorBaselineSelfTest.java +++
[ignite] branch master updated: IGNITE-955 Local listener in continuous queries should not be mandatory (#5683)
This is an automated email from the ASF dual-hosted git repository. av pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/master by this push: new 5b7a122 IGNITE-955 Local listener in continuous queries should not be mandatory (#5683) 5b7a122 is described below commit 5b7a1221ed4f8b32012a0ff8c89ae40e9c037cec Author: Petrov Mikhail <32207922+ololo3...@users.noreply.github.com> AuthorDate: Tue Feb 19 11:18:38 2019 +0300 IGNITE-955 Local listener in continuous queries should not be mandatory (#5683) --- .../processors/cache/IgniteCacheProxyImpl.java | 14 +- .../continuous/CacheContinuousQueryHandler.java| 2 +- .../continuous/CacheContinuousQueryHandlerV3.java | 1 - .../continuous/CacheContinuousQueryManager.java| 5 - .../GridCacheContinuousQueryAbstractSelfTest.java | 175 + 5 files changed, 186 insertions(+), 11 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java index a305e7c..afcd60e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java @@ -659,8 +659,12 @@ public class IgniteCacheProxyImpl extends AsyncSupportAdapter qry0 = (ContinuousQuery)qry; -if (qry0.getLocalListener() == null) -throw new IgniteException("Mandatory local listener is not set for the query: " + qry); +if (qry0.getLocalListener() == null && +qry0.getRemoteFilterFactory() == null && +qry0.getRemoteFilter() == null) { +throw new IgniteException("LocalListener, RemoterFilter " + +"or RemoteFilterFactory must be specified for the query: " + qry); +} if (qry0.getRemoteFilter() != null && qry0.getRemoteFilterFactory() != null) throw new IgniteException("Should be used either RemoterFilter or RemoteFilterFactory."); @@ -672,8 +676,10 @@ public class IgniteCacheProxyImpl extends AsyncSupportAdapter qry0 = (ContinuousQueryWithTransformer)qry; -if (qry0.getLocalListener() == null) -throw new IgniteException("Mandatory local transformed event listener is not set for the query: " + qry); +if (qry0.getLocalListener() == null && qry0.getRemoteFilterFactory() == null) { +throw new IgniteException("LocalListener " + +"or RemoteFilterFactory must be specified for the query: " + qry); +} if (qry0.getRemoteTransformerFactory() == null) throw new IgniteException("Mandatory RemoteTransformerFactory is not set for the query: " + qry); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java index 7972c150..b87858e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java @@ -993,7 +993,7 @@ public class CacheContinuousQueryHandler implements GridContinuousHandler @Nullable IgniteClosure, ?> trans) { EventListener locTransLsnr = localTransformedEventListener(); -assert (locLsnr != null && locTransLsnr == null) || (locLsnr == null && locTransLsnr != null); +assert locLsnr == null || locTransLsnr == null; if (F.isEmpty(evts)) return; diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandlerV3.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandlerV3.java index 78228f3..0008cfc 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandlerV3.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandlerV3.java @@ -94,7 +94,6 @@ public class CacheContinuousQueryHandlerV3 extends CacheContinuousQueryHan ignoreClsNotFound, null); -assert locTransLsnr != null; assert rmtTransFactory != null; this.locTransLsnr = locTransLsnr; diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java