(ignite-3) branch main updated (3f2abab425 -> e521574594)
This is an automated email from the ASF dual-hosted git repository. vpyatkov pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/ignite-3.git from 3f2abab425 IGNITE-21504 Sql. Fixed PlanningCacheMetricsTest.plannerCacheStatisticsTest flakiness (#3203) add e521574594 IGNITE-21378 Investigate whether it's possible to make txnState local map updates faster (#3204) No new revisions were added by this update. Summary of changes: .../ignite/internal/tx/impl/TxManagerImpl.java | 6 ++--- .../tx/impl/VolatileTxStateMetaStorage.java| 27 +- 2 files changed, 14 insertions(+), 19 deletions(-)
(ignite-3) branch ignite-20680 updated (c300217f38 -> b3dae31f3a)
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a change to branch ignite-20680 in repository https://gitbox.apache.org/repos/asf/ignite-3.git from c300217f38 Fix SchemaManager add b3dae31f3a minor No new revisions were added by this update. Summary of changes: .../ignite/internal/schema/SchemaManagerTest.java | 35 +- 1 file changed, 14 insertions(+), 21 deletions(-)
(ignite-3) branch ignite-20680 updated (b0a9dfbdd6 -> c300217f38)
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a change to branch ignite-20680 in repository https://gitbox.apache.org/repos/asf/ignite-3.git from b0a9dfbdd6 Fix SchemaManager add c300217f38 Fix SchemaManager No new revisions were added by this update. Summary of changes: .../events/DestroyTableEventParameters.java| 2 +- .../ignite/internal/schema/SchemaManager.java | 2 +- .../ignite/internal/schema/SchemaManagerTest.java | 34 ++ 3 files changed, 30 insertions(+), 8 deletions(-)
(ignite-3) branch ignite-20680 updated (9cf340d029 -> b0a9dfbdd6)
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a change to branch ignite-20680 in repository https://gitbox.apache.org/repos/asf/ignite-3.git discard 9cf340d029 Fix SchemaManager add b0a9dfbdd6 Fix SchemaManager This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (9cf340d029) \ N -- N -- N refs/heads/ignite-20680 (b0a9dfbdd6) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../org/apache/ignite/internal/schema/SchemaManager.java | 14 +- .../ignite/internal/table/distributed/TableManager.java| 2 -- 2 files changed, 13 insertions(+), 3 deletions(-)
(ignite-3) branch ignite-20680 updated (be054ac5c9 -> 9cf340d029)
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a change to branch ignite-20680 in repository https://gitbox.apache.org/repos/asf/ignite-3.git from be054ac5c9 minor add 9cf340d029 Fix SchemaManager No new revisions were added by this update. Summary of changes: .../java/org/apache/ignite/internal/schema/SchemaManager.java | 9 ++--- .../org/apache/ignite/internal/schema/SchemaManagerTest.java | 4 +++- .../apache/ignite/internal/table/distributed/TableManager.java | 10 -- 3 files changed, 13 insertions(+), 10 deletions(-)
(ignite-3) branch main updated: IGNITE-21504 Sql. Fixed PlanningCacheMetricsTest.plannerCacheStatisticsTest flakiness (#3203)
This is an automated email from the ASF dual-hosted git repository. ppa pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/ignite-3.git The following commit(s) were added to refs/heads/main by this push: new 3f2abab425 IGNITE-21504 Sql. Fixed PlanningCacheMetricsTest.plannerCacheStatisticsTest flakiness (#3203) 3f2abab425 is described below commit 3f2abab42558227053763db7bc3bbf4c4fe5e329 Author: Max Zhuravkov AuthorDate: Tue Feb 13 13:18:49 2024 +0200 IGNITE-21504 Sql. Fixed PlanningCacheMetricsTest.plannerCacheStatisticsTest flakiness (#3203) --- .../sql/engine/util/cache/CaffeineCacheFactory.java | 20 .../sql/metrics/PlanningCacheMetricsTest.java| 6 -- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/cache/CaffeineCacheFactory.java b/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/cache/CaffeineCacheFactory.java index 8376ff32b5..45c597ce64 100644 --- a/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/cache/CaffeineCacheFactory.java +++ b/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/cache/CaffeineCacheFactory.java @@ -20,11 +20,13 @@ package org.apache.ignite.internal.sql.engine.util.cache; import com.github.benmanes.caffeine.cache.Caffeine; import com.github.benmanes.caffeine.cache.RemovalCause; import com.github.benmanes.caffeine.cache.stats.CacheStats; +import java.util.concurrent.Executor; import java.util.function.BiFunction; import java.util.function.Function; import java.util.function.Predicate; import org.checkerframework.checker.index.qual.NonNegative; import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.TestOnly; /** * Factory that creates caches backed by {@link Caffeine} cache. @@ -32,7 +34,21 @@ import org.jetbrains.annotations.Nullable; public class CaffeineCacheFactory implements CacheFactory { public static final CacheFactory INSTANCE = new CaffeineCacheFactory(); +@Nullable +private final Executor executor; + private CaffeineCacheFactory() { +this(null); +} + +private CaffeineCacheFactory(@Nullable Executor executor) { +this.executor = executor; +} + +/** Creates a cache factory with the given executor for running auxiliary tasks. */ +@TestOnly +public static CacheFactory create(Executor executor) { +return new CaffeineCacheFactory(executor); } /** {@inheritDoc} */ @@ -41,6 +57,10 @@ public class CaffeineCacheFactory implements CacheFactory { Caffeine builder = Caffeine.newBuilder() .maximumSize(size); +if (executor != null) { +builder.executor(executor); +} + if (statCounter != null) { builder.recordStats(() -> new CaffeineStatsCounterAdapter(statCounter)); } diff --git a/modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/metrics/PlanningCacheMetricsTest.java b/modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/metrics/PlanningCacheMetricsTest.java index 95f5d0a51f..620a512b41 100644 --- a/modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/metrics/PlanningCacheMetricsTest.java +++ b/modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/metrics/PlanningCacheMetricsTest.java @@ -35,6 +35,7 @@ import org.apache.ignite.internal.sql.engine.sql.ParserServiceImpl; import org.apache.ignite.internal.sql.engine.trait.IgniteDistributions; import org.apache.ignite.internal.sql.engine.util.BaseQueryContext; import org.apache.ignite.internal.sql.engine.util.EmptyCacheFactory; +import org.apache.ignite.internal.sql.engine.util.cache.CacheFactory; import org.apache.ignite.internal.sql.engine.util.cache.CaffeineCacheFactory; import org.apache.ignite.internal.type.NativeTypes; import org.junit.jupiter.api.Test; @@ -47,8 +48,9 @@ public class PlanningCacheMetricsTest extends AbstractPlannerTest { @Test public void plannerCacheStatisticsTest() throws Exception { MetricManager metricManager = new MetricManager(); -PrepareService prepareService = new PrepareServiceImpl("test", 2, CaffeineCacheFactory.INSTANCE, -null, 15_000L, 2, metricManager); +// Run clean up tasks in the current thread, so no eviction event is delayed. +CacheFactory cacheFactory = CaffeineCacheFactory.create(Runnable::run); +PrepareService prepareService = new PrepareServiceImpl("test", 2, cacheFactory, null, 15_000L, 2, metricManager); prepareService.start();
(ignite) branch master updated: IGNITE-21522 Removed C++ example for nonexistant API (#11244)
This is an automated email from the ASF dual-hosted git repository. isapego 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 65c8e264fb5 IGNITE-21522 Removed C++ example for nonexistant API (#11244) 65c8e264fb5 is described below commit 65c8e264fb5904fe0583906a8ae8ec12afbae861 Author: IgGusev AuthorDate: Tue Feb 13 14:34:22 2024 +0400 IGNITE-21522 Removed C++ example for nonexistant API (#11244) --- docs/_docs/key-value-api/basic-cache-operations.adoc | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/docs/_docs/key-value-api/basic-cache-operations.adoc b/docs/_docs/key-value-api/basic-cache-operations.adoc index 7205cd0c31a..c526d6722b1 100644 --- a/docs/_docs/key-value-api/basic-cache-operations.adoc +++ b/docs/_docs/key-value-api/basic-cache-operations.adoc @@ -199,15 +199,7 @@ TV Get(TK key); Task GetAsync(TK key); -tab:C++[] -[source,cpp] - -// a synchronous get -V Get(K key); - -// an asynchronous get -Future GetAsync(K key); - +tab:C++[unsupported] -- The asynchronous operations return an object that represents the result of the operation. You can wait for the completion of the operation in either blocking or non-blocking manner. @@ -238,11 +230,7 @@ tab:C#/.NET[] include::code-snippets/dotnet/BasicCacheOperations.cs[tag=asyncExec,indent=0] -tab:C++[] -[source,cpp] - -include::code-snippets/cpp/src/cache_asynchronous_execution.cpp[tag=cache-asynchronous-execution,indent=0] - +tab:C++[unsupported] --
(ignite-3) branch ignite-20680 updated (278cc3a763 -> be054ac5c9)
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a change to branch ignite-20680 in repository https://gitbox.apache.org/repos/asf/ignite-3.git from 278cc3a763 revert add be054ac5c9 minor No new revisions were added by this update. Summary of changes: .../org/apache/ignite/internal/catalog/commands/CatalogUtils.java| 1 - .../org/apache/ignite/internal/table/distributed/TableManager.java | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-)
(ignite-3) branch ignite-20680 updated (850323bd9f -> 278cc3a763)
This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a change to branch ignite-20680 in repository https://gitbox.apache.org/repos/asf/ignite-3.git omit 850323bd9f wip. fix tests omit 86dfbea311 wip. fix tests omit 3a66df0914 wip omit cdabbfe385 Enable tests. omit 4933e0b3ce Minor. omit 0a53d525e3 Minor. Fix index recovery. omit 3a50655a29 Minors. omit 180b936092 Fix tests. omit 404cf018d8 Fix catalog compaction tests. add 5d1a07fd68 Fix catalog compaction tests. add 466a6a9620 Fix tests. add d714588c2a Minors. add 6dca14ef41 Minor. Fix index recovery. add 6d32b140ec Enable tests. add 278cc3a763 revert This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (850323bd9f) \ N -- N -- N refs/heads/ignite-20680 (278cc3a763) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../java/org/apache/ignite/internal/schema/SchemaManager.java | 8 +++- .../apache/ignite/internal/table/distributed/TableManager.java| 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-)
(ignite) branch master updated: IGNITE-21102 Use ClusterState enum for baseline control.sh commands output (#11138)
This is an automated email from the ASF dual-hosted git repository. timoninmaxim 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 ffde1db96f0 IGNITE-21102 Use ClusterState enum for baseline control.sh commands output (#11138) ffde1db96f0 is described below commit ffde1db96f0c9d0d86c773daa4f6baee18ab1b66 Author: oleg-vlsk <153691984+oleg-v...@users.noreply.github.com> AuthorDate: Tue Feb 13 18:16:03 2024 +1000 IGNITE-21102 Use ClusterState enum for baseline control.sh commands output (#11138) --- .../apache/ignite/util/GridCommandHandlerTest.java | 33 -- .../ignite/internal/management/StateCommand.java | 20 + .../baseline/AbstractBaselineCommand.java | 2 +- .../internal/management/baseline/BaselineTask.java | 2 +- .../management/baseline/BaselineTaskResult.java| 25 ++-- .../visor/baseline/VisorBaselineViewTask.java | 2 +- 6 files changed, 50 insertions(+), 34 deletions(-) diff --git a/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java b/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java index 887448cc1cf..fc193081c41 100644 --- a/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java +++ b/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java @@ -903,7 +903,7 @@ public class GridCommandHandlerTest extends GridCommandHandlerClusterPerMethodAb assertEquals(EXIT_CODE_OK, execute("--state")); -assertContains(log, testOut.toString(), "Cluster is inactive"); +assertClusterState(INACTIVE, testOut.toString()); String out = testOut.toString(); @@ -919,7 +919,7 @@ public class GridCommandHandlerTest extends GridCommandHandlerClusterPerMethodAb assertEquals(EXIT_CODE_OK, execute("--state")); -assertContains(log, testOut.toString(), "Cluster is active"); +assertClusterState(ACTIVE, testOut.toString()); ignite.cluster().state(ACTIVE_READ_ONLY); @@ -929,7 +929,7 @@ public class GridCommandHandlerTest extends GridCommandHandlerClusterPerMethodAb assertEquals(EXIT_CODE_OK, execute("--state")); -assertContains(log, testOut.toString(), "Cluster is active (read-only)"); +assertClusterState(ACTIVE_READ_ONLY, testOut.toString()); boolean tagUpdated = GridTestUtils.waitForCondition(() -> { try { @@ -3972,6 +3972,25 @@ public class GridCommandHandlerTest extends GridCommandHandlerClusterPerMethodAb assertContains(log, testOut.toString(), "no conflicts have been found"); } +/** + * Test to make sure that the '--baseline' command shows correct cluster state + * + * @throws Exception if failed. + */ +@Test +public void testClusterStateInBaselineCommand() throws Exception { +Ignite ignite = startGrids(1); + +injectTestSystemOut(); + +for (ClusterState state : ClusterState.values()) { +ignite.cluster().state(state); +assertEquals(EXIT_CODE_OK, execute("--baseline")); +assertEquals(state, ignite.cluster().state()); +assertClusterState(state, testOut.toString()); +} +} + /** * @param ignite Ignite to execute task on. * @param delFoundGarbage If clearing mode should be used. @@ -4060,4 +4079,12 @@ public class GridCommandHandlerTest extends GridCommandHandlerClusterPerMethodAb } } } + +/** + * @param state Current state of the cluster. + * @param logOutput Logger output where current cluster state is supposed to be specified. + */ +public static void assertClusterState(ClusterState state, String logOutput) { +assertTrue(Pattern.compile("Cluster state: " + state + "\\s+").matcher(logOutput).find()); +} } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/management/StateCommand.java b/modules/core/src/main/java/org/apache/ignite/internal/management/StateCommand.java index 8b7ff823a86..21eca4fd8a1 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/management/StateCommand.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/management/StateCommand.java @@ -73,25 +73,7 @@ public class StateCommand implements LocalCommand printer ) { -printer.accept("Cluster state: " + (res.isActive() ? "active" : "inactive")); +printer.accept("Cluster state: " + res.clusterState()); printer.accept("Current topology version: " + res.getTopologyVersion()); BaselineAutoAdjustSettings autoAdjustSettings = res.getAutoAdjustSettings(); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/management/baseline/BaselineTask.java