[ignite-3] branch main updated (94dc641d0e -> d52fd355f8)

2023-03-03 Thread apkhmv
This is an automated email from the ASF dual-hosted git repository.

apkhmv pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


from 94dc641d0e IGNITE-18864 Add a test for a leader change during full 
rebalance to a leader with enough log (#1750)
 add d52fd355f8 IGNITE-18957 Disable SqlSchemaProviderTest (#1751)

No new revisions were added by this update.

Summary of changes:
 .../java/org/apache/ignite/internal/cli/sql/SqlSchemaProviderTest.java  | 2 ++
 1 file changed, 2 insertions(+)



[ignite-web-console] branch dependabot/npm_and_yarn/modules/backend/minimist-and-mkdirp-and-pkg-and-mocha-and-mocha-teamcity-reporter-1.2.8 created (now deae41a)

2023-03-03 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch 
dependabot/npm_and_yarn/modules/backend/minimist-and-mkdirp-and-pkg-and-mocha-and-mocha-teamcity-reporter-1.2.8
in repository https://gitbox.apache.org/repos/asf/ignite-web-console.git


  at deae41a  Bump minimist, mkdirp, pkg, mocha and mocha-teamcity-reporter

No new revisions were added by this update.



[ignite-3] branch main updated: IGNITE-18864 Add a test for a leader change during full rebalance to a leader with enough log (#1750)

2023-03-03 Thread tkalkirill
This is an automated email from the ASF dual-hosted git repository.

tkalkirill 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 94dc641d0e IGNITE-18864 Add a test for a leader change during full 
rebalance to a leader with enough log (#1750)
94dc641d0e is described below

commit 94dc641d0e8897ff763ee43b2c68afe5abc73bcb
Author: Roman Puchkovskiy 
AuthorDate: Fri Mar 3 20:53:04 2023 +0400

IGNITE-18864 Add a test for a leader change during full rebalance to a 
leader with enough log (#1750)
---
 .../raftsnapshot/ItTableRaftSnapshotsTest.java | 52 ++
 1 file changed, 52 insertions(+)

diff --git 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/raftsnapshot/ItTableRaftSnapshotsTest.java
 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/raftsnapshot/ItTableRaftSnapshotsTest.java
index 31b005d23a..414eb9cdb1 100644
--- 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/raftsnapshot/ItTableRaftSnapshotsTest.java
+++ 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/raftsnapshot/ItTableRaftSnapshotsTest.java
@@ -25,6 +25,7 @@ import static 
org.apache.ignite.internal.testframework.matchers.CompletableFutur
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.is;
+import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.junit.jupiter.api.Assertions.fail;
 
@@ -812,4 +813,55 @@ class ItTableRaftSnapshotsTest extends 
IgniteIntegrationTest {
 
 replicatorLogger.addHandler(replicaLoggerHandler);
 }
+
+/**
+ * This tests the following schenario.
+ *
+ * 
+ * 
+ * A snapshot installation is started from Node A that is a leader 
because A does not have enough RAFT log to feed a follower
+ * with AppendEntries
+ * 
+ * It is cancelled in the middle
+ * Node B is elected as a leader; B has enough log to feed the 
follower with AppendEntries
+ * The follower gets data from the leader using AppendEntries, not 
using InstallSnapshot>
+ * 
+ */
+@Test
+void testChangeLeaderDuringSnapshotInstallationToLeaderWithEnoughLog() 
throws Exception {
+CompletableFuture sentSnapshotMetaResponseFormNode0Future = new 
CompletableFuture<>();
+
+
prepareClusterForInstallingSnapshotToNode2(NodeKnockout.PARTITION_NETWORK, 
DEFAULT_STORAGE_ENGINE, cluster -> {
+// Let's hang the InstallSnapshot in the "middle" from the leader 
with index 0.
+
cluster.node(0).dropMessages(dropSnapshotMetaResponse(sentSnapshotMetaResponseFormNode0Future));
+});
+
+CompletableFuture installSnapshotSuccessfulFuture = new 
CompletableFuture<>();
+
+listenForSnapshotInstalledSuccessFromLogger(1, 2, 
installSnapshotSuccessfulFuture);
+
+// Return node 2.
+cluster.reanimateNode(2, NodeKnockout.PARTITION_NETWORK);
+
+// Waiting for the InstallSnapshot from node 2 to hang in the "middle".
+assertThat(sentSnapshotMetaResponseFormNode0Future, willSucceedIn(1, 
TimeUnit.MINUTES));
+
+// Change the leader to node 1.
+transferLeadershipOnSolePartitionTo(1);
+
+boolean replicated = waitForCondition(() -> {
+List> rows = queryWithRetry(2, 
"select * from test", ItTableRaftSnapshotsTest::readRows);
+return rows.size() == 1;
+}, 20_000);
+
+assertTrue(replicated, "Data has not been replicated to node 2 in 
time");
+
+// No snapshot must be installed.
+assertFalse(installSnapshotSuccessfulFuture.isDone());
+
+// Make sure the rebalancing is complete.
+List> rows = queryWithRetry(2, "select 
* from test", ItTableRaftSnapshotsTest::readRows);
+
+assertThat(rows, is(List.of(new IgniteBiTuple<>(1, "one";
+}
 }



[ignite-3] branch ignite-18208 updated (9a77d41637 -> 10f3c4900a)

2023-03-03 Thread amashenkov
This is an automated email from the ASF dual-hosted git repository.

amashenkov pushed a change to branch ignite-18208
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


from 9a77d41637 Styles.
 add 10f3c4900a WIP. Rework after review 1/2.

No new revisions were added by this update.

Summary of changes:
 .../planner/AbstractAggregatePlannerTest.java  | 859 +
 .../planner/ColocatedHashAggregatePlannerTest.java | 623 ---
 .../planner/ColocatedSortAggregatePlannerTest.java | 635 ---
 3 files changed, 1187 insertions(+), 930 deletions(-)



[ignite] branch master updated (1f238846c8b -> e220e8006e4)

2023-03-03 Thread timoninmaxim
This is an automated email from the ASF dual-hosted git repository.

timoninmaxim pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


from 1f238846c8b IGNITE-18936 [ducktests] Fix parsing of the control.sh 
baseline command output and store JVM error file (#10575)
 add e220e8006e4 IGNITE-18546 Add cache clear command to control.sh (#10577)

No new revisions were added by this update.

Summary of changes:
 docs/_docs/tools/control-script.adoc   |  24 +
 .../internal/commandline/cache/CacheClear.java | 108 +
 .../commandline/cache/CacheCommandList.java|   5 +
 .../commandline/cache/CacheSubcommands.java|   7 +-
 .../util/GridCommandHandlerClusterByClassTest.java |  93 ++
 .../internal/processors/cache/ClearCachesTask.java |  81 
 .../cache/ClearCachesTaskArg.java} |  44 -
 .../cache/ClearCachesTaskResult.java}  |  53 +-
 ...mandHandlerClusterByClassTest_cache_help.output |   6 ++
 ...dlerClusterByClassWithSSLTest_cache_help.output |   6 ++
 10 files changed, 373 insertions(+), 54 deletions(-)
 create mode 100644 
modules/control-utility/src/main/java/org/apache/ignite/internal/commandline/cache/CacheClear.java
 create mode 100644 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClearCachesTask.java
 copy 
modules/core/src/main/java/org/apache/ignite/internal/{visor/tx/VisorTxTaskResult.java
 => processors/cache/ClearCachesTaskArg.java} (70%)
 copy 
modules/core/src/main/java/org/apache/ignite/internal/{visor/tx/VisorTxTaskResult.java
 => processors/cache/ClearCachesTaskResult.java} (59%)



[ignite-3] branch main updated: IGNITE-18874 Add a JUnit extension for stopping all Ignites after test suite finishes (#1709)

2023-03-03 Thread tkalkirill
This is an automated email from the ASF dual-hosted git repository.

tkalkirill 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 d949049375 IGNITE-18874 Add a JUnit extension for stopping all Ignites 
after test suite finishes (#1709)
d949049375 is described below

commit d94904937535570acf0c789e8fddc511743357e2
Author: Roman Puchkovskiy 
AuthorDate: Fri Mar 3 14:21:20 2023 +0400

IGNITE-18874 Add a JUnit extension for stopping all Ignites after test 
suite finishes (#1709)
---
 .../java/org/apache/ignite/IgnitionManager.java|  4 +-
 modules/rest/openapi/openapi.yaml  |  3 +
 modules/runner/build.gradle|  2 +
 ...est.java => ClusterPerTestIntegrationTest.java} | 10 +---
 .../ignite/internal/IgniteIntegrationTest.java | 31 ++
 .../ignite/internal/ItNoSyncMetadataTest.java  |  4 +-
 .../component/ItRestAddressReportTest.java |  3 +-
 .../ignite/internal/compute/ItComputeTest.java |  4 +-
 .../internal/compute/ItLogicalTopologyTest.java|  4 +-
 .../internal/deployment/ItDeploymentUnitTest.java  |  4 +-
 .../ignite/internal/index/ItIndexManagerTest.java  |  4 +-
 .../inmemory/ItRaftStorageVolatilityTest.java  |  4 +-
 .../internal/junit/StopAllIgnitesAfterTests.java   | 66 ++
 .../raftsnapshot/ItTableRaftSnapshotsTest.java |  7 +--
 .../ignite/internal/rebalance/ItRebalanceTest.java |  7 +--
 .../ignite/internal/rest/AbstractRestTestBase.java |  6 +-
 .../ignite/internal/rest/ItPortRangeTest.java  |  6 +-
 .../ignite/internal/rest/ssl/ItRestSslTest.java|  6 +-
 .../runner/app/AbstractSchemaChangeTest.java   |  6 +-
 .../internal/runner/app/IgniteRunnerTest.java  |  6 +-
 .../ignite/internal/runner/app/ItIgnitionTest.java |  6 +-
 .../ItRaftCommandLeftInLogUntilRestartTest.java|  4 +-
 .../runner/app/ItTableApiContractTest.java |  4 +-
 .../internal/runner/app/ItTableCreationTest.java   |  6 +-
 .../ignite/internal/sql/api/ItCommonApiTest.java   |  4 +-
 .../internal/sql/api/ItSqlAsynchronousApiTest.java |  4 +-
 .../internal/sql/api/ItSqlSynchronousApiTest.java  |  4 +-
 ...st.java => ClusterPerClassIntegrationTest.java} | 11 ++--
 .../internal/sql/engine/ItAggregatesTest.java  |  2 +-
 .../internal/sql/engine/ItCorrelatesTest.java  |  2 +-
 .../internal/sql/engine/ItCreateTableDdlTest.java  |  2 +-
 .../internal/sql/engine/ItDataTypesTest.java   |  2 +-
 .../ignite/internal/sql/engine/ItDmlTest.java  |  2 +-
 .../sql/engine/ItDynamicParameterTest.java |  2 +-
 .../internal/sql/engine/ItFunctionsTest.java   |  2 +-
 .../sql/engine/ItHashSpoolIntegrationTest.java |  2 +-
 .../internal/sql/engine/ItHashSpoolTest.java   |  4 +-
 .../internal/sql/engine/ItImplicitCastsTest.java   |  2 +-
 .../internal/sql/engine/ItIndexSpoolTest.java  |  4 +-
 .../ignite/internal/sql/engine/ItIntervalTest.java |  2 +-
 .../ignite/internal/sql/engine/ItJoinTest.java |  2 +-
 .../internal/sql/engine/ItLimitOffsetTest.java |  2 +-
 .../ignite/internal/sql/engine/ItMetadataTest.java |  2 +-
 .../internal/sql/engine/ItMixedQueriesTest.java|  2 +-
 .../internal/sql/engine/ItOrToUnionRuleTest.java   |  2 +-
 .../sql/engine/ItProjectScanMergeRuleTest.java |  2 +-
 .../internal/sql/engine/ItSecondaryIndexTest.java  |  2 +-
 .../ignite/internal/sql/engine/ItSetOpTest.java|  2 +-
 .../internal/sql/engine/ItSqlOperatorsTest.java|  2 +-
 .../ignite/internal/sql/engine/ItUuidTest.java |  2 +-
 .../ignite/internal/sql/engine/ItZoneDdlTest.java  |  2 +-
 .../internal/sql/internal/InternalSchemaTest.java  |  4 +-
 .../ignite/internal/sqllogic/ItSqlLogicTest.java   |  6 +-
 .../org/apache/ignite/internal/ssl/ItSslTest.java  |  6 +-
 .../apache/ignite/internal/start/ItStartTest.java  |  6 +-
 .../internal/table/ItPublicApiColocationTest.java  |  4 +-
 .../ignite/internal/table/ItTableScanTest.java |  4 +-
 .../apache/ignite/internal/app/IgnitionImpl.java   | 20 +++
 .../internal/component/RestAddressReporter.java|  6 +-
 .../component/RestAddressReporterTest.java | 15 ++---
 60 files changed, 219 insertions(+), 132 deletions(-)

diff --git a/modules/api/src/main/java/org/apache/ignite/IgnitionManager.java 
b/modules/api/src/main/java/org/apache/ignite/IgnitionManager.java
index 2705fe53f1..9d69c89a06 100644
--- a/modules/api/src/main/java/org/apache/ignite/IgnitionManager.java
+++ b/modules/api/src/main/java/org/apache/ignite/IgnitionManager.java
@@ -112,9 +112,7 @@ public class IgnitionManager {
  * @param nodeName Node name to stop.
  */
 public static void stop(String nodeName) {
-Ignition ignition = 
loadIgnitionService(Thread.currentThread().getContextClassLoader());
-
-ignition.stop(nodeName);
+stop(nodeName, Thread.currentThread().getContextClassLoader());
 }
 

[ignite-3] branch main updated: IGNITE-18754 Use local timezone in ItJdbcResultSetSelfTest#testTimestamp (#1746)

2023-03-03 Thread korlov
This is an automated email from the ASF dual-hosted git repository.

korlov 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 23563c650f IGNITE-18754 Use local timezone in 
ItJdbcResultSetSelfTest#testTimestamp (#1746)
23563c650f is described below

commit 23563c650f15942a8c39ac5c12f1f18ca9981326
Author: Alexander Polovtcev 
AuthorDate: Fri Mar 3 10:57:23 2023 +0200

IGNITE-18754 Use local timezone in ItJdbcResultSetSelfTest#testTimestamp 
(#1746)
---
 .../apache/ignite/jdbc/ItJdbcResultSetSelfTest.java  | 20 +---
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git 
a/modules/jdbc/src/integrationTest/java/org/apache/ignite/jdbc/ItJdbcResultSetSelfTest.java
 
b/modules/jdbc/src/integrationTest/java/org/apache/ignite/jdbc/ItJdbcResultSetSelfTest.java
index e12cbe040e..78d50e6db0 100644
--- 
a/modules/jdbc/src/integrationTest/java/org/apache/ignite/jdbc/ItJdbcResultSetSelfTest.java
+++ 
b/modules/jdbc/src/integrationTest/java/org/apache/ignite/jdbc/ItJdbcResultSetSelfTest.java
@@ -37,7 +37,11 @@ import java.sql.SQLException;
 import java.sql.Statement;
 import java.sql.Time;
 import java.sql.Timestamp;
+import java.time.Instant;
 import java.time.LocalDate;
+import java.time.LocalTime;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
 import java.util.GregorianCalendar;
 import java.util.UUID;
 import org.apache.ignite.internal.tostring.S;
@@ -555,14 +559,16 @@ public class ItJdbcResultSetSelfTest extends 
AbstractJdbcSelfTest {
 
 assertTrue(rs.next());
 
-assertEquals(-1080, rs.getTimestamp("tsVal").getTime());
-assertEquals(new Date(new Timestamp(-1080).getTime()), 
rs.getDate(14));
-assertEquals(new Time(new Timestamp(-1080).getTime()), 
rs.getTime(14));
-assertEquals(new Timestamp(-1080), rs.getTimestamp(14));
+Instant localEpoch = ZonedDateTime.of(LocalDate.EPOCH, 
LocalTime.MIDNIGHT, ZoneId.systemDefault()).toInstant();
 
-assertEquals(new Date(new Timestamp(-1080).getTime()), 
rs.getObject(14, Date.class));
-assertEquals(new Time(new Timestamp(-1080).getTime()), 
rs.getObject(14, Time.class));
-assertEquals(new Timestamp(-1080), rs.getObject(14, 
Timestamp.class));
+assertEquals(Timestamp.from(localEpoch), rs.getTimestamp("tsVal"));
+assertEquals(Date.from(localEpoch), rs.getDate(14));
+assertEquals(Time.from(localEpoch), rs.getTime(14));
+assertEquals(Timestamp.from(localEpoch), rs.getTimestamp(14));
+
+assertEquals(Date.from(localEpoch), rs.getObject(14, Date.class));
+assertEquals(Time.from(localEpoch), rs.getObject(14, Time.class));
+assertEquals(Timestamp.from(localEpoch), rs.getObject(14, 
Timestamp.class));
 
 assertFalse(rs.next());
 }



[ignite] branch master updated: IGNITE-18936 [ducktests] Fix parsing of the control.sh baseline command output and store JVM error file (#10575)

2023-03-03 Thread ivandasch
This is an automated email from the ASF dual-hosted git repository.

ivandasch 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 1f238846c8b IGNITE-18936 [ducktests] Fix parsing of the control.sh 
baseline command output and store JVM error file (#10575)
1f238846c8b is described below

commit 1f238846c8beb0d2d5a742eae85a55987313a99e
Author: Sergey Korotkov 
AuthorDate: Fri Mar 3 15:17:11 2023 +0700

IGNITE-18936 [ducktests] Fix parsing of the control.sh baseline command 
output and store JVM error file (#10575)
---
 .../ducktests/tests/ignitetest/services/utils/control_utility.py | 6 +++---
 modules/ducktests/tests/ignitetest/services/utils/ignite_spec.py | 3 ++-
 modules/ducktests/tests/ignitetest/services/utils/jvm_utils.py   | 9 +++--
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git 
a/modules/ducktests/tests/ignitetest/services/utils/control_utility.py 
b/modules/ducktests/tests/ignitetest/services/utils/control_utility.py
index 10bcdee4adc..82eb2fcab96 100644
--- a/modules/ducktests/tests/ignitetest/services/utils/control_utility.py
+++ b/modules/ducktests/tests/ignitetest/services/utils/control_utility.py
@@ -365,9 +365,9 @@ class ControlUtility:
 def __parse_cluster_state(output):
 state_pattern = re.compile("Cluster state: (?P[^\\s]+)")
 topology_pattern = re.compile("Current topology version: 
(?P\\d+)")
-baseline_pattern = 
re.compile("Consistent(Id|ID)=(?P[^\\s]+)"
-  
"(,\\sA(ddress|DDRESS)=(?P[^\\s]+))?"
-  ",\\sS(tate|TATE)=(?P[^\\s]+)"
+baseline_pattern = 
re.compile("Consistent(Id|ID)=(?P[^\\s,]+)"
+  
"(,\\sA(ddress|DDRESS)=(?P[^\\s,]+))?"
+  ",\\sS(tate|TATE)=(?P[^\\s,]+)"
   "(,\\sOrder=(?P\\d+))?")
 
 match = state_pattern.search(output)
diff --git a/modules/ducktests/tests/ignitetest/services/utils/ignite_spec.py 
b/modules/ducktests/tests/ignitetest/services/utils/ignite_spec.py
index b82551491dc..b75c0aed02f 100644
--- a/modules/ducktests/tests/ignitetest/services/utils/ignite_spec.py
+++ b/modules/ducktests/tests/ignitetest/services/utils/ignite_spec.py
@@ -97,7 +97,8 @@ class IgniteSpec(metaclass=ABCMeta):
 Return a set of default JVM options.
 """
 default_jvm_opts = 
create_jvm_settings(gc_dump_path=os.path.join(self.service.log_dir, "gc.log"),
-   
oom_path=os.path.join(self.service.log_dir, "out_of_mem.hprof"))
+   
oom_path=os.path.join(self.service.log_dir, "out_of_mem.hprof"),
+   
vm_error_path=os.path.join(self.service.log_dir, "hs_err_pid%p.log"))
 
 default_jvm_opts = merge_jvm_settings(
 default_jvm_opts, ["-DIGNITE_SUCCESS_FILE=" + 
os.path.join(self.service.persistent_root, "success_file"),
diff --git a/modules/ducktests/tests/ignitetest/services/utils/jvm_utils.py 
b/modules/ducktests/tests/ignitetest/services/utils/jvm_utils.py
index 0fccd871a75..5aa5adafcd5 100644
--- a/modules/ducktests/tests/ignitetest/services/utils/jvm_utils.py
+++ b/modules/ducktests/tests/ignitetest/services/utils/jvm_utils.py
@@ -28,7 +28,7 @@ JVM_PARAMS_GENERIC = "-server -XX:+DisableExplicitGC 
-XX:+AlwaysPreTouch " \
 
 
 def create_jvm_settings(heap_size=DEFAULT_HEAP, gc_settings=JVM_PARAMS_GC_G1, 
generic_params=JVM_PARAMS_GENERIC,
-gc_dump_path=None, oom_path=None):
+gc_dump_path=None, oom_path=None, vm_error_path=None):
 """
 Provides settings string for JVM process.
 param opts: JVM options to merge. Adds new or rewrites default values. Can 
be list or string.
@@ -41,7 +41,12 @@ def create_jvm_settings(heap_size=DEFAULT_HEAP, 
gc_settings=JVM_PARAMS_GC_G1, ge
 if oom_path:
 out_of_mem_dump = "-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=" 
+ oom_path
 
-as_string = f"-Xmx{heap_size} -Xms{heap_size} {gc_settings} {gc_dump} 
{out_of_mem_dump} {generic_params}".strip()
+vm_error_dump = ""
+if vm_error_path:
+vm_error_dump = "-XX:ErrorFile=" + vm_error_path
+
+as_string = f"-Xmx{heap_size} -Xms{heap_size} {gc_settings} {gc_dump} " \
+f"{out_of_mem_dump} {vm_error_dump} {generic_params}".strip()
 
 return as_string.split()