[ignite] branch master updated: IGNITE-12001 Remove unreasonable assertions from SchemaExchangeSelfTest - Fixes #6709.
This is an automated email from the ASF dual-hosted git repository. ipavlukhin 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 c8c6c0b IGNITE-12001 Remove unreasonable assertions from SchemaExchangeSelfTest - Fixes #6709. c8c6c0b is described below commit c8c6c0b1d701c27063fcf24156d4acc4523af45d Author: pavlukhin AuthorDate: Sat Jul 20 09:23:34 2019 +0300 IGNITE-12001 Remove unreasonable assertions from SchemaExchangeSelfTest - Fixes #6709. Signed-off-by: ipavlukhin --- .../processors/cache/index/SchemaExchangeSelfTest.java| 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SchemaExchangeSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SchemaExchangeSelfTest.java index eeb187b..556c238 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SchemaExchangeSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SchemaExchangeSelfTest.java @@ -467,17 +467,18 @@ public class SchemaExchangeSelfTest extends AbstractSchemaSelfTest { node1 = start(1, KeyClass.class, ValueClass.class, KeyClass2.class, ValueClass2.class); assertTypes(node1, ValueClass.class, ValueClass2.class); -assertTypes(node2, ValueClass.class); assertCacheStarted(CACHE_NAME, node1); reconnFut.get(); -assertTypes(node2, ValueClass.class, ValueClass2.class); assertCacheNotStarted(CACHE_NAME, node2); node2.cache(CACHE_NAME); + assertCacheStarted(CACHE_NAME, node2); + +assertTypes(node2, ValueClass.class, ValueClass2.class); } /** @@ -539,9 +540,8 @@ public class SchemaExchangeSelfTest extends AbstractSchemaSelfTest { * @throws AssertionError If failed. */ private void assertCacheStarted(String cacheName, IgniteEx... nodes) throws AssertionError { -for (IgniteEx node : nodes) { +for (IgniteEx node : nodes) assertTrue(isCacheStarted(cacheName, node)); -} } /** @@ -552,9 +552,8 @@ public class SchemaExchangeSelfTest extends AbstractSchemaSelfTest { * @throws AssertionError If failed. */ private void assertCacheNotStarted(String cacheName, IgniteEx... nodes) throws AssertionError { -for (IgniteEx node : nodes) { +for (IgniteEx node : nodes) assertFalse(isCacheStarted(cacheName, node)); -} } /**
[ignite] branch ignite-11704 updated: ignite-11704
This is an automated email from the ASF dual-hosted git repository. sboikov pushed a commit to branch ignite-11704 in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/ignite-11704 by this push: new e6a793b ignite-11704 e6a793b is described below commit e6a793bf4caf897453f40ad4df977ea7268dea4c Author: sboikov AuthorDate: Fri Jul 19 21:20:51 2019 +0300 ignite-11704 --- .../processors/cache/CacheGroupContext.java| 3 +- .../processors/cache/GridCacheMapEntry.java| 88 ++- .../cache/IgniteCacheOffheapManager.java | 5 +- .../cache/IgniteCacheOffheapManagerImpl.java | 26 +- .../dht/topology/GridDhtLocalPartition.java| 99 +- .../cache/persistence/GridCacheOffheapManager.java | 8 +- .../distributed/CacheRemoveWithTombstonesTest.java | 39 +++-- 7 files changed, 250 insertions(+), 18 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java index 4af5de5..7963893 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java @@ -47,6 +47,7 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtAffini import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtAffinityAssignmentResponse; import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPreloader; 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.GridDhtPartitionTopology; import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionTopologyImpl; import org.apache.ignite.internal.processors.cache.persistence.DataRegion; @@ -1307,7 +1308,7 @@ public class CacheGroupContext { } public boolean createTombstone(@Nullable GridDhtLocalPartition part) { -return part != null && supportsTombstone(); +return part != null && supportsTombstone() && part.state() == GridDhtPartitionState.MOVING; } /** 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 adc8699..08986a9 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 @@ -1717,8 +1717,12 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme } } -if (cctx.group().createTombstone(localPartition())) -cctx.offheap().removeWithTombstone(cctx, key, newVer, partition(), localPartition()); +if (cctx.group().createTombstone(localPartition())) { +cctx.offheap().removeWithTombstone(cctx, key, newVer, localPartition()); + +if (!cctx.group().createTombstone(localPartition())) +removeTombstone0(newVer); +} else removeValue(); @@ -2818,6 +2822,34 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme } /** + * @param tombstoneVer Tombstone version. + * @throws GridCacheEntryRemovedException If entry was removed. + * @throws IgniteCheckedException If failed. + */ +public void removeTombstone(GridCacheVersion tombstoneVer) throws GridCacheEntryRemovedException, IgniteCheckedException { +lockEntry(); + +try { +checkObsolete(); + +removeTombstone0(tombstoneVer); +} +finally { +unlockEntry(); +} +} + +/** + * @param tombstoneVer Tombstone version. + * @throws IgniteCheckedException If failed. + */ +private void removeTombstone0(GridCacheVersion tombstoneVer) throws IgniteCheckedException { +RemoveClosure closure = new RemoveClosure(this, tombstoneVer); + +cctx.offheap().invoke(cctx, key, localPartition(), closure); +} + +/** * @return {@code True} if this entry should not be evicted from cache. */ protected boolean evictionDisabled() { @@ -5720,6 +5752,58 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme /** * */ +private static class RemoveClosure implements IgniteCacheOffheapManager.OffheapInvokeClosure { +/** */ +private final G
[ignite] branch master updated: IGNITE-12000 Await evictions before stopping nodes in IgniteSqlQueryMinMaxTest to make test stable - Fixes #6708.
This is an automated email from the ASF dual-hosted git repository. ipavlukhin 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 f7cfedd IGNITE-12000 Await evictions before stopping nodes in IgniteSqlQueryMinMaxTest to make test stable - Fixes #6708. f7cfedd is described below commit f7cfedd13d4f1f2cffa2c1da44150ca8d154004f Author: ipavlukhin AuthorDate: Fri Jul 19 22:33:50 2019 +0300 IGNITE-12000 Await evictions before stopping nodes in IgniteSqlQueryMinMaxTest to make test stable - Fixes #6708. Signed-off-by: ipavlukhin --- .../ignite/internal/processors/query/h2/IgniteSqlQueryMinMaxTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/IgniteSqlQueryMinMaxTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/IgniteSqlQueryMinMaxTest.java index 4659f6a..f5f7711 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/IgniteSqlQueryMinMaxTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/IgniteSqlQueryMinMaxTest.java @@ -47,6 +47,8 @@ public class IgniteSqlQueryMinMaxTest extends AbstractIndexingCommonTest { @Override protected void afterTest() throws Exception { super.afterTest(); +awaitPartitionMapExchange(true, false, null); + stopAllGrids(); }
[ignite-teamcity-bot] branch ignite-10989-2 deleted (was 2fa558f)
This is an automated email from the ASF dual-hosted git repository. dpavlov pushed a change to branch ignite-10989-2 in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git. was 2fa558f IGNITE-10989 Removing in-memory caches for data presented in new TcIgnited DB The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[ignite-teamcity-bot] branch runhist-wal-disable deleted (was fba1a18)
This is an automated email from the ASF dual-hosted git repository. dpavlov pushed a change to branch runhist-wal-disable in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git. was fba1a18 Disable WAL experimental This change permanently discards the following revisions: discard fba1a18 Disable WAL experimental
[ignite-teamcity-bot] branch ignite-10989-remove-old-rest deleted (was 8eda88f)
This is an automated email from the ASF dual-hosted git repository. dpavlov pushed a change to branch ignite-10989-remove-old-rest in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git. was 8eda88f IGNITE-10989: Removing tests history and odd usage of old interfaces The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[ignite-teamcity-bot] branch ignite-11105-alias deleted (was d361998)
This is an automated email from the ASF dual-hosted git repository. dpavlov pushed a change to branch ignite-11105-alias in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git. was d361998 IGNITE-11105: TC servers aliases support: PR-less tickets matching fixed The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[ignite-teamcity-bot] branch ignite-gg-14609 deleted (was 3b33263)
This is an automated email from the ASF dual-hosted git repository. dpavlov pushed a change to branch ignite-gg-14609 in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git. was 3b33263 IGNITE-GG-14609: UI finalization Change to tabs, displaying all servers available The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[ignite-teamcity-bot] branch ignite-10930 deleted (was faae2bd)
This is an automated email from the ASF dual-hosted git repository. dpavlov pushed a change to branch ignite-10930 in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git. was faae2bd IGNITE-10930: PR-less contributions: handle PR less contributions branch naming The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[ignite-teamcity-bot] branch ignite-10942 deleted (was 7484ef5)
This is an automated email from the ASF dual-hosted git repository. dpavlov pushed a change to branch ignite-10942 in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git. was 7484ef5 IGNITE-10942: Optimize background JIRA tickets sync done The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[ignite-teamcity-bot] branch master updated: IGNITE-11994: Added query option for detailed report for current tracked branch - Fixes #135.
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-teamcity-bot.git The following commit(s) were added to refs/heads/master by this push: new 927e940 IGNITE-11994: Added query option for detailed report for current tracked branch - Fixes #135. 927e940 is described below commit 927e940832659f16324acbc82961274d15967211 Author: Dmitriy Pavlov AuthorDate: Fri Jul 19 21:45:58 2019 +0300 IGNITE-11994: Added query option for detailed report for current tracked branch - Fixes #135. Signed-off-by: Dmitriy Pavlov --- .../ignite/ci/tcbot/issue/IssueDetector.java | 11 +- .../ignite/ci/web/rest/GetChainResultsAsHtml.java | 6 +- .../ci/web/rest/build/GetBuildTestFailures.java| 5 +- .../rest/tracked/GetTrackedBranchTestResults.java | 62 +++ ignite-tc-helper-web/src/main/webapp/current.html | 122 - .../src/main/webapp/js/testfails-2.2.js| 10 +- ignite-tc-helper-web/src/main/webapp/pr.html | 2 - .../ci/tcbot/chain/BuildChainProcessorTest.java| 6 +- .../ci/tcbot/chain/TrackedBranchProcessorTest.java | 3 +- .../tcbot/engine/chain/BuildChainProcessor.java| 49 ++--- .../ignite/tcbot/engine/chain/FullChainRunCtx.java | 49 + .../ignite/tcbot/engine/chain/MultBuildRunCtx.java | 7 +- .../ignite/tcbot/engine/chain/SortOption.java | 45 .../ignite/tcbot/engine/pr/PrChainsProcessor.java | 15 ++- .../ignite/tcbot/engine/tracked/DisplayMode.java | 45 .../tracked/IDetailedStatusForTrackedBranch.java | 11 +- .../tracked/TrackedBranchChainsProcessor.java | 12 +- .../apache/ignite/tcbot/engine/ui/DsChainUi.java | 92 +--- .../apache/ignite/tcbot/engine/ui/DsSuiteUi.java | 13 ++- 19 files changed, 437 insertions(+), 128 deletions(-) diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/issue/IssueDetector.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/issue/IssueDetector.java index ef0c678..7d6ebbb 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/issue/IssueDetector.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/issue/IssueDetector.java @@ -37,6 +37,7 @@ import org.apache.ignite.ci.issue.Issue; import org.apache.ignite.ci.issue.IssueKey; import org.apache.ignite.ci.issue.IssueType; import org.apache.ignite.ci.jobs.CheckQueueJob; +import org.apache.ignite.tcbot.engine.tracked.DisplayMode; import org.apache.ignite.tcbot.notify.ISlackSender; import org.apache.ignite.ci.tcbot.user.IUserStorage; import org.apache.ignite.ci.teamcity.ignited.change.ChangeCompacted; @@ -575,7 +576,10 @@ public class IssueDetector { buildsToQry, creds, SyncMode.RELOAD_QUEUED, -false); +false, +null, +DisplayMode.None, +null); DsSummaryUi failures = tbProc.getTrackedBranchTestFailures(brachName, @@ -583,7 +587,10 @@ public class IssueDetector { 1, creds, SyncMode.RELOAD_QUEUED, -false); +false, +null, +DisplayMode.OnlyFailures, +null); String issRes = registerIssuesAndNotifyLater(failures, backgroundOpsCreds); diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/GetChainResultsAsHtml.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/GetChainResultsAsHtml.java index f8eccb7..6fc3b53 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/GetChainResultsAsHtml.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/GetChainResultsAsHtml.java @@ -81,7 +81,8 @@ public class GetChainResultsAsHtml { ProcessLogsMode.SUITE_NOT_COMPLETE, false, failRateBranch, -SyncMode.RELOAD_QUEUED); +SyncMode.RELOAD_QUEUED, +null); DsChainUi status = new DsChainUi(srvCode, tcIgn.serverCode(), ctx.branchName()); @@ -89,7 +90,8 @@ public class GetChainResultsAsHtml { status.chainName = ctx.suiteName(); -status.initFromContext(tcIgn, ctx, failRateBranch, injector.getInstance(IStringCompactor.class), false); +IStringCompactor c = injector.getInstance(IStringCompactor.class); +status.initFromContext(tcIgn, ctx, failRateBranch, c, false, null, null); res.append(showChainAtServerData(status)); diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/build/GetBuildTestFailures.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/build/GetBuildTestFailures.java index 6dd733e..0960b68 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/c
[ignite-teamcity-bot] branch master updated: Removal of unused V2.0 run history, teamcitySuiteRunHist & teamcityTestRunHist
destroy operation"); } -System.err.println("Test hist entries destroyed [" + testHist + "] for [" + buildStartTimes + "] builds"); +System.err.println("Test build start times destroyed [" + buildStartTimes + "] builds"); } /** diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/Version.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/Version.java index aa3d063..48b8fb1 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/Version.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/Version.java @@ -28,7 +28,7 @@ package org.apache.ignite.ci.web.model; public static final String GITHUB_REF = "https://github.com/apache/ignite-teamcity-bot";; /** TC Bot Version. */ -public static final String VERSION = "20190718"; +public static final String VERSION = "20190719"; /** Java version, where Web App is running. */ public String javaVer; diff --git a/ignite-tc-helper-web/src/test/java/org/apache/ignite/tcignited/IgnitedTcInMemoryIntegrationTest.java b/ignite-tc-helper-web/src/test/java/org/apache/ignite/tcignited/IgnitedTcInMemoryIntegrationTest.java index 8518e02..ad332af 100644 --- a/ignite-tc-helper-web/src/test/java/org/apache/ignite/tcignited/IgnitedTcInMemoryIntegrationTest.java +++ b/ignite-tc-helper-web/src/test/java/org/apache/ignite/tcignited/IgnitedTcInMemoryIntegrationTest.java @@ -47,8 +47,8 @@ import org.apache.ignite.tcbot.persistence.IgniteStringCompactor; import org.apache.ignite.tcbot.persistence.TcBotPersistenceModule; import org.apache.ignite.tcbot.persistence.scheduler.IScheduler; import org.apache.ignite.tcignited.history.IRunHistory; -import org.apache.ignite.tcignited.history.IRunStat; -import org.apache.ignite.tcignited.history.RunHistCompactedDao; +import org.apache.ignite.tcignited.history.ISuiteRunHistory; +import org.apache.ignite.tcignited.history.BuildStartTimeStorage; import org.apache.ignite.tcignited.history.RunHistSync; import org.apache.ignite.tcservice.ITeamcity; import org.apache.ignite.tcservice.TeamcityServiceConnection; @@ -557,7 +557,7 @@ public class IgnitedTcInMemoryIntegrationTest { public void testRunHistSaveLoad() { Injector injector = Guice.createInjector(new TeamcityIgnitedModule(), new IgniteAndSchedulerTestModule()); -injector.getInstance(RunHistCompactedDao.class).init(); +injector.getInstance(BuildStartTimeStorage.class).init(); final IStringCompactor c = injector.getInstance(IStringCompactor.class); final String srvId = "apache"; @@ -569,37 +569,31 @@ public class IgnitedTcInMemoryIntegrationTest { final Map buildsMap = tst.apacheBuilds(); -final RunHistSync histSync = injector.getInstance(RunHistSync.class); -buildsMap.forEach((id, build) -> histSync.saveToHistoryLater(srvId, build)); - final ITeamcityIgnitedProvider inst = injector.getInstance(ITeamcityIgnitedProvider.class); final ITeamcityIgnited srv = inst.server(srvId, Mockito.mock(ITcBotUserCreds.class)); -final IRunHistory testRunHist = srv.getTestRunHist(PrChainsProcessorTest.TEST_FLAKY_IN_MASTER, branch); +final IRunHistory testRunHist = srv.getTestRunHist( +c.getStringId(PrChainsProcessorTest.TEST_FLAKY_IN_MASTER), +c.getStringId(PrChainsProcessorTest.CACHE_1), +c.getStringId(branch)); -assertNotNull(testRunHist); -assertEquals(0.5, testRunHist.getFailRate(), 0.1); +// todo register builds buildsMap somehow in injector +// assertNotNull(testRunHist); +// assertEquals(0.5, testRunHist.getFailRate(), 0.1); -final IRunHistory cache1Hist = srv.getSuiteRunHist(PrChainsProcessorTest.CACHE_1, branch); +final ISuiteRunHistory cache1Hist = srv.getSuiteRunHist(c.getStringId(PrChainsProcessorTest.CACHE_1) +, c.getStringId(branch)); assertNotNull(cache1Hist); -assertEquals(1.0, cache1Hist.getFailRate(), 0.1); -assertEquals(0.18, cache1Hist.getCriticalFailRate(), 0.05); - -final IRunStat cache1HistAllBranch = srv.getSuiteRunStatAllBranches(PrChainsProcessorTest.CACHE_1); - -assertNotNull(cache1HistAllBranch); - -String printable = cache1HistAllBranch.getFailPercentPrintable(); -System.err.println(printable); -// should be several builds in a separate branch -assertEquals(0.5, cache1HistAllBranch.getFailRate(), 0.05); +// todo register builds somehow in injector +//assertEquals(1.0, cache1Hist.self().getFailRate(), 0.1); +//assertEquals(0.18, cache1Hist.self().getCriticalFailRate(), 0.05); } @Test public void testHistoryBackgroundUpdateWorks() { Injector injector = Guice.createInjector(new TeamcityI
[ignite] 12/19: GG-21338 Fixed checkpointReadLock() may hang during node stop
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch gg-21368 in repository https://gitbox.apache.org/repos/asf/ignite.git commit fb2553a00aa4885280dcde883248742f9b753c07 Author: Ivan Bessonov AuthorDate: Wed Jul 17 14:59:57 2019 +0300 GG-21338 Fixed checkpointReadLock() may hang during node stop --- .../dht/topology/GridDhtPartitionTopologyImpl.java | 23 +- .../GridCacheDatabaseSharedManager.java| 6 +++--- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtPartitionTopologyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtPartitionTopologyImpl.java index 134feac..2dec335 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtPartitionTopologyImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtPartitionTopologyImpl.java @@ -2245,6 +2245,8 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology { ctx.database().checkpointReadLock(); try { +Map> addToWaitGroups = new HashMap<>(); + lock.writeLock().lock(); try { @@ -2282,7 +2284,7 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology { GridDhtPartitionState state = partMap.get(part); -if (state == null || state != OWNING) +if (state != OWNING) continue; if (!newOwners.contains(remoteNodeId)) { @@ -2302,9 +2304,7 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology { UUID nodeId = entry.getKey(); Set rebalancedParts = entry.getValue(); -// Add to wait groups to ensure late assignment switch after all partitions are rebalanced. -for (Integer part : rebalancedParts) - ctx.cache().context().affinity().addToWaitGroup(groupId(), part, nodeId, topologyVersionFuture().initialVersion()); +addToWaitGroups.put(nodeId, new HashSet<>(rebalancedParts)); if (!rebalancedParts.isEmpty()) { Set historical = rebalancedParts.stream() @@ -2323,9 +2323,22 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology { } node2part = new GridDhtPartitionFullMap(node2part, updateSeq.incrementAndGet()); -} finally { +} +finally { lock.writeLock().unlock(); } + +for (Map.Entry> entry : addToWaitGroups.entrySet()) { +// Add to wait groups to ensure late assignment switch after all partitions are rebalanced. +for (Integer part : entry.getValue()) { +ctx.cache().context().affinity().addToWaitGroup( +groupId(), +part, +entry.getKey(), +topologyVersionFuture().initialVersion() +); +} +} } finally { ctx.database().checkpointReadUnlock(); 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 42a9cdc..6e6992e 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 @@ -94,6 +94,7 @@ import org.apache.ignite.internal.NodeStoppingException; import org.apache.ignite.internal.managers.discovery.GridDiscoveryManager; import org.apache.ignite.internal.mem.DirectMemoryProvider; import org.apache.ignite.internal.mem.DirectMemoryRegion; +import org.apache.ignite.internal.metric.IoStatisticsHolderNoOp; import org.apache.ignite.internal.pagemem.FullPageId; import org.apache.ignite.internal.pagemem.PageIdAllocator; import org.apache.ignite.internal.pagemem.PageIdUtils; @@ -154,7 +155,6 @@ import org.apache.ignite.internal.processors.cache.persistence.wal.crc.IgniteDat import org.apache.ignite.internal.processors.compress.CompressionProcessor; import org.apache.ignite.internal.processors.port.GridPortRecord; import org.apache.ignite.internal.processors.query.GridQueryProcessor; -import org.apache.ignite.internal.metric.IoStatisticsHolderNoOp; import org.apache.ignite.internal.util.GridCo
[ignite] 01/19: GG-21394: missed slf4j-simple-1.7.7.jar in binary packages
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch gg-21368 in repository https://gitbox.apache.org/repos/asf/ignite.git commit 5c5769e893d0f72b24afd2396153f4cfe4633b55 Author: Alexey Platonov <40424278+avplato...@users.noreply.github.com> AuthorDate: Tue Jul 16 17:58:33 2019 +0300 GG-21394: missed slf4j-simple-1.7.7.jar in binary packages --- modules/slf4j/pom.xml | 6 ++ 1 file changed, 6 insertions(+) diff --git a/modules/slf4j/pom.xml b/modules/slf4j/pom.xml index 4f148fc..84a470c 100644 --- a/modules/slf4j/pom.xml +++ b/modules/slf4j/pom.xml @@ -47,6 +47,12 @@ +org.slf4j +slf4j-simple +${slf4j.version} + + + org.gridgain ignite-core ${project.version}
[ignite] 06/19: GG-20750: SQL: Fix performance drop with enabling global SQL memory quota.
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch gg-21368 in repository https://gitbox.apache.org/repos/asf/ignite.git commit 5417a6c5e109e1e3bb3eaa402bf1275026dc000f Author: Andrey V. Mashenkov AuthorDate: Wed Jul 17 11:09:10 2019 +0300 GG-20750: SQL: Fix performance drop with enabling global SQL memory quota. --- .../processors/query/h2/H2MemoryTracker.java | 3 +- .../processors/query/h2/QueryMemoryManager.java| 72 + .../processors/query/h2/QueryMemoryTracker.java| 113 +++-- .../oom/AbstractQueryMemoryTrackerSelfTest.java| 27 - ...yMemoryTrackerWithQueryParallelismSelfTest.java | 36 +++ .../query/oom/QueryMemoryTrackerSelfTest.java | 11 ++ 6 files changed, 183 insertions(+), 79 deletions(-) diff --git a/modules/h2/src/main/java/org/apache/ignite/internal/processors/query/h2/H2MemoryTracker.java b/modules/h2/src/main/java/org/apache/ignite/internal/processors/query/h2/H2MemoryTracker.java index e1d3aac..bbcc5f4 100644 --- a/modules/h2/src/main/java/org/apache/ignite/internal/processors/query/h2/H2MemoryTracker.java +++ b/modules/h2/src/main/java/org/apache/ignite/internal/processors/query/h2/H2MemoryTracker.java @@ -21,6 +21,8 @@ package org.apache.ignite.internal.processors.query.h2; */ public abstract class H2MemoryTracker implements AutoCloseable { /** + * Reserve memory. + * * @param size Memory to reserve in bytes. */ public abstract void reserve(long size); @@ -30,6 +32,5 @@ public abstract class H2MemoryTracker implements AutoCloseable { * * @param size Memory to release in bytes. */ - public abstract void release(long size); } diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryMemoryManager.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryMemoryManager.java index 58ae9e2..727ed35 100644 --- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryMemoryManager.java +++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryMemoryManager.java @@ -17,6 +17,7 @@ package org.apache.ignite.internal.processors.query.h2; import java.util.concurrent.atomic.AtomicLong; +import java.util.function.LongBinaryOperator; import org.apache.ignite.IgniteLogger; import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.configuration.IgniteConfiguration; @@ -37,6 +38,19 @@ public class QueryMemoryManager extends H2MemoryTracker { */ private static final long DFLT_MEMORY_RESERVATION_BLOCK_SIZE = 512 * KB; +/** */ +static final LongBinaryOperator RELEASE_OP = new LongBinaryOperator() { +@Override public long applyAsLong(long prev, long x) { +long res = prev - x; + +if (res < 0) +throw new IllegalStateException("Try to free more memory that ever be reserved: [" + +"reserved=" + prev + ", toFree=" + x + ']'); + +return res; +} +}; + /** * Default query memory limit. * @@ -48,6 +62,9 @@ public class QueryMemoryManager extends H2MemoryTracker { /** Logger. */ private final IgniteLogger log; +/** */ +private final LongBinaryOperator reserveOp; + /** Global query memory quota. */ //TODO GG-18629: it looks safe to make this configurable at runtime. private final long globalQuota; @@ -74,48 +91,38 @@ public class QueryMemoryManager extends H2MemoryTracker { (long)(Runtime.getRuntime().maxMemory() * 0.6d)); } -long dfltSqlQryMemoryLimit = Long.getLong(IgniteSystemProperties.IGNITE_DEFAULT_SQL_QUERY_MEMORY_LIMIT, 0); +long dfltMemLimit = Long.getLong(IgniteSystemProperties.IGNITE_DEFAULT_SQL_QUERY_MEMORY_LIMIT, 0); -if (dfltSqlQryMemoryLimit == 0) -dfltSqlQryMemoryLimit = globalQuota > 0 ? globalQuota / IgniteConfiguration.DFLT_QUERY_THREAD_POOL_SIZE : -1; +if (dfltMemLimit == 0) +dfltMemLimit = globalQuota > 0 ? globalQuota / IgniteConfiguration.DFLT_QUERY_THREAD_POOL_SIZE : -1; this.blockSize = Long.getLong(IgniteSystemProperties.IGNITE_SQL_MEMORY_RESERVATION_BLOCK_SIZE, DFLT_MEMORY_RESERVATION_BLOCK_SIZE); this.globalQuota = globalQuota; -this.dfltSqlQryMemoryLimit = dfltSqlQryMemoryLimit; +this.dfltSqlQryMemoryLimit = dfltMemLimit; + +this.reserveOp = new ReservationOp(globalQuota); this.log = ctx.log(QueryMemoryManager.class); } /** {@inheritDoc} */ @Override public void reserve(long size) { -assert size >= 0; - if (size == 0) return; // Nothing to do. -reserved.accumulateAndGet(size, (prev, x) -> { -if (prev + x > globalQuota) -throw new IgniteSQLException("SQL query
[ignite] 13/19: GG-21468 Fix javadocs. (#289)
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch gg-21368 in repository https://gitbox.apache.org/repos/asf/ignite.git commit 5f7a54bf4db25aa982759b6c06e3ffc2bebf3e09 Author: smoldachev <47082582+smoldac...@users.noreply.github.com> AuthorDate: Wed Jul 17 15:19:03 2019 +0300 GG-21468 Fix javadocs. (#289) --- .../java/org/apache/ignite/console/websocket/WebSocketEvent.java | 5 + .../apache/ignite/console/config/MailServiceAutoConfiguration.java | 4 +++- parent/pom.xml | 4 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/web-console/web-console-common/src/main/java/org/apache/ignite/console/websocket/WebSocketEvent.java b/modules/web-console/web-console-common/src/main/java/org/apache/ignite/console/websocket/WebSocketEvent.java index d586682..91429f0 100644 --- a/modules/web-console/web-console-common/src/main/java/org/apache/ignite/console/websocket/WebSocketEvent.java +++ b/modules/web-console/web-console-common/src/main/java/org/apache/ignite/console/websocket/WebSocketEvent.java @@ -16,6 +16,11 @@ package org.apache.ignite.console.websocket; +/** + * Websocket event with payload. + * + * @param payload type. + */ public interface WebSocketEvent { /** * @return Request ID. diff --git a/modules/web-console/web-console-mail/src/main/java/org/apache/ignite/console/config/MailServiceAutoConfiguration.java b/modules/web-console/web-console-mail/src/main/java/org/apache/ignite/console/config/MailServiceAutoConfiguration.java index ba9a33c..9f8cba6 100644 --- a/modules/web-console/web-console-mail/src/main/java/org/apache/ignite/console/config/MailServiceAutoConfiguration.java +++ b/modules/web-console/web-console-mail/src/main/java/org/apache/ignite/console/config/MailServiceAutoConfiguration.java @@ -32,7 +32,9 @@ import org.springframework.context.annotation.Primary; import org.springframework.mail.MailSender; import org.springframework.mail.javamail.JavaMailSender; -/** */ +/** + * Mail service auto configuration. + */ @Configuration @Conditional(MailServiceAutoConfiguration.MailSenderCondition.class) @ConditionalOnClass({ MimeMessage.class, MimeType.class, MailSender.class, MailService.class }) diff --git a/parent/pom.xml b/parent/pom.xml index 453ec89..cc0cbf8 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -409,6 +409,10 @@ org.apache.ignite.spi.eventstorage* +SPI: Metric + org.apache.ignite.spi.metric* + + Communication Failure Detection org.apache.ignite.failure
[ignite] 16/19: GG-21561 Remove slf4j-simple binding (Reverts GG-21394)
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch gg-21368 in repository https://gitbox.apache.org/repos/asf/ignite.git commit c5a113f93fe26625676738eb2fb61230758ab3f3 Author: Alexey Goncharuk AuthorDate: Thu Jul 18 11:37:03 2019 +0300 GG-21561 Remove slf4j-simple binding (Reverts GG-21394) --- modules/slf4j/pom.xml | 6 -- 1 file changed, 6 deletions(-) diff --git a/modules/slf4j/pom.xml b/modules/slf4j/pom.xml index 84a470c..4f148fc 100644 --- a/modules/slf4j/pom.xml +++ b/modules/slf4j/pom.xml @@ -47,12 +47,6 @@ -org.slf4j -slf4j-simple -${slf4j.version} - - - org.gridgain ignite-core ${project.version}
[ignite] 07/19: GG-19117 GridCacheProcessor should add info about cache in exception message, if applicable.
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch gg-21368 in repository https://gitbox.apache.org/repos/asf/ignite.git commit 4b045f5a0f04ce89a3266f825bebd3136af5c0b0 Author: ktkalenko AuthorDate: Wed Jul 17 11:54:50 2019 +0300 GG-19117 GridCacheProcessor should add info about cache in exception message, if applicable. --- .../processors/cache/GridCacheProcessor.java | 63 ++ 1 file changed, 52 insertions(+), 11 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java index 7399123..ee17408 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java @@ -35,6 +35,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +import java.util.function.Supplier; import java.util.stream.Collectors; import java.util.stream.Stream; import javax.cache.configuration.FactoryBuilder; @@ -240,6 +241,12 @@ public class GridCacheProcessor extends GridProcessorAdapter { "(encryption settings are different for cache '%s' : local=%s, remote=%s.)"; /** */ +private static final String CACHE_NAME_AND_OPERATION_FORMAT = "[cacheName=%s, operation=%s]"; + +/** */ +private static final String CACHE_NAMES_AND_OPERATION_FORMAT = "[cacheNames=%s, operation=%s]"; + +/** */ private final boolean startClientCaches = IgniteSystemProperties.getBoolean(IgniteSystemProperties.IGNITE_START_CACHES_ON_JOIN, false); @@ -4052,8 +4059,10 @@ public class GridCacheProcessor extends GridProcessorAdapter { ) { assert cacheName != null; -if (checkThreadTx) -checkEmptyTransactions(); +if (checkThreadTx) { +checkEmptyTransactionsEx(() -> String.format(CACHE_NAME_AND_OPERATION_FORMAT, cacheName, +"dynamicStartCache")); +} GridPlainClosure, IgniteInternalFuture> startCacheClsr = (grpKeys) -> { assert ccfg == null || !ccfg.isEncryptionEnabled() || !grpKeys.isEmpty(); @@ -4202,8 +4211,16 @@ public class GridCacheProcessor extends GridProcessorAdapter { boolean disabledAfterStart, IgniteUuid restartId ) { -if (checkThreadTx) -checkEmptyTransactions(); +if (checkThreadTx) { +checkEmptyTransactionsEx(() -> { +List cacheNames = storedCacheDataList.stream() +.map(StoredCacheData::config) +.map(CacheConfiguration::getName) +.collect(Collectors.toList()); + +return String.format(CACHE_NAMES_AND_OPERATION_FORMAT, cacheNames, "dynamicStartCachesByStoredConf"); +}); +} GridPlainClosure, IgniteInternalFuture> startCacheClsr = (grpKeys) -> { List srvReqs = null; @@ -4305,8 +4322,10 @@ public class GridCacheProcessor extends GridProcessorAdapter { ) { assert cacheName != null; -if (checkThreadTx) -checkEmptyTransactions(); +if (checkThreadTx) { +checkEmptyTransactionsEx(() -> String.format(CACHE_NAME_AND_OPERATION_FORMAT, cacheName, +"dynamicDestroyCache")); +} DynamicCacheChangeRequest req = DynamicCacheChangeRequest.stopRequest(ctx, cacheName, sql, true); @@ -4338,8 +4357,10 @@ public class GridCacheProcessor extends GridProcessorAdapter { boolean checkThreadTx, boolean destroy ) { -if (checkThreadTx) -checkEmptyTransactions(); +if (checkThreadTx) { +checkEmptyTransactionsEx(() -> String.format(CACHE_NAMES_AND_OPERATION_FORMAT, cacheNames, +"dynamicDestroyCaches")); +} List reqs = new ArrayList<>(cacheNames.size()); @@ -4425,7 +4446,7 @@ public class GridCacheProcessor extends GridProcessorAdapter { if (proxy == null || proxy.isProxyClosed()) return new GridFinishedFuture<>(); // No-op. -checkEmptyTransactions(); +checkEmptyTransactionsEx(() -> String.format(CACHE_NAME_AND_OPERATION_FORMAT, cacheName, "dynamicCloseCache")); if (proxy.context().isLocal()) return dynamicDestroyCache(cacheName, false, true, false, null); @@ -4440,11 +4461,14 @@ public class GridCacheProcessor extends GridProcessorAdapter { * @return Future that will be completed when state is changed for all caches. */ public IgniteInternalFuture resetCacheState(Collection cacheNames) { -checkEmptyTransactions(); - if (F.isEmpty(c
[ignite] 17/19: GG-21424 Fixed compatibility of cache filter of visor idle verify arguments
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch gg-21368 in repository https://gitbox.apache.org/repos/asf/ignite.git commit 04c001eb4f5c1c87834ddcad85c236a2f591ecc1 Author: Anton Kalashnikov AuthorDate: Thu Jul 18 12:23:14 2019 +0300 GG-21424 Fixed compatibility of cache filter of visor idle verify arguments --- .../cache/verify/VerifyBackupPartitionsTaskV2.java| 7 +-- .../internal/visor/verify/VisorIdleVerifyTaskArg.java | 15 --- .../ignite/util/GridCommandHandlerAbstractTest.java | 4 ++-- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/VerifyBackupPartitionsTaskV2.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/VerifyBackupPartitionsTaskV2.java index f0b240d..6b7c125 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/VerifyBackupPartitionsTaskV2.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/VerifyBackupPartitionsTaskV2.java @@ -504,12 +504,7 @@ public class VerifyBackupPartitionsTaskV2 extends ComputeTaskAdapter + * Arguments for task {@link VisorIdleVerifyTask}. */ public class VisorIdleVerifyTaskArg extends VisorDataTransferObject { /** */ @@ -71,8 +71,9 @@ public class VisorIdleVerifyTaskArg extends VisorDataTransferObject { this.caches = caches; this.excludeCaches = excludeCaches; this.skipZeros = skipZeros; -this.cacheFilterEnum = (cacheFilterEnum == null ? CacheFilterEnum.DEFAULT : cacheFilterEnum); this.checkCrc = checkCrc; + +cacheFilterEnum(cacheFilterEnum); } /** @@ -159,10 +160,10 @@ public class VisorIdleVerifyTaskArg extends VisorDataTransferObject { if (protoVer >= V4) { skipZeros = in.readBoolean(); -CacheFilterEnum cfe = CacheFilterEnum.fromOrdinal(in.readByte()); - -cacheFilterEnum = (cfe == null ? CacheFilterEnum.DEFAULT : cfe); +cacheFilterEnum = CacheFilterEnum.fromOrdinal(in.readByte()); } + +cacheFilterEnum(cacheFilterEnum); } } @@ -196,7 +197,7 @@ public class VisorIdleVerifyTaskArg extends VisorDataTransferObject { /** * @return Kind fo cache. */ -public CacheFilterEnum cacheFilterEnum() { +@NotNull public CacheFilterEnum cacheFilterEnum() { return cacheFilterEnum; } diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerAbstractTest.java index 7b385d3..e1c0284 100644 --- a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerAbstractTest.java @@ -123,13 +123,13 @@ public class GridCommandHandlerAbstractTest extends GridCommonAbstractTest { log.info("Test output for " + currentTestMethod()); log.info(""); +System.setOut(sysOut); + if (testOut != null) System.out.println(testOut.toString()); testOut = null; -System.setOut(sysOut); - stopAllGrids(); cleanPersistenceDir();
[ignite] 19/19: Merge branch 'master' into gg-21368
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch gg-21368 in repository https://gitbox.apache.org/repos/asf/ignite.git commit 18551758ad75af2fa3b11af5baf64c82ae8acd8f Merge: 5417a6c bad5683 Author: Andrey V. Mashenkov AuthorDate: Thu Jul 18 14:18:00 2019 +0300 Merge branch 'master' into gg-21368 bin/control.bat| 11 ++-- .../ml/tutorial/TutorialStepByStepExample.java | 1 + .../ignite/internal/commandline/Command.java | 7 --- .../internal/commandline/CommandHandler.java | 34 ++-- .../internal/commandline/CommonArgParser.java | 16 ++ .../ignite/internal/commandline/WalCommands.java | 53 +- .../internal/commandline/cache/CacheCommands.java | 6 --- .../commandline/cache/ResetLostPartitions.java | 5 -- .../commandline/diagnostic/DiagnosticCommand.java | 6 --- .../processors/cache/GridCacheProcessor.java | 63 ++ .../dht/topology/GridDhtPartitionTopologyImpl.java | 23 ++-- .../GridCacheDatabaseSharedManager.java| 6 +-- .../cache/verify/VerifyBackupPartitionsTaskV2.java | 7 +-- .../visor/verify/VisorIdleVerifyTaskArg.java | 15 +++--- .../commandline/CommandHandlerParsingTest.java | 21 ...eWalFlushMultiNodeFailoverAbstractSelfTest.java | 59 ++-- .../util/GridCommandHandlerAbstractTest.java | 4 +- .../apache/ignite/util/GridCommandHandlerTest.java | 52 -- .../visor/verify/ValidateIndexesClosure.java | 11 +++- .../cache/IgniteCacheQueriesLoadTest1.java | 21 +--- modules/slf4j/pom.xml | 6 --- .../ignite/console/websocket/WebSocketEvent.java | 5 ++ .../config/MailServiceAutoConfiguration.java | 4 +- parent/pom.xml | 4 ++ 24 files changed, 280 insertions(+), 160 deletions(-)
[ignite] 04/19: GG-21310 Deployed on GCP console can't display connected cluster (#284)
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch gg-21368 in repository https://gitbox.apache.org/repos/asf/ignite.git commit 1b9a13b2e1421fcd7b9e63969e1b2dc94d70ee9f Author: Andrey Novikov AuthorDate: Wed Jul 17 12:59:09 2019 +0700 GG-21310 Deployed on GCP console can't display connected cluster (#284) --- .../ignite/console/agent/handlers/ClusterHandler.java| 4 ++-- .../ignite/console/agent/handlers/WebSocketRouter.java | 8 +++- .../apache/ignite/console/agent/rest/RestExecutor.java | 16 +--- .../ignite/console/web/socket/WebSocketsManager.java | 10 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/ClusterHandler.java b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/ClusterHandler.java index 0bb54e3..451e064 100644 --- a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/ClusterHandler.java +++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/ClusterHandler.java @@ -102,10 +102,10 @@ public class ClusterHandler extends AbstractClusterHandler { return res; } -catch (InterruptedException | TimeoutException ignored) { +catch (ConnectException | InterruptedException | TimeoutException ignored) { // No-op. } -catch (Exception e) { +catch (Throwable e) { LT.error(log, e, "Failed execute request on node [url=" + nodeUrl + ", parameters=" + params + "]"); } } diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/WebSocketRouter.java b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/WebSocketRouter.java index 4dde8f8..4039936 100644 --- a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/WebSocketRouter.java +++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/WebSocketRouter.java @@ -415,13 +415,11 @@ public class WebSocketRouter implements AutoCloseable { return; } - -String errMsg = ERROR_MSGS.get(evt.getEventType()); - -log.error(errMsg, e); + +log.error("Failed to send response: " + evt, e); try { -send(ses, evt.withError(extractErrorMessage(errMsg, e))); +send(ses, evt.withError(extractErrorMessage(ERROR_MSGS.get(evt.getEventType()), e))); } catch (Exception ex) { log.error("Failed to send response with error", e); diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/rest/RestExecutor.java b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/rest/RestExecutor.java index 7e06722..68141bc 100644 --- a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/rest/RestExecutor.java +++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/rest/RestExecutor.java @@ -19,11 +19,10 @@ package org.apache.ignite.console.agent.rest; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; import org.apache.ignite.IgniteLogger; import org.apache.ignite.console.json.JsonObject; -import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.logger.slf4j.Slf4jLogger; import org.eclipse.jetty.client.HttpClient; import org.eclipse.jetty.client.api.Response; @@ -97,9 +96,9 @@ public class RestExecutor implements AutoCloseable { * @param params Request parameters. * @return Request result. * @throws IOException If failed to parse REST result. - * @throws Exception If failed to send request. + * @throws Throwable If failed to send request. */ -public RestResult sendRequest(String url, JsonObject params) throws Exception { +public RestResult sendRequest(String url, JsonObject params) throws Throwable { if (!httpClient.isRunning()) httpClient.start(); @@ -120,13 +119,8 @@ public class RestExecutor implements AutoCloseable { return parseResponse(res, lsnr.getInputStream()); } -catch (Exception e) { -TimeoutException e0 = X.cause(e, TimeoutException.class); - -if (e0 != null) -throw e0; - -throw e; +catch (ExecutionException e) { +throw e.getCause(); } } } diff --git a/modules/web-console/web-console-server/src/main/java/org/apache/ignite/console/web/socket/WebSock
[ignite] branch gg-21368 created (now 1855175)
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a change to branch gg-21368 in repository https://gitbox.apache.org/repos/asf/ignite.git. at 1855175 Merge branch 'master' into gg-21368 This branch includes the following new commits: new 5c5769e GG-21394: missed slf4j-simple-1.7.7.jar in binary packages new 6fb6519 GG-14870 AuthenticationEvent address does not contain full list of addresses new 4c3d3be GG-20242 Updated dependencies to fix possible vulnerabilities new 1b9a13b GG-21310 Deployed on GCP console can't display connected cluster (#284) new a5f16e7 GG-20691 New source of query metrics. (#245) new 5417a6c GG-20750: SQL: Fix performance drop with enabling global SQL memory quota. new 4b045f5 GG-19117 GridCacheProcessor should add info about cache in exception message, if applicable. new 04f305d GG-21455: ML Example TutorialStepByStepExample 0 node, linux fail new f3017ea GG-21225 control.sh validate_indexes SQL Index issue add information about group and cache id. new f7f0b89 GG-21254 Fixed *.testFailAfterStart failed on TC new 00e531c GG-20750: SQL: Fix performance drop with enabling global SQL memory quota. new fb2553a GG-21338 Fixed checkpointReadLock() may hang during node stop new 5f7a54b GG-21468 Fix javadocs. (#289) new 350aac24 GG-21210: IgniteCacheQueriesLoadTest1 scale factor new 86ee0b5 GG-21232 control.sh if experimental command disabled - don't show help for experemental commands. new c5a113f GG-21561 Remove slf4j-simple binding (Reverts GG-21394) new 04c001e GG-21424 Fixed compatibility of cache filter of visor idle verify arguments new bad5683 GG-21356 Usability: control utility new printed argument format. new 1855175 Merge branch 'master' into gg-21368 The 19 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[ignite] 10/19: GG-21254 Fixed *.testFailAfterStart failed on TC
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch gg-21368 in repository https://gitbox.apache.org/repos/asf/ignite.git commit f7f0b89c947ac421c3e49a45a5357413198c59ba Author: Dmitriy Govorukhin AuthorDate: Wed Jul 17 12:50:00 2019 +0300 GG-21254 Fixed *.testFailAfterStart failed on TC --- ...eWalFlushMultiNodeFailoverAbstractSelfTest.java | 59 -- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java index 815de97..d71d563 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java @@ -25,8 +25,6 @@ import java.util.concurrent.atomic.AtomicBoolean; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.IgniteSystemProperties; -import org.apache.ignite.cache.CacheAtomicityMode; -import org.apache.ignite.cache.CacheRebalanceMode; import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.DataRegionConfiguration; @@ -43,6 +41,7 @@ import org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAhea import org.apache.ignite.internal.util.lang.GridAbsPredicate; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.MvccFeatureChecker; +import org.apache.ignite.testframework.junits.WithSystemProperty; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; @@ -51,15 +50,14 @@ import org.junit.Assume; import org.junit.Test; import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED; +import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; +import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; /** * Tests error recovery while node flushing */ public abstract class IgniteWalFlushMultiNodeFailoverAbstractSelfTest extends GridCommonAbstractTest { /** */ -private static final String TEST_CACHE = "testCache"; - -/** */ private static final int ITRS = 2000; /** */ @@ -131,22 +129,23 @@ public abstract class IgniteWalFlushMultiNodeFailoverAbstractSelfTest extends Gr cfg.setConsistentId(gridName); -CacheConfiguration cacheCfg = new CacheConfiguration(TEST_CACHE) -.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL) +cfg.setCacheConfiguration( +new CacheConfiguration(DEFAULT_CACHE_NAME) +.setAtomicityMode(TRANSACTIONAL) .setBackups(1) -.setRebalanceMode(CacheRebalanceMode.SYNC) -.setAffinity(new RendezvousAffinityFunction(false, 32)); +.setRebalanceMode(SYNC) +.setAffinity(new RendezvousAffinityFunction(false, 32)) +); -cfg.setCacheConfiguration(cacheCfg); - -DataStorageConfiguration memCfg = new DataStorageConfiguration() +cfg.setDataStorageConfiguration( +new DataStorageConfiguration() .setDefaultDataRegionConfiguration( -new DataRegionConfiguration().setMaxSize(2048L * 1024 * 1024).setPersistenceEnabled(true)) -.setWalMode(this.walMode()) +new DataRegionConfiguration() +.setMaxSize(2048L * 1024 * 1024) +.setPersistenceEnabled(true)) +.setWalMode(walMode()) .setWalSegmentSize(512 * 1024) -.setWalBufferSize(512 * 1024); - -cfg.setDataStorageConfiguration(memCfg); +.setWalBufferSize(512 * 1024)); cfg.setFailureHandler(new StopNodeFailureHandler()); @@ -159,6 +158,7 @@ public abstract class IgniteWalFlushMultiNodeFailoverAbstractSelfTest extends Gr * @throws Exception In case of fail */ @Test +@WithSystemProperty(key = "IGNITE_DISABLE_WAL_DURING_REBALANCING", value = "false") public void testFailWhileStart() throws Exception { failWhilePut(true); } @@ -169,6 +169,7 @@ public abstract class IgniteWalFlushMultiNodeFailoverAbstractSelfTest extends Gr * @throws Exception In case of fail */ @Test +@WithSystemProperty(key = "IGNITE_DISABLE_WAL_DURING_REBALANCING", value = "false") public void
[ignite] 08/19: GG-21455: ML Example TutorialStepByStepExample 0 node, linux fail
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch gg-21368 in repository https://gitbox.apache.org/repos/asf/ignite.git commit 04f305d543a6ec0525993570eee988fce9c65dce Author: Alexey Platonov <40424278+avplato...@users.noreply.github.com> AuthorDate: Wed Jul 17 12:05:22 2019 +0300 GG-21455: ML Example TutorialStepByStepExample 0 node, linux fail --- .../apache/ignite/examples/ml/tutorial/TutorialStepByStepExample.java| 1 + 1 file changed, 1 insertion(+) diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/TutorialStepByStepExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/TutorialStepByStepExample.java index 2dc9b37..b8886b8 100644 --- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/TutorialStepByStepExample.java +++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/TutorialStepByStepExample.java @@ -33,5 +33,6 @@ public class TutorialStepByStepExample { Step_7_Split_train_test.main(args); Step_8_CV.main(args); Step_8_CV_with_Param_Grid.main(args); +Step_9_Scaling_With_Stacking.main(args); } }
[ignite] 09/19: GG-21225 control.sh validate_indexes SQL Index issue add information about group and cache id.
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch gg-21368 in repository https://gitbox.apache.org/repos/asf/ignite.git commit f3017ea805e1334e2bdcf5a083aa830a28be3013 Author: ktkalenko AuthorDate: Wed Jul 17 12:34:53 2019 +0300 GG-21225 control.sh validate_indexes SQL Index issue add information about group and cache id. --- .../ignite/internal/visor/verify/ValidateIndexesClosure.java | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/visor/verify/ValidateIndexesClosure.java b/modules/indexing/src/main/java/org/apache/ignite/internal/visor/verify/ValidateIndexesClosure.java index 521ad4d..eb2e6f5 100644 --- a/modules/indexing/src/main/java/org/apache/ignite/internal/visor/verify/ValidateIndexesClosure.java +++ b/modules/indexing/src/main/java/org/apache/ignite/internal/visor/verify/ValidateIndexesClosure.java @@ -737,7 +737,16 @@ public class ValidateIndexesClosure implements IgniteCallable
[ignite] 02/19: GG-14870 AuthenticationEvent address does not contain full list of addresses
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch gg-21368 in repository https://gitbox.apache.org/repos/asf/ignite.git commit 6fb651916987d6f1aea47378af1d5e29f4629cae Author: akorensh AuthorDate: Tue Jul 16 13:23:30 2019 -0400 GG-14870 AuthenticationEvent address does not contain full list of addresses --- .../plugin/security/AuthenticationContext.java | 23 ++ 1 file changed, 23 insertions(+) diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/security/AuthenticationContext.java b/modules/core/src/main/java/org/apache/ignite/plugin/security/AuthenticationContext.java index f9199f2..d7a528f 100644 --- a/modules/core/src/main/java/org/apache/ignite/plugin/security/AuthenticationContext.java +++ b/modules/core/src/main/java/org/apache/ignite/plugin/security/AuthenticationContext.java @@ -18,6 +18,7 @@ package org.apache.ignite.plugin.security; import java.net.InetSocketAddress; import java.util.Collections; +import java.util.List; import java.util.Map; import java.util.UUID; import org.apache.ignite.internal.processors.authentication.AuthorizationContext; @@ -38,6 +39,9 @@ public class AuthenticationContext { /** Subject address. */ private InetSocketAddress addr; +/** All Subject address. */ +private List allAddr; + /** */ private Map nodeAttrs; @@ -169,4 +173,23 @@ public class AuthenticationContext { return this; } + +/** + * Gets All subject network addresses. + * + * @return All subject network addresses. + */ +public List allAddresses() { +return allAddr; +} + +/** + * Sets All subject network addresses. + * + * @param allAddr List of All subject network addresses. + */ +public void allAddresses(List allAddr) { +this.allAddr = allAddr; +} + } \ No newline at end of file
[ignite] 15/19: GG-21232 control.sh if experimental command disabled - don't show help for experemental commands.
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch gg-21368 in repository https://gitbox.apache.org/repos/asf/ignite.git commit 86ee0b508e206cfcc325b4898c2732d511dfceff Author: ktkalenko AuthorDate: Thu Jul 18 08:50:49 2019 +0300 GG-21232 control.sh if experimental command disabled - don't show help for experemental commands. --- bin/control.bat| 11 +++-- .../ignite/internal/commandline/WalCommands.java | 48 - .../commandline/CommandHandlerParsingTest.java | 21 - .../apache/ignite/util/GridCommandHandlerTest.java | 50 -- 4 files changed, 82 insertions(+), 48 deletions(-) diff --git a/bin/control.bat b/bin/control.bat index ac34475..0015323 100644 --- a/bin/control.bat +++ b/bin/control.bat @@ -1,12 +1,12 @@ :: :: Copyright 2019 GridGain Systems, Inc. and Contributors. -:: +:: :: Licensed under the GridGain Community Edition License (the "License"); :: you may not use this file except in compliance with the License. :: You may obtain a copy of the License at -:: +:: :: https://www.gridgain.com/products/software/community-edition/gridgain-community-edition-license -:: +:: :: 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. @@ -168,6 +168,11 @@ if %ERRORLEVEL% equ 0 ( ) :: +:: Uncomment to enable experimental commands [--wal] +:: +:: set JVM_OPTS=%JVM_OPTS% -DIGNITE_ENABLE_EXPERIMENTAL_COMMAND=true + +:: :: Uncomment the following GC settings if you see spikes in your throughput due to Garbage Collection. :: :: set JVM_OPTS=%JVM_OPTS% -XX:+UseG1GC diff --git a/modules/core/src/main/java/org/apache/ignite/internal/commandline/WalCommands.java b/modules/core/src/main/java/org/apache/ignite/internal/commandline/WalCommands.java index 99c804a..6c03c4d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/commandline/WalCommands.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/commandline/WalCommands.java @@ -35,6 +35,7 @@ import org.apache.ignite.internal.visor.misc.VisorWalTaskResult; import static org.apache.ignite.IgniteSystemProperties.IGNITE_ENABLE_EXPERIMENTAL_COMMAND; import static org.apache.ignite.internal.commandline.CommandArgIterator.isCommandOrOption; +import static org.apache.ignite.internal.commandline.CommandHandler.UTILITY_NAME; import static org.apache.ignite.internal.commandline.CommandList.WAL; import static org.apache.ignite.internal.commandline.CommandLogger.DOUBLE_INDENT; import static org.apache.ignite.internal.commandline.CommandLogger.INDENT; @@ -67,12 +68,13 @@ public class WalCommands implements Command> { /** {@inheritDoc} */ @Override public void printUsage(Logger logger) { -if (enableExperimental()) { -Command.usage(logger, "Print absolute paths of unused archived wal segments on each node:", WAL, -WAL_PRINT, "[consistentId1,consistentId2,,consistentIdN]"); -Command.usage(logger, "Delete unused archived wal segments on each node:", WAL, WAL_DELETE, -"[consistentId1,consistentId2,,consistentIdN]", optional(CMD_AUTO_CONFIRMATION)); -} +if (!enableExperimental()) +return; + +Command.usage(logger, "Print absolute paths of unused archived wal segments on each node:", WAL, +WAL_PRINT, "[consistentId1,consistentId2,,consistentIdN]"); +Command.usage(logger, "Delete unused archived wal segments on each node:", WAL, WAL_DELETE, +"[consistentId1,consistentId2,,consistentIdN]", optional(CMD_AUTO_CONFIRMATION)); } /** @@ -82,21 +84,26 @@ public class WalCommands implements Command> { * @throws Exception If failed to execute wal action. */ @Override public Object execute(GridClientConfiguration clientCfg, Logger logger) throws Exception { -this.logger = logger; +if (enableExperimental()) { +this.logger = logger; -try (GridClient client = Command.startClient(clientCfg)) { -switch (walAct) { -case WAL_DELETE: -deleteUnusedWalSegments(client, walArgs, clientCfg); +try (GridClient client = Command.startClient(clientCfg)) { +switch (walAct) { +case WAL_DELETE: +deleteUnusedWalSegments(client, walArgs, clientCfg); -break; +break; -case WAL_PRINT: -default: -printUnusedWalSegments(client, walArgs, clientCfg); +case WAL_PRINT: +default: +printUnusedWalSegments(client, walArgs, clientCfg); -
[ignite] 18/19: GG-21356 Usability: control utility new printed argument format.
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch gg-21368 in repository https://gitbox.apache.org/repos/asf/ignite.git commit bad5683ffde0874a709a7d9ae488c9328962f9a2 Author: mstepachev AuthorDate: Thu Jul 18 12:33:40 2019 +0300 GG-21356 Usability: control utility new printed argument format. --- .../ignite/internal/commandline/Command.java | 7 - .../internal/commandline/CommandHandler.java | 34 +++--- .../internal/commandline/CommonArgParser.java | 16 ++ .../ignite/internal/commandline/WalCommands.java | 5 .../internal/commandline/cache/CacheCommands.java | 6 .../commandline/cache/ResetLostPartitions.java | 5 .../commandline/diagnostic/DiagnosticCommand.java | 6 .../apache/ignite/util/GridCommandHandlerTest.java | 2 +- 8 files changed, 47 insertions(+), 34 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 21c9deb..be47696 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 @@ -101,13 +101,6 @@ public interface Command { public void printUsage(Logger logger); /** - * @return String which reflect of command-specific arguments in human-friendly format. - */ -public default String argumentString() { -return arg() == null? "" : arg().toString(); -} - -/** * @return command name. */ String name(); 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 98e3f91..d0fe93e 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 @@ -43,6 +43,7 @@ import org.apache.ignite.internal.client.impl.connection.GridClientConnectionRes import org.apache.ignite.internal.client.ssl.GridSslBasicContextFactory; import org.apache.ignite.internal.util.typedef.F; 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.util.VisorIllegalStateException; import org.apache.ignite.logger.java.JavaLoggerFileHandler; @@ -245,10 +246,7 @@ public class CommandHandler { GridClientConfiguration clientCfg = getClientConfiguration(args); logger.info("Command [" + commandName + "] started"); -logger.info("Common arguments: " + args.toString()); - -if (command.arg() != null) -logger.info("Command arguments: " + command.argumentString()); +logger.info("Arguments: " + argumentsToString(rawArgs)); logger.info(DELIM); @@ -347,6 +345,34 @@ public class CommandHandler { } /** + * @param rawArgs Arguments which user has provided. + * @return String which could be shown in console and pritned to log. + */ +private String argumentsToString(List rawArgs) { +boolean hide = false; + +SB sb = new SB(); + +for (int i = 0; i < rawArgs.size(); i++) { +if (hide) { +sb.a("* "); + +hide = false; + +continue; +} + +String arg = rawArgs.get(i); + +sb.a(arg).a(' '); + +hide = CommonArgParser.isSensitiveArgument(arg); +} + +return sb.toString(); +} + +/** * Does one of three things: * * returns user name from connection parameters if it is there; diff --git a/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommonArgParser.java b/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommonArgParser.java index 6fec5a0..1cf04da 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommonArgParser.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommonArgParser.java @@ -92,6 +92,9 @@ public class CommonArgParser { /** List of optional auxiliary commands. */ private static final Set AUX_COMMANDS = new HashSet<>(); +/** Set of sensitive arguments */ +private static final Set SENSITIVE_ARGUMENTS = new HashSet<>(); + static { AUX_COMMANDS.add(CMD_HOST); AUX_COMMANDS.add(CMD_PORT); @@ -115,9 +118,22 @@ public class CommonArgParser { AUX_COMMANDS.add(CMD_TRUSTSTORE); AUX_COMMANDS.add(CMD_TRUSTSTORE_PASSWORD); AUX_COMMANDS.add(CMD_TRUSTSTORE_TYPE); + +SENSITIVE_ARGUMENTS.add(CMD_PASSWORD); +SENSITIVE_ARGU
[ignite] 03/19: GG-20242 Updated dependencies to fix possible vulnerabilities
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch gg-21368 in repository https://gitbox.apache.org/repos/asf/ignite.git commit 4c3d3be8fccfb7391aea634677bae042a20a57de Author: Evgeniy Rudenko AuthorDate: Wed Jul 17 13:51:28 2019 +1000 GG-20242 Updated dependencies to fix possible vulnerabilities --- modules/kafka/pom.xml | 2 +- modules/mesos/pom.xml | 2 +- modules/osgi-karaf/src/main/resources/features.xml | 4 ++-- modules/zookeeper/pom.xml | 4 ++-- parent/pom.xml | 14 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/kafka/pom.xml b/modules/kafka/pom.xml index a488fea..95fae4b 100644 --- a/modules/kafka/pom.xml +++ b/modules/kafka/pom.xml @@ -78,7 +78,7 @@ org.apache.curator curator-test -${curator.version} +${curator.test.version} test diff --git a/modules/mesos/pom.xml b/modules/mesos/pom.xml index 687b14b..44525e2 100644 --- a/modules/mesos/pom.xml +++ b/modules/mesos/pom.xml @@ -34,7 +34,7 @@ http://ignite.apache.org -1.5.0 +1.5.2 diff --git a/modules/osgi-karaf/src/main/resources/features.xml b/modules/osgi-karaf/src/main/resources/features.xml index 76bbd33..3ea28e5 100644 --- a/modules/osgi-karaf/src/main/resources/features.xml +++ b/modules/osgi-karaf/src/main/resources/features.xml @@ -281,7 +281,7 @@ wrap -mvn:com.google.guava/guava/${guava14.version} +mvn:com.google.guava/guava/${guava.version} wrap:mvn:com.twitter/hbc-core/${twitter.hbc.version}$Bundle-SymbolicName=Hosebird Client Core&Bundle-Version=${twitter.hbc.version} wrap:mvn:com.twitter/hbc-twitter4j/${twitter.hbc.version}$Bundle-SymbolicName=Hosebird Client Twitter4J&Bundle-Version=${twitter.hbc.version} mvn:org.apache.ignite/ignite-twitter/${project.version} @@ -322,7 +322,7 @@ mvn:org.apache.zookeeper/zookeeper/${zookeeper.version} -mvn:com.google.guava/guava/${guava16.version} +mvn:com.google.guava/guava/${guava.version} mvn:com.fasterxml.jackson.core/jackson-core/${jackson.version} mvn:com.fasterxml.jackson.core/jackson-databind/${jackson.version} mvn:org.apache.curator/curator-client/${curator.version} diff --git a/modules/zookeeper/pom.xml b/modules/zookeeper/pom.xml index f627665..b801378 100644 --- a/modules/zookeeper/pom.xml +++ b/modules/zookeeper/pom.xml @@ -67,7 +67,7 @@ com.google.guava guava -${guava16.version} +${guava.version} @@ -110,7 +110,7 @@ org.apache.curator curator-test -${curator.version} +${curator.test.version} test diff --git a/parent/pom.xml b/parent/pom.xml index cda75c3..453ec89 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -63,15 +63,15 @@ 3.9 2.6 2.2.5 -2.9.1 +4.2.0 + +2.9.1 3.4 1.0.6_1 1.0.6 1.7.0 2.0.0 25.1-jre -14.0.1 -16.0.1 2.9.1 1.2 4.5.1 @@ -123,22 +123,22 @@ 1.6.4 1.1.7.2 2.6.5 -2.3.0 +2.3.3 1.5.20.RELEASE 1.13.14.RELEASE 4.3.18.RELEASE 2.0.9.RELEASE 5.0.8.RELEASE 4.1.7.RELEASE_1 -1.1.1 +1.1.3 2.9.2 -9.0.10 +9.0.21 2.2.0 2.2.0 2.2.0 0.8.3 0.5 -3.4.13 +3.4.14 1.3.7-2 8.7.5 0.22.0
[ignite] 14/19: GG-21210: IgniteCacheQueriesLoadTest1 scale factor
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch gg-21368 in repository https://gitbox.apache.org/repos/asf/ignite.git commit 350aac24202f80c511c6383865d79f341aa33138 Author: pavel-kuznetsov <34839271+pavel-kuznet...@users.noreply.github.com> AuthorDate: Wed Jul 17 18:59:49 2019 +0300 GG-21210: IgniteCacheQueriesLoadTest1 scale factor --- .../cache/IgniteCacheQueriesLoadTest1.java | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java index d1c6ca0..4277075 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java @@ -50,6 +50,7 @@ import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.lang.IgniteRunnable; import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.GridTestUtils; +import org.apache.ignite.testframework.GridTestUtils.SF; import org.junit.Test; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -133,7 +134,7 @@ public class IgniteCacheQueriesLoadTest1 extends AbstractIndexingCommonTest { private static Map> partitionsMap; /** Preload amount. */ -private static final int preloadAmount = 10_000; +private static final int preloadAmount = SF.applyLB(10_000, 2_000); /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { @@ -167,23 +168,27 @@ public class IgniteCacheQueriesLoadTest1 extends AbstractIndexingCommonTest { */ @Test public void testQueries() throws Exception { -runQueries(1, true, 10_000); +int runSingleMs = SF.applyLB(10_000, 1_000); -runQueries(10, false, 30_000); +runQueries(1, true, runSingleMs); + +int runParMs = SF.applyLB(30_000, 3_000); + +runQueries(10, false, runParMs); } /** - * @param threads Threads number. - * @param checkBalance Check balance flag. - * @param time Execution time. + * @param threads number of threads executing the queries. + * @param checkBalance whether or not to perform balance check. + * @param runAtLeast minimum number of milliseconds thread should perform scan query in a loop. * @throws Exception If failed. */ -private void runQueries(int threads, final boolean checkBalance, final long time) throws Exception { +private void runQueries(int threads, final boolean checkBalance, final long runAtLeast) throws Exception { final Ignite ignite = grid(0); GridTestUtils.runMultiThreaded(new Callable() { @Override public Object call() { -long endTime = System.currentTimeMillis() + time; +long endTime = System.currentTimeMillis() + runAtLeast; while (System.currentTimeMillis() < endTime) { ScanQueryBroadcastClosure c = new ScanQueryBroadcastClosure(partitionsMap, checkBalance);
[ignite] 05/19: GG-20691 New source of query metrics. (#245)
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch gg-21368 in repository https://gitbox.apache.org/repos/asf/ignite.git commit a5f16e7cfd3c8caf91611663194fc20a131cbb76 Author: Vasiliy Sisko AuthorDate: Wed Jul 17 09:45:29 2019 +0300 GG-20691 New source of query metrics. (#245) --- .../org/apache/ignite/internal/IgniteFeatures.java | 14 +- .../org/apache/ignite/internal/IgniteKernal.java | 2 +- .../VisorQueryDetailMetricsCollectorTask.java | 3 +- .../query/VisorQueryResetDetailMetricsTask.java| 3 +- .../product/IndexingFeatureIsNotAvailableTest.java | 50 +++ .../ignite/testsuites/IgniteBasicTestSuite.java| 3 + .../VisorQueryHistoryMetricsCollectorTask.java}| 73 -- .../query/VisorQueryHistoryMetricsResetTask.java} | 9 +- .../query/SqlMetricsOnWebConsoleSelfTest.java | 151 + .../product/IndexingFeatureIsAvailableTest.java| 50 +++ .../IgniteBinaryCacheQueryTestSuite.java | 5 + 11 files changed, 346 insertions(+), 17 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteFeatures.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteFeatures.java index c0df3a0..a5c339f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteFeatures.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteFeatures.java @@ -64,11 +64,14 @@ public enum IgniteFeatures { /** Supports tracking update counter for transactions. */ TX_TRACKING_UPDATE_COUNTER(12), -/** Support new security processor */ +/** Support new security processor. */ IGNITE_SECURITY_PROCESSOR(13), /** Replacing TcpDiscoveryNode field with nodeId field in discovery messages. */ -TCP_DISCOVERY_MESSAGE_NODE_COMPACT_REPRESENTATION(14); +TCP_DISCOVERY_MESSAGE_NODE_COMPACT_REPRESENTATION(14), + +/** Indexing enabled. */ +INDEXING(15); /** * Unique feature identifier. @@ -159,9 +162,10 @@ public enum IgniteFeatures { /** * Features supported by the current node. * + * @param ctx Kernal context. * @return Byte array representing all supported features by current node. */ -public static byte[] allFeatures() { +public static byte[] allFeatures(GridKernalContext ctx) { final BitSet set = new BitSet(); for (IgniteFeatures value : IgniteFeatures.values()) { @@ -169,6 +173,10 @@ public enum IgniteFeatures { if (IGNITE_SECURITY_PROCESSOR == value && !getBoolean(IGNITE_SECURITY_PROCESSOR.name(), true)) continue; +// Add only when indexing is enabled. +if (INDEXING == value && !ctx.query().moduleEnabled()) +continue; + final int featureId = value.getFeatureId(); assert !set.get(featureId) : "Duplicate feature ID found for [" + value + "] having same ID [" 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 f283d86..48e996a 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 @@ -1755,7 +1755,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { add(ATTR_TX_CONFIG, cfg.getTransactionConfiguration()); // Supported features. -add(ATTR_IGNITE_FEATURES, IgniteFeatures.allFeatures()); +add(ATTR_IGNITE_FEATURES, IgniteFeatures.allFeatures(context())); // Stick in SPI versions and classes attributes. addSpiAttributes(cfg.getCollisionSpi()); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryDetailMetricsCollectorTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryDetailMetricsCollectorTask.java index ed425db..5548b26 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryDetailMetricsCollectorTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryDetailMetricsCollectorTask.java @@ -37,7 +37,8 @@ import org.jetbrains.annotations.Nullable; import static org.apache.ignite.internal.processors.cache.GridCacheUtils.isSystemCache; /** - * Task to collect cache query metrics. + * Collect query detailed metrics from cache context only. + * This task should be used to collect query metrics when indexing feature not available. */ @GridInternal public class VisorQueryDetailMetricsCollectorTask extends VisorMultiNodeTask { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/product/IndexingFeatureIsNotAvailableTest.java b/modules/core/src/test/java/org/apache/ignite/internal/product/IndexingFeatureIsNotAvailableTest.java new file mode 100644 index 000..ef
[ignite] 11/19: GG-20750: SQL: Fix performance drop with enabling global SQL memory quota.
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch gg-21368 in repository https://gitbox.apache.org/repos/asf/ignite.git commit 00e531cec9d41cae7ef267a32768e5820501e884 Author: Andrey V. Mashenkov AuthorDate: Wed Jul 17 11:09:10 2019 +0300 GG-20750: SQL: Fix performance drop with enabling global SQL memory quota. --- .../processors/query/h2/H2MemoryTracker.java | 3 +- .../processors/query/h2/QueryMemoryManager.java| 72 + .../processors/query/h2/QueryMemoryTracker.java| 113 +++-- .../oom/AbstractQueryMemoryTrackerSelfTest.java| 27 - ...yMemoryTrackerWithQueryParallelismSelfTest.java | 36 +++ .../query/oom/QueryMemoryTrackerSelfTest.java | 11 ++ 6 files changed, 183 insertions(+), 79 deletions(-) diff --git a/modules/h2/src/main/java/org/apache/ignite/internal/processors/query/h2/H2MemoryTracker.java b/modules/h2/src/main/java/org/apache/ignite/internal/processors/query/h2/H2MemoryTracker.java index e1d3aac..bbcc5f4 100644 --- a/modules/h2/src/main/java/org/apache/ignite/internal/processors/query/h2/H2MemoryTracker.java +++ b/modules/h2/src/main/java/org/apache/ignite/internal/processors/query/h2/H2MemoryTracker.java @@ -21,6 +21,8 @@ package org.apache.ignite.internal.processors.query.h2; */ public abstract class H2MemoryTracker implements AutoCloseable { /** + * Reserve memory. + * * @param size Memory to reserve in bytes. */ public abstract void reserve(long size); @@ -30,6 +32,5 @@ public abstract class H2MemoryTracker implements AutoCloseable { * * @param size Memory to release in bytes. */ - public abstract void release(long size); } diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryMemoryManager.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryMemoryManager.java index 58ae9e2..727ed35 100644 --- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryMemoryManager.java +++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryMemoryManager.java @@ -17,6 +17,7 @@ package org.apache.ignite.internal.processors.query.h2; import java.util.concurrent.atomic.AtomicLong; +import java.util.function.LongBinaryOperator; import org.apache.ignite.IgniteLogger; import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.configuration.IgniteConfiguration; @@ -37,6 +38,19 @@ public class QueryMemoryManager extends H2MemoryTracker { */ private static final long DFLT_MEMORY_RESERVATION_BLOCK_SIZE = 512 * KB; +/** */ +static final LongBinaryOperator RELEASE_OP = new LongBinaryOperator() { +@Override public long applyAsLong(long prev, long x) { +long res = prev - x; + +if (res < 0) +throw new IllegalStateException("Try to free more memory that ever be reserved: [" + +"reserved=" + prev + ", toFree=" + x + ']'); + +return res; +} +}; + /** * Default query memory limit. * @@ -48,6 +62,9 @@ public class QueryMemoryManager extends H2MemoryTracker { /** Logger. */ private final IgniteLogger log; +/** */ +private final LongBinaryOperator reserveOp; + /** Global query memory quota. */ //TODO GG-18629: it looks safe to make this configurable at runtime. private final long globalQuota; @@ -74,48 +91,38 @@ public class QueryMemoryManager extends H2MemoryTracker { (long)(Runtime.getRuntime().maxMemory() * 0.6d)); } -long dfltSqlQryMemoryLimit = Long.getLong(IgniteSystemProperties.IGNITE_DEFAULT_SQL_QUERY_MEMORY_LIMIT, 0); +long dfltMemLimit = Long.getLong(IgniteSystemProperties.IGNITE_DEFAULT_SQL_QUERY_MEMORY_LIMIT, 0); -if (dfltSqlQryMemoryLimit == 0) -dfltSqlQryMemoryLimit = globalQuota > 0 ? globalQuota / IgniteConfiguration.DFLT_QUERY_THREAD_POOL_SIZE : -1; +if (dfltMemLimit == 0) +dfltMemLimit = globalQuota > 0 ? globalQuota / IgniteConfiguration.DFLT_QUERY_THREAD_POOL_SIZE : -1; this.blockSize = Long.getLong(IgniteSystemProperties.IGNITE_SQL_MEMORY_RESERVATION_BLOCK_SIZE, DFLT_MEMORY_RESERVATION_BLOCK_SIZE); this.globalQuota = globalQuota; -this.dfltSqlQryMemoryLimit = dfltSqlQryMemoryLimit; +this.dfltSqlQryMemoryLimit = dfltMemLimit; + +this.reserveOp = new ReservationOp(globalQuota); this.log = ctx.log(QueryMemoryManager.class); } /** {@inheritDoc} */ @Override public void reserve(long size) { -assert size >= 0; - if (size == 0) return; // Nothing to do. -reserved.accumulateAndGet(size, (prev, x) -> { -if (prev + x > globalQuota) -throw new IgniteSQLException("SQL query