(ignite) branch master updated: IGNITE-23151 Reserve WAL record index for further improvements (#11513)

2024-09-05 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 3c3deb10ef0 IGNITE-23151 Reserve WAL record index for further 
improvements (#11513)
3c3deb10ef0 is described below

commit 3c3deb10ef08d0b51298da9576b52b9b4a71a57b
Author: Slava Koptilin 
AuthorDate: Thu Sep 5 18:25:42 2024 +0300

IGNITE-23151 Reserve WAL record index for further improvements (#11513)
---
 .../internal/pagemem/wal/record/WALRecord.java |  5 ++-
 .../testframework/wal/record/RecordUtils.java  | 49 --
 2 files changed, 30 insertions(+), 24 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/WALRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/WALRecord.java
index 438e759195a..351486a8957 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/WALRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/WALRecord.java
@@ -305,7 +305,10 @@ public abstract class WALRecord {
 CDC_MANAGER_STOP_RECORD(80, CUSTOM),
 
 /** Physical WAL record that represents a fragment of an entry update. 
(Placeholder) */
-DATA_PAGE_FRAGMENTED_UPDATE_RECORD(81, PHYSICAL);
+DATA_PAGE_FRAGMENTED_UPDATE_RECORD(81, PHYSICAL),
+
+/** Reserved for further improvements. */
+RESERVED_IDX2(82);
 
 /** Index for serialization. Should be consistent throughout all 
versions. */
 private final int idx;
diff --git 
a/modules/core/src/test/java/org/apache/ignite/testframework/wal/record/RecordUtils.java
 
b/modules/core/src/test/java/org/apache/ignite/testframework/wal/record/RecordUtils.java
index ac6846b19a3..27dd9ff10e8 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/testframework/wal/record/RecordUtils.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/testframework/wal/record/RecordUtils.java
@@ -167,6 +167,7 @@ import static 
org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType
 import static 
org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType.PART_META_UPDATE_STATE;
 import static 
org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType.REENCRYPTION_START_RECORD;
 import static 
org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType.RESERVED;
+import static 
org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType.RESERVED_IDX2;
 import static 
org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType.ROLLBACK_TX_RECORD;
 import static 
org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType.ROTATED_ID_PART_RECORD;
 import static 
org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType.SNAPSHOT;
@@ -194,7 +195,7 @@ public class RecordUtils {
 put(DATA_RECORD_V2, RecordUtils::buildDataRecord);
 put(CDC_DATA_RECORD, RecordUtils::buildDataRecord);
 put(CHECKPOINT_RECORD, RecordUtils::buildCheckpointRecord);
-put(HEADER_RECORD, buildUpsupportedWalRecord(HEADER_RECORD));
+put(HEADER_RECORD, buildUnsupportedWalRecord(HEADER_RECORD));
 put(INIT_NEW_PAGE_RECORD, RecordUtils::buildInitNewPageRecord);
 put(DATA_PAGE_INSERT_RECORD, RecordUtils::buildDataPageInsertRecord);
 put(DATA_PAGE_INSERT_FRAGMENT_RECORD, 
RecordUtils::buildDataPageInsertFragmentRecord);
@@ -210,11 +211,11 @@ public class RecordUtils {
 put(BTREE_FIX_COUNT, RecordUtils::buildFixCountRecord);
 put(BTREE_PAGE_REPLACE, RecordUtils::buildReplaceRecord);
 put(BTREE_PAGE_REMOVE, RecordUtils::buildRemoveRecord);
-put(BTREE_PAGE_INNER_REPLACE, 
buildUpsupportedWalRecord(BTREE_PAGE_INNER_REPLACE));
+put(BTREE_PAGE_INNER_REPLACE, 
buildUnsupportedWalRecord(BTREE_PAGE_INNER_REPLACE));
 put(BTREE_FIX_REMOVE_ID, RecordUtils::buildFixRemoveId);
-put(BTREE_FORWARD_PAGE_SPLIT, 
buildUpsupportedWalRecord(BTREE_FORWARD_PAGE_SPLIT));
+put(BTREE_FORWARD_PAGE_SPLIT, 
buildUnsupportedWalRecord(BTREE_FORWARD_PAGE_SPLIT));
 put(BTREE_EXISTING_PAGE_SPLIT, 
RecordUtils::buildSplitExistingPageRecord);
-put(BTREE_PAGE_MERGE, buildUpsupportedWalRecord(BTREE_PAGE_MERGE));
+put(BTREE_PAGE_MERGE, buildUnsupportedWalRecord(BTREE_PAGE_MERGE));
 put(PAGES_LIST_SET_NEXT, RecordUtils::buildPagesListSetNextRecord);
 put(PAGES_LIST_SET_PREVIOUS, 
RecordUtils::buildPagesListSetPreviousRecord);
 put(PAGES_LIST_INIT_NEW_PAGE, 
RecordUtils::buildPagesListInitNewPageRecord);
@@ -239,40 +240,42 @@ public class RecordUtils {
 put(SNAPSHOT, RecordUtils::buildSnapshotRecord);
 put(METASTORE_DATA_RECORD, RecordUtils::buildMetastoreDataRecord);
 put(EXCHANGE, RecordUtils::buildExchangeRecord);
-put

(ignite-3) branch main updated: IGNITE-22956 Implement local events about zone replica start in PartitionReplicaLifecycleManager. (#4294)

2024-09-03 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 003edce538 IGNITE-22956 Implement local events about zone replica 
start in PartitionReplicaLifecycleManager. (#4294)
003edce538 is described below

commit 003edce5383ea77d44dda9cbc8755327e382bc3a
Author: Kirill Gusakov 
AuthorDate: Tue Sep 3 17:04:52 2024 +0300

IGNITE-22956 Implement local events about zone replica start in 
PartitionReplicaLifecycleManager. (#4294)
---
 .../replicator/ItReplicaLifecycleTest.java |  68 +++-
 .../replicator/LocalPartitionReplicaEvent.java |  30 
 .../PartitionReplicaEventParameters.java   |  48 ++
 .../PartitionReplicaLifecycleManager.java  | 113 +++--
 .../replicator/ZonePartitionReplicaListener.java   |  11 ++
 .../internal/table/distributed/TableManager.java   | 175 +
 6 files changed, 400 insertions(+), 45 deletions(-)

diff --git 
a/modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/ItReplicaLifecycleTest.java
 
b/modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/ItReplicaLifecycleTest.java
index 5aea3a6229..7f15fecdb6 100644
--- 
a/modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/ItReplicaLifecycleTest.java
+++ 
b/modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/ItReplicaLifecycleTest.java
@@ -46,7 +46,9 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.mockito.Mockito.mock;
 
+import java.io.IOException;
 import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
 import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -58,10 +60,12 @@ import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ForkJoinPool;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicReference;
 import java.util.function.Consumer;
@@ -69,6 +73,7 @@ import java.util.function.Function;
 import java.util.function.LongFunction;
 import java.util.function.LongSupplier;
 import java.util.stream.Collectors;
+import java.util.stream.IntStream;
 import org.apache.ignite.internal.affinity.AffinityUtils;
 import org.apache.ignite.internal.affinity.Assignment;
 import org.apache.ignite.internal.affinity.Assignments;
@@ -111,6 +116,7 @@ import org.apache.ignite.internal.hlc.ClockWaiter;
 import org.apache.ignite.internal.hlc.HybridClock;
 import org.apache.ignite.internal.hlc.HybridClockImpl;
 import org.apache.ignite.internal.index.IndexManager;
+import org.apache.ignite.internal.lang.IgniteInternalException;
 import org.apache.ignite.internal.lang.NodeStoppingException;
 import org.apache.ignite.internal.logger.IgniteLogger;
 import org.apache.ignite.internal.logger.Loggers;
@@ -123,7 +129,7 @@ import org.apache.ignite.internal.metastorage.dsl.Condition;
 import org.apache.ignite.internal.metastorage.dsl.Operation;
 import org.apache.ignite.internal.metastorage.impl.MetaStorageManagerImpl;
 import org.apache.ignite.internal.metastorage.server.KeyValueStorage;
-import 
org.apache.ignite.internal.metastorage.server.SimpleInMemoryKeyValueStorage;
+import 
org.apache.ignite.internal.metastorage.server.persistence.RocksDbKeyValueStorage;
 import org.apache.ignite.internal.metrics.NoOpMetricManager;
 import org.apache.ignite.internal.network.ClusterService;
 import org.apache.ignite.internal.network.StaticNodeFinder;
@@ -141,6 +147,7 @@ import 
org.apache.ignite.internal.raft.configuration.RaftConfiguration;
 import org.apache.ignite.internal.raft.storage.LogStorageFactory;
 import org.apache.ignite.internal.raft.storage.impl.LocalLogStorageFactory;
 import org.apache.ignite.internal.raft.util.SharedLogStorageFactoryUtils;
+import org.apache.ignite.internal.replicator.Replica;
 import org.apache.ignite.internal.replicator.ReplicaManager;
 import org.apache.ignite.internal.replicator.ReplicaService;
 import org.apache.ignite.internal.replicator.ReplicationGroupId;
@@ -582,6 +589,36 @@ public class ItReplicaLifecycleTest extends 
BaseIgniteAbstractTest {
 );
 }
 
+@Test
+void testTableReplicaListenersCreationAfterRebalance(TestInfo testInfo) 
throws Exception {
+startNodes(testInfo, 3

(ignite-3) branch main updated: IGNITE-22679 Explain the workflow at the start of catalog manager. (#4300)

2024-09-03 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 53e8bfafc7 IGNITE-22679 Explain the workflow at the start of catalog 
manager. (#4300)
53e8bfafc7 is described below

commit 53e8bfafc71b11f3d8a55ea97d17fe4df1c0471f
Author: Cyrill 
AuthorDate: Tue Sep 3 16:33:29 2024 +0300

IGNITE-22679 Explain the workflow at the start of catalog manager. (#4300)
---
 .../internal/distributionzones/DistributionZoneManager.java  | 7 ++-
 .../partition/replicator/PartitionReplicaLifecycleManager.java   | 9 -
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git 
a/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
 
b/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
index 603c7f99fd..795cb2f190 100644
--- 
a/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
+++ 
b/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
@@ -268,7 +268,12 @@ public class DistributionZoneManager implements 
IgniteComponent {
 
 restoreGlobalStateFromLocalMetastorage(recoveryRevision);
 
-// TODO: IGNITE-22679 CatalogManagerImpl initializes versions in a 
separate thread, not safe to make this call directly.
+// If Catalog manager is empty, it gets initialized asynchronously 
and at this moment the initialization might not complete,
+// nevertheless everything works correctly.
+// All components execute the synchronous part of startAsync 
sequentially and only when they all complete,
+// we enable metastorage listeners (see 
IgniteImpl.joinClusterAsync: metaStorageMgr.deployWatches()).
+// Once the metstorage watches are deployed, all components start 
to receive callbacks, this chain of callbacks eventually
+// fires CatalogManager's ZONE_CREATE event, and the state of 
DistributionZoneManager becomes consistent.
 int catalogVersion = catalogManager.latestCatalogVersion();
 
 return allOf(
diff --git 
a/modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java
 
b/modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java
index 6faae35159..bb3dfca2d3 100644
--- 
a/modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java
+++ 
b/modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java
@@ -269,8 +269,15 @@ public class PartitionReplicaLifecycleManager implements 
IgniteComponent {
 }
 
 private CompletableFuture processZonesOnStart(long recoveryRevision, 
@Nullable HybridTimestamp lwm) {
+// If Catalog manager is empty, it gets initialized asynchronously and 
at this moment the initialization might not complete,
+// nevertheless everything works correctly.
+// All components execute the synchronous part of startAsync 
sequentially and only when they all complete,
+// we enable metastorage listeners (see IgniteImpl.joinClusterAsync: 
metaStorageMgr.deployWatches()).
+// Once the metstorage watches are deployed, all components start to 
receive callbacks, this chain of callbacks eventually
+// fires CatalogManager's ZONE_CREATE event, and the state of 
PartitionReplicaLifecycleManager becomes consistent
+// (calculateZoneAssignmentsAndCreateReplicationNodes() will be 
called).
 int earliestCatalogVersion = 
catalogMgr.activeCatalogVersion(hybridTimestampToLong(lwm));
-// TODO https://issues.apache.org/jira/browse/IGNITE-22679
+
 int latestCatalogVersion = catalogMgr.latestCatalogVersion();
 
 var startedZones = new IntOpenHashSet();



(ignite-3) branch main updated: IGNITE-23063 ItReplicaLifecycleTest.testStableAreWrittenAfterRestart(TestInfo) is flaky (#4291)

2024-08-29 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 2ffebf67e0 IGNITE-23063 
ItReplicaLifecycleTest.testStableAreWrittenAfterRestart(TestInfo) is flaky 
(#4291)
2ffebf67e0 is described below

commit 2ffebf67e0204c797d44292ec6f61a3c4aa48b20
Author: Mikhail Efremov 
AuthorDate: Fri Aug 30 12:24:13 2024 +0600

IGNITE-23063 
ItReplicaLifecycleTest.testStableAreWrittenAfterRestart(TestInfo) is flaky 
(#4291)
---
 .../replicator/ItReplicaLifecycleTest.java |  2 -
 .../PartitionReplicaLifecycleManager.java  |  3 +-
 .../ignite/internal/replicator/ReplicaManager.java | 77 +++---
 3 files changed, 71 insertions(+), 11 deletions(-)

diff --git 
a/modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/ItReplicaLifecycleTest.java
 
b/modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/ItReplicaLifecycleTest.java
index f2eadd5afe..fea2d42cd3 100644
--- 
a/modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/ItReplicaLifecycleTest.java
+++ 
b/modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/ItReplicaLifecycleTest.java
@@ -209,7 +209,6 @@ import org.junit.jupiter.api.extension.ExtendWith;
  */
 @ExtendWith({WorkDirectoryExtension.class, ConfigurationExtension.class})
 @Timeout(60)
-@Disabled("https://issues.apache.org/jira/browse/IGNITE-23063";)
 // TODO: https://issues.apache.org/jira/browse/IGNITE-22522 remove this test 
after the switching to zone-based replication
 public class ItReplicaLifecycleTest extends BaseIgniteAbstractTest {
 private static final IgniteLogger LOG = 
Loggers.forClass(ItReplicaLifecycleTest.class);
@@ -613,7 +612,6 @@ public class ItReplicaLifecycleTest extends 
BaseIgniteAbstractTest {
 }
 
 @Test
-@Disabled("https://issues.apache.org/jira/browse/IGNITE-23063";)
 void testStableAreWrittenAfterRestart(TestInfo testInfo) throws Exception {
 startNodes(testInfo, 1);
 
diff --git 
a/modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java
 
b/modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java
index f24140bc46..6faae35159 100644
--- 
a/modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java
+++ 
b/modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java
@@ -468,6 +468,7 @@ public class PartitionReplicaLifecycleManager implements 
IgniteComponent {
 if (ex != null) {
 LOG.warn("Unable to update raft groups on the node [zoneId={}, 
partitionId={}]", ex, zoneId, partId);
 }
+
 return null;
 });
 }
@@ -1244,7 +1245,7 @@ public class PartitionReplicaLifecycleManager implements 
IgniteComponent {
 int i = 0;
 
 for (ReplicationGroupId partitionId : partitionIds) {
-stopReplicaFutures[i++] = weakStopPartition(partitionId);
+stopReplicaFutures[i++] = stopPartition(partitionId);
 }
 
 allOf(stopReplicaFutures).get(10, TimeUnit.SECONDS);
diff --git 
a/modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaManager.java
 
b/modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaManager.java
index e96854b17e..78de8234a7 100644
--- 
a/modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaManager.java
+++ 
b/modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaManager.java
@@ -38,6 +38,8 @@ import static 
org.apache.ignite.internal.util.IgniteUtils.shouldSwitchToRequests
 import static 
org.apache.ignite.internal.util.IgniteUtils.shutdownAndAwaitTermination;
 
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
@@ -58,6 +60,7 @@ import java.util.function.Function;
 import java.util.function.LongSupplier;
 import java.util.function.Supplier;
 import org.apache.ignite.internal.affinity.Assignments;
+import org.apache.ignite.internal.close.ManuallyCloseable;
 import 
org.apache.ignite.internal.cluster.management.ClusterManagementGroupManager;
 import org.apache.ignite.internal.event.AbstractEventProducer;
 import org.apache.ignite.internal.failure.FailureContext;
@@ -115,6 +118,7 @@ import org.apache.ignite.internal.thread.ExecutorChooser;
 import org.apache.ignite.inter

(ignite-3) branch main updated (8c6aa34998 -> 2d353d9316)

2024-08-28 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from 8c6aa34998 IGNITE-20324 Implement integration tests to cover questions 
in CLI (#4285)
 add 2d353d9316 IGNITE-22680 Use matching assignments timestamp in zone 
rebalance listener (#4282)

No new revisions were added by this update.

Summary of changes:
 .../RebalanceRaftGroupEventsListener.java  | 13 +++--
 .../ZoneRebalanceRaftGroupEventsListener.java  | 66 +-
 .../PartitionReplicaLifecycleManager.java  | 27 -
 3 files changed, 48 insertions(+), 58 deletions(-)



(ignite-3) branch main updated: IGNITE-20996 Fixed and enabled ItIgniteNodeRestartTest#testCfgGap and ItRebalanceTest#assignmentsChangingOnNodeLeaveNodeJoin (#4121)

2024-08-05 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 1ce0b24740 IGNITE-20996 Fixed and enabled 
ItIgniteNodeRestartTest#testCfgGap and 
ItRebalanceTest#assignmentsChangingOnNodeLeaveNodeJoin (#4121)
1ce0b24740 is described below

commit 1ce0b247401c5e97e39a9130e4649d0448070701
Author: Denis Chudov 
AuthorDate: Mon Aug 5 10:11:14 2024 +0300

IGNITE-20996 Fixed and enabled ItIgniteNodeRestartTest#testCfgGap and 
ItRebalanceTest#assignmentsChangingOnNodeLeaveNodeJoin (#4121)
---
 .../internal/testframework/IgniteTestUtils.java| 26 
 .../runner/app/ItIgniteNodeRestartTest.java| 78 --
 .../ignite/internal/rebalance/ItRebalanceTest.java | 28 ++--
 .../internal/table/ItTxResourcesVacuumTest.java| 24 ++-
 .../internal/table/RecordBinaryViewImpl.java   | 13 
 5 files changed, 140 insertions(+), 29 deletions(-)

diff --git 
a/modules/core/src/testFixtures/java/org/apache/ignite/internal/testframework/IgniteTestUtils.java
 
b/modules/core/src/testFixtures/java/org/apache/ignite/internal/testframework/IgniteTestUtils.java
index 749f0b170a..ec232cbf4f 100644
--- 
a/modules/core/src/testFixtures/java/org/apache/ignite/internal/testframework/IgniteTestUtils.java
+++ 
b/modules/core/src/testFixtures/java/org/apache/ignite/internal/testframework/IgniteTestUtils.java
@@ -49,6 +49,9 @@ import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.CompletionStage;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CyclicBarrier;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.TimeUnit;
 import java.util.function.BooleanSupplier;
@@ -947,6 +950,29 @@ public final class IgniteTestUtils {
 }
 }
 
+/**
+ * Run the closure in the given executor, wait for the result and get it 
synchronously.
+ *
+ * @param executor Executor.
+ * @param closure Closure.
+ * @return Closure result.
+ */
+public static  T runInExecutor(ExecutorService executor, Supplier 
closure) {
+Object[] arr = new Object[1];
+
+Future f = executor.submit(() -> {
+arr[0] = closure.get();
+});
+
+try {
+f.get();
+} catch (InterruptedException | ExecutionException e) {
+throw new RuntimeException(e);
+}
+
+return (T) arr[0];
+}
+
 /**
  * Predicate matcher.
  *
diff --git 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java
 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java
index 0637c23cc6..159702e537 100644
--- 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java
+++ 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java
@@ -35,6 +35,7 @@ import static 
org.apache.ignite.internal.testframework.IgniteTestUtils.assertThr
 import static 
org.apache.ignite.internal.testframework.IgniteTestUtils.bypassingThreadAssertions;
 import static 
org.apache.ignite.internal.testframework.IgniteTestUtils.bypassingThreadAssertionsAsync;
 import static 
org.apache.ignite.internal.testframework.IgniteTestUtils.runAsync;
+import static 
org.apache.ignite.internal.testframework.IgniteTestUtils.runInExecutor;
 import static 
org.apache.ignite.internal.testframework.IgniteTestUtils.testNodeName;
 import static 
org.apache.ignite.internal.testframework.IgniteTestUtils.waitForCondition;
 import static 
org.apache.ignite.internal.testframework.matchers.CompletableFutureMatcher.willCompleteSuccessfully;
@@ -64,6 +65,8 @@ import java.util.Set;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
@@ -119,6 +122,7 @@ import org.apache.ignite.internal.hlc.ClockService;
 import org.apache.ignite.internal.hlc.ClockServiceImpl;
 import org.apache.ignite.internal.hlc.ClockWaiter;
 import org.apache.ignite.internal.hlc.HybridClockImpl;
+import org.apache.ignite.internal.hlc.HybridTimestamp;
 import org.apache.ignite.internal.index.IndexManager;
 import org.apache.ignite.internal.lang.ByteArray;
 import org.apache.ignite.internal.lang.IgniteInternalException;
@@ -176,8 +180,10 @@ import 
org.apache.ignite.internal.sql.engine.SqlQueryProcessor;
 imp

(ignite-3) branch main updated (9b42e3e815 -> aab9667bda)

2024-06-26 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from 9b42e3e815 IGNITE-22073 Sql. Add processing of the provided query 
timeout (#3953)
 add aab9667bda IGNITE-22589 Fix FailureProcessor initialization (#3994)

No new revisions were added by this update.

Summary of changes:
 modules/failure-handler/build.gradle   |  1 +
 .../ignite/internal/failure/FailureProcessor.java  | 11 ++-
 .../failure/handlers/NoOpFailureHandler.java   |  2 +-
 .../failure/handlers/StopNodeFailureHandler.java   |  2 +-
 .../handlers/StopNodeOrHaltFailureHandler.java |  2 +-
 .../internal/failure/FailureProcessorTest.java | 35 --
 6 files changed, 47 insertions(+), 6 deletions(-)



(ignite-3) branch main updated (1783a4a3de -> de847a9fa2)

2024-06-26 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from 1783a4a3de IGNITE-22541 Fix bool handling in C++ binary_tuple_builder 
(#3984)
 add de847a9fa2 IGNITE-22589 Rename 
StopNodeOrHaltFailureHandlerConfigurationSchema.timeout to timeoutMillis (#3991)

No new revisions were added by this update.

Summary of changes:
 .../internal/failure/handlers/StopNodeOrHaltFailureHandler.java   | 2 +-
 .../StopNodeOrHaltFailureHandlerConfigurationSchema.java  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)



(ignite-3) branch main updated: IGNITE-22269 Introduce new err code NULLABLE_VALUE_ERR (#3983)

2024-06-25 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 c8685ff5b6 IGNITE-22269 Introduce new err code NULLABLE_VALUE_ERR 
(#3983)
c8685ff5b6 is described below

commit c8685ff5b6f5d3043bc09cb45a0de4cb2dcf9c3a
Author: Slava Koptilin 
AuthorDate: Tue Jun 25 18:39:52 2024 +0300

IGNITE-22269 Introduce new err code NULLABLE_VALUE_ERR (#3983)
---
 modules/api/src/main/java/org/apache/ignite/lang/ErrorGroups.java | 8 +++-
 .../java/org/apache/ignite/lang/UnexpectedNullValueException.java | 2 +-
 modules/platforms/cpp/ignite/common/error_codes.h | 3 ++-
 modules/platforms/cpp/ignite/odbc/common_types.cpp| 1 +
 modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs| 5 -
 5 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/modules/api/src/main/java/org/apache/ignite/lang/ErrorGroups.java 
b/modules/api/src/main/java/org/apache/ignite/lang/ErrorGroups.java
index 32cd1c7da7..1c549389c1 100755
--- a/modules/api/src/main/java/org/apache/ignite/lang/ErrorGroups.java
+++ b/modules/api/src/main/java/org/apache/ignite/lang/ErrorGroups.java
@@ -140,7 +140,13 @@ public class ErrorGroups {
 public static final int RESOURCE_CLOSING_ERR = 
COMMON_ERR_GROUP.registerErrorCode((short) 7);
 
 /** Can't marshal/unmarshal a user object. */
-public static final int USER_OBJECT_SERIALIZATION_ERR = 
COMMON_ERR_GROUP.registerErrorCode((short) 9);
+public static final int USER_OBJECT_SERIALIZATION_ERR = 
COMMON_ERR_GROUP.registerErrorCode((short) 8);
+
+/**
+ * This error code indicates that a method can't return a {@code null} 
value due it's ambiguity
+ * (whether the value is absent or is {@code null}).
+ **/
+public static final int NULLABLE_VALUE_ERR = 
COMMON_ERR_GROUP.registerErrorCode((short) 9);
 
 /**
  * This error code represents an internal error caused by faulty logic 
or coding in the Ignite codebase.
diff --git 
a/modules/api/src/main/java/org/apache/ignite/lang/UnexpectedNullValueException.java
 
b/modules/api/src/main/java/org/apache/ignite/lang/UnexpectedNullValueException.java
index 4caf9697b7..611509e777 100644
--- 
a/modules/api/src/main/java/org/apache/ignite/lang/UnexpectedNullValueException.java
+++ 
b/modules/api/src/main/java/org/apache/ignite/lang/UnexpectedNullValueException.java
@@ -31,7 +31,7 @@ public class UnexpectedNullValueException extends 
IgniteException {
  * @param msg Message.
  */
 public UnexpectedNullValueException(String msg) {
-super(Common.INTERNAL_ERR, msg);
+super(Common.NULLABLE_VALUE_ERR, msg);
 }
 
 /**
diff --git a/modules/platforms/cpp/ignite/common/error_codes.h 
b/modules/platforms/cpp/ignite/common/error_codes.h
old mode 100644
new mode 100755
index 535bddbe12..2485639437
--- a/modules/platforms/cpp/ignite/common/error_codes.h
+++ b/modules/platforms/cpp/ignite/common/error_codes.h
@@ -67,7 +67,8 @@ enum class code : underlying_t {
 NODE_LEFT = 0x10005,
 CURSOR_ALREADY_CLOSED = 0x10006,
 RESOURCE_CLOSING = 0x10007,
-USER_OBJECT_SERIALIZATION = 0x10009,
+USER_OBJECT_SERIALIZATION = 0x10008,
+NULLABLE_VALUE = 0x10009,
 INTERNAL = 0x1,
 
 // Table group. Group code: 2
diff --git a/modules/platforms/cpp/ignite/odbc/common_types.cpp 
b/modules/platforms/cpp/ignite/odbc/common_types.cpp
index 07f6d7e954..9df2feaf15 100644
--- a/modules/platforms/cpp/ignite/odbc/common_types.cpp
+++ b/modules/platforms/cpp/ignite/odbc/common_types.cpp
@@ -122,6 +122,7 @@ sql_state error_code_to_sql_state(error::code code) {
 case error::code::SSL_CONFIGURATION:
 case error::code::NODE_LEFT:
 case error::code::INTERNAL:
+case error::code::NULLABLE_VALUE:
 return sql_state::SHY000_GENERAL_ERROR;
 
 // Table group. Group code: 2
diff --git a/modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs 
b/modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs
old mode 100644
new mode 100755
index 88f5352d17..338a2a71ba
--- a/modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs
+++ b/modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs
@@ -84,7 +84,10 @@ namespace Apache.Ignite
 public const int ResourceClosing = (GroupCode << 16) | (7 & 
0x);
 
 ///  UserObjectSerialization error. 
-public const int UserObjectSerialization = (GroupCode << 16) | (9 
& 0x);
+public const int UserObjectSerialization = (GroupCode << 16) | (8 
& 0x);
+
+///  NullableValue error. 
+public const int NullableValue = (GroupCode << 16) | (9 & 0x);
 
 ///  Internal error. 
 public const int Internal = (GroupCode << 16) | (65535 & 0x);



(ignite-3) branch main updated (310ea0585e -> 129d918e9a)

2024-06-10 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from 310ea0585e Bump com.google.guava:guava from 33.2.0-jre to 33.2.1-jre 
(#3889)
 add 129d918e9a IGNITE-20450 Add failure processor and failure handlers 
configuration. (#3862)

No new revisions were added by this update.

Summary of changes:
 .../repl/executor/ItIgnitePicocliCommandsTest.java |  3 +-
 .../apache/ignite/internal/cli/CliVersionInfo.java |  2 +-
 modules/cluster-management/build.gradle|  1 +
 .../internal/cluster/management/MockNode.java  |  3 +-
 modules/failure-handler/build.gradle   |  5 ++
 .../ignite/internal/failure/FailureProcessor.java  | 84 +-
 .../ignite/internal/failure/FailureType.java   | 29 ++--
 .../FailureProcessorConfigurationModule.java}  | 28 
 .../FailureProcessorConfigurationSchema.java}  | 12 ++--
 .../failure/configuration}/package-info.java   |  5 +-
 .../failure/handlers/AbstractFailureHandler.java   |  1 +
 .../internal/failure/handlers/FailureHandler.java  |  7 ++
 .../handlers/StopNodeOrHaltFailureHandler.java | 11 +++
 .../FailureHandlerConfigurationSchema.java}| 28 
 .../configuration/IgnoredFailureTypes.java}|  6 +-
 .../IgnoredFailureTypesValidator.java} | 37 +-
 .../NoOpFailureHandlerConfigurationSchema.java}| 12 ++--
 ...StopNodeFailureHandlerConfigurationSchema.java} | 12 ++--
 ...deOrHaltFailureHandlerConfigurationSchema.java} | 32 +
 .../handlers/configuration}/package-info.java  |  5 +-
 .../internal/failure/handlers}/package-info.java   |  5 +-
 .../ignite/internal/failure}/package-info.java |  5 +-
 .../ItMetaStorageMultipleNodesAbstractTest.java|  3 +-
 .../metastorage/impl/ItMetaStorageWatchTest.java   |  2 +-
 .../ItDistributedConfigurationPropertiesTest.java  |  3 +-
 .../ItDistributedConfigurationStorageTest.java |  3 +-
 .../runner/app/ItIgniteNodeRestartTest.java|  3 +-
 .../org/apache/ignite/internal/app/IgniteImpl.java |  4 +-
 .../ignite/internal/sql/engine/ItDmlTest.java  |  6 +-
 .../internal/sql/engine/framework/TestNode.java| 12 +++-
 .../rebalance/ItRebalanceDistributedTest.java  |  5 +-
 31 files changed, 245 insertions(+), 129 deletions(-)
 copy 
modules/{schema/src/main/java/org/apache/ignite/internal/schema/configuration/SchemaDistributedConfigurationModule.java
 => 
failure-handler/src/main/java/org/apache/ignite/internal/failure/configuration/FailureProcessorConfigurationModule.java}
 (60%)
 mode change 100644 => 100755
 copy 
modules/{configuration/src/test/java/org/apache/ignite/internal/configuration/sample/LocalConfigurationSchema.java
 => 
failure-handler/src/main/java/org/apache/ignite/internal/failure/configuration/FailureProcessorConfigurationSchema.java}
 (72%)
 mode change 100644 => 100755
 copy modules/{api/src/main/java/org/apache/ignite/lang => 
failure-handler/src/main/java/org/apache/ignite/internal/failure/configuration}/package-info.java
 (88%)
 mode change 100644 => 100755
 copy 
modules/{eventlog/src/main/java/org/apache/ignite/internal/eventlog/config/schema/SinkConfigurationSchema.java
 => 
failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/configuration/FailureHandlerConfigurationSchema.java}
 (61%)
 mode change 100644 => 100755
 copy 
modules/{network/src/main/java/org/apache/ignite/internal/network/configuration/SslConfigurationValidator.java
 => 
failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/configuration/IgnoredFailureTypes.java}
 (86%)
 mode change 100644 => 100755
 copy 
modules/{eventlog/src/main/java/org/apache/ignite/internal/eventlog/config/schema/EventTypeValidatorImpl.java
 => 
failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/configuration/IgnoredFailureTypesValidator.java}
 (52%)
 mode change 100644 => 100755
 copy 
modules/{configuration-annotation-processor/src/integrationTest/resources/org/apache/ignite/internal/configuration/processor/polymorphic/ErrorPolymorphic3ConfigurationSchema.java
 => 
failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/configuration/NoOpFailureHandlerConfigurationSchema.java}
 (68%)
 mode change 100644 => 100755
 copy 
modules/{configuration-annotation-processor/src/integrationTest/resources/org/apache/ignite/internal/configuration/processor/polymorphic/ErrorPolymorphic3ConfigurationSchema.java
 => 
failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/configuration/StopNodeFailureHandlerConfigurationSchema.java}
 (67%)
 mode change 100644 => 100755
 copy 
modules/{storage-rocksdb/src/main/java/org/apache/ignite/internal/storage/rocksdb/configuration/schema/RocksDbProfileConfigurationSchema.java
 => 
failure-handler/src/main/java/org/ap

(ignite-3) branch main updated: IGNITE-22355 TableManagerTest's static mocks from #mockManagersAndCreateTableWithDelay don't work properly (#3843)

2024-06-03 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 7152f2c7ac IGNITE-22355 TableManagerTest's static mocks from 
#mockManagersAndCreateTableWithDelay don't work properly (#3843)
7152f2c7ac is described below

commit 7152f2c7ac2cf4aa945a3fc0bc6f3e5a619ea9c1
Author: Mikhail Efremov 
AuthorDate: Mon Jun 3 14:58:56 2024 +0600

IGNITE-22355 TableManagerTest's static mocks from 
#mockManagersAndCreateTableWithDelay don't work properly (#3843)
---
 .../internal/table/distributed/TableManagerTest.java | 20 +++-
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git 
a/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/TableManagerTest.java
 
b/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/TableManagerTest.java
index a99730b527..dcfad44ebc 100644
--- 
a/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/TableManagerTest.java
+++ 
b/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/TableManagerTest.java
@@ -57,10 +57,9 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import java.nio.file.Path;
-import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
+import java.util.Set;
 import java.util.UUID;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ExecutorService;
@@ -73,7 +72,6 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.function.Consumer;
 import java.util.function.LongFunction;
-import org.apache.ignite.internal.affinity.AffinityUtils;
 import org.apache.ignite.internal.affinity.Assignment;
 import org.apache.ignite.internal.affinity.Assignments;
 import org.apache.ignite.internal.catalog.CatalogManager;
@@ -155,6 +153,7 @@ import org.mockito.junit.jupiter.MockitoSettings;
 import org.mockito.quality.Strictness;
 
 /** Tests scenarios for table manager. */
+// TODO: test demands for reworking 
https://issues.apache.org/jira/browse/IGNITE-22388
 @ExtendWith({MockitoExtension.class, ConfigurationExtension.class})
 @MockitoSettings(strictness = Strictness.LENIENT)
 public class TableManagerTest extends IgniteAbstractTest {
@@ -180,6 +179,7 @@ public class TableManagerTest extends IgniteAbstractTest {
 private static final String ZONE_NAME = "zone1";
 
 /** Topology service. */
+// TODO: useless field for now 
https://issues.apache.org/jira/browse/IGNITE-22388
 @Mock
 private TopologyService ts;
 
@@ -724,27 +724,21 @@ public class TableManagerTest extends IgniteAbstractTest {
 return completedFuture(raftGrpSrvcMock);
 });
 
+// TODO: useless code 
https://issues.apache.org/jira/browse/IGNITE-22388
 when(ts.getByConsistentId(any())).thenReturn(new ClusterNodeImpl(
 UUID.randomUUID().toString(),
 consistentId,
 new NetworkAddress("localhost", 47500)
 ));
 
+// TODO: should be removed or reworked 
https://issues.apache.org/jira/browse/IGNITE-22388
 try (MockedStatic schemaServiceMock = 
mockStatic(SchemaUtils.class)) {
 schemaServiceMock.when(() -> 
SchemaUtils.prepareSchemaDescriptor(any()))
 .thenReturn(mock(SchemaDescriptor.class));
 }
 
-try (MockedStatic affinityServiceMock = 
mockStatic(AffinityUtils.class)) {
-ArrayList> assignment = new 
ArrayList<>(PARTITIONS);
-
-for (int part = 0; part < PARTITIONS; part++) {
-assignment.add(new ArrayList<>(Collections.singleton(node)));
-}
-
-affinityServiceMock.when(() -> 
AffinityUtils.calculateAssignments(any(), anyInt(), anyInt()))
-.thenReturn(assignment);
-}
+when(distributionZoneManager.dataNodes(anyLong(), anyInt(), anyInt()))
+.thenReturn(completedFuture(Set.of(NODE_NAME)));
 
 TableManager tableManager = createTableManager(tblManagerFut);
 



(ignite-3) branch main updated: IGNITE-22147 Disabled ItTxResourcesVacuumTest.testRecoveryAfterPersistentStateVacuumized (#3686)

2024-04-30 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 193173cc92 IGNITE-22147 Disabled 
ItTxResourcesVacuumTest.testRecoveryAfterPersistentStateVacuumized (#3686)
193173cc92 is described below

commit 193173cc9282b7b1fb4ace3fc8d5505818be5694
Author: Denis Chudov 
AuthorDate: Tue Apr 30 12:12:50 2024 +0300

IGNITE-22147 Disabled 
ItTxResourcesVacuumTest.testRecoveryAfterPersistentStateVacuumized (#3686)
---
 .../java/org/apache/ignite/internal/table/ItTxResourcesVacuumTest.java  | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItTxResourcesVacuumTest.java
 
b/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItTxResourcesVacuumTest.java
index eb02e0ead2..ccb91a867b 100644
--- 
a/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItTxResourcesVacuumTest.java
+++ 
b/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItTxResourcesVacuumTest.java
@@ -75,6 +75,7 @@ import org.apache.ignite.tx.TransactionOptions;
 import org.jetbrains.annotations.Nullable;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.TestInfo;
 import org.junit.jupiter.api.extension.ExtendWith;
@@ -644,6 +645,7 @@ public class ItTxResourcesVacuumTest extends 
ClusterPerTestIntegrationTest {
  * 
  */
 @Test
+@Disabled("IGNITE-22147")
 public void testRecoveryAfterPersistentStateVacuumized() throws 
InterruptedException {
 // This node isn't going to be stopped, so let it be node 0.
 IgniteImpl commitPartitionLeaseholder = cluster.node(0);



(ignite) branch master updated: IGNITE-21994 Fix broken link (#11315)

2024-04-16 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 2083812b275 IGNITE-21994 Fix broken link (#11315)
2083812b275 is described below

commit 2083812b275d11f28b2eafb4f4cadc892959cf54
Author: AlexLev-Tor <118201124+alexlev-...@users.noreply.github.com>
AuthorDate: Tue Apr 16 07:54:48 2024 -0400

IGNITE-21994 Fix broken link (#11315)
---
 docs/_docs/data-rebalancing.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/_docs/data-rebalancing.adoc b/docs/_docs/data-rebalancing.adoc
index 49dffda35c7..bcf16ed4749 100644
--- a/docs/_docs/data-rebalancing.adoc
+++ b/docs/_docs/data-rebalancing.adoc
@@ -154,4 +154,4 @@ The following table lists the properties of 
`IgniteConfiguration` related to reb
 
 == Monitoring Rebalancing Process
 
-You can monitor the 
link:monitoring-metrics/metrics#monitoring-rebalancing[rebalancing process for 
specific caches using JMX].
+You can monitor the 
link:monitoring-metrics/metrics/new-metrics#caches[rebalancing process for 
specific caches using JMX].



(ignite-3) branch main updated (3cb914dd7a -> 4ebefb3f6f)

2024-04-08 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from 3cb914dd7a IGNITE-21580 Sql. Optimise query plans when using two phase 
aggregates (#3552)
 add 4ebefb3f6f IGNITE-21307 Add using a failure handler during watch 
processing (#3553)

No new revisions were added by this update.

Summary of changes:
 modules/code-deployment/build.gradle   |  1 +
 .../metastore/DeploymentUnitStoreImplTest.java |  3 +-
 modules/failure-handler/build.gradle   |  3 ++
 .../internal/failure/NoOpFailureProcessor.java}| 24 +++-
 modules/metastorage/build.gradle   |  5 
 .../impl/ItMetaStorageManagerImplTest.java |  6 +++-
 .../ItMetaStorageMultipleNodesRocksDbTest.java |  3 +-
 ...tMetaStorageSafeTimePropagationRocksDbTest.java |  3 +-
 .../impl/ItMetaStorageServicePersistenceTest.java  |  3 +-
 .../metastorage/impl/ItMetaStorageWatchTest.java   |  3 +-
 .../metastorage/server/WatchProcessor.java | 32 +-
 .../server/persistence/RocksDbKeyValueStorage.java |  5 ++--
 .../impl/MetaStorageRocksDbRangeTest.java  |  3 +-
 .../RocksDbCompactionKeyValueStorageTest.java  |  3 +-
 .../server/RocksDbKeyValueStorageTest.java |  3 +-
 .../metastorage/server/WatchProcessorTest.java |  6 +++-
 .../server/SimpleInMemoryKeyValueStorage.java  |  3 +-
 .../server/TestRocksDbKeyValueStorage.java |  3 +-
 modules/runner/build.gradle|  1 +
 .../runner/app/ItIgniteNodeRestartTest.java|  3 +-
 .../org/apache/ignite/internal/app/IgniteImpl.java |  2 +-
 modules/table/build.gradle |  1 +
 .../rebalance/ItRebalanceDistributedTest.java  |  3 +-
 23 files changed, 91 insertions(+), 31 deletions(-)
 copy 
modules/{metastorage/src/main/java/org/apache/ignite/internal/metastorage/command/RemoveCommand.java
 => 
failure-handler/src/testFixtures/java/org/apache/ignite/internal/failure/NoOpFailureProcessor.java}
 (60%)
 mode change 100644 => 100755



(ignite-3) branch main updated (e896751ac6 -> 167f8dce56)

2024-04-02 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from e896751ac6 IGNITE-21890 Fix BinaryTupleComparator for decimal values 
(#3527)
 add 167f8dce56 IGNITE-21808 CREATE ZONE syntax must work with any the case 
of zone name (#3508)

No new revisions were added by this update.

Summary of changes:
 .../internal/ClusterPerClassIntegrationTest.java   | 15 
 .../internal/sql/engine/ItCreateTableDdlTest.java  | 33 +
 .../src/main/codegen/includes/parserImpls.ftl  |  6 +-
 .../prepare/ddl/DdlSqlToCommandConverter.java  | 80 +++---
 .../prepare/ddl/DdlSqlToCommandConverterTest.java  | 32 +
 .../internal/sql/engine/sql/SqlDdlParserTest.java  | 37 +-
 6 files changed, 177 insertions(+), 26 deletions(-)



(ignite-3) branch main updated (ca84c43a85 -> c2a8e2398d)

2024-02-22 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from ca84c43a85 IGNITE-21590 Remove MvTableStorage#stop method (#3260)
 add c2a8e2398d IGNITE-21460 Add an ability to specify ignored failure 
types (#3248)

No new revisions were added by this update.

Summary of changes:
 .../ignite/internal/failure/FailureProcessor.java  | 26 +++-
 .../failure/handlers/AbstractFailureHandler.java   | 74 ++
 .../failure/handlers/NoOpFailureHandler.java   |  4 +-
 .../failure/handlers/StopNodeFailureHandler.java   |  4 +-
 .../handlers/StopNodeOrHaltFailureHandler.java |  4 +-
 .../internal/failure/FailureProcessorTest.java | 25 +++-
 6 files changed, 126 insertions(+), 11 deletions(-)
 create mode 100755 
modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/AbstractFailureHandler.java



(ignite-3) branch main updated (1d3c701e7a -> 92352f62b6)

2024-02-20 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from 1d3c701e7a IGNITE-21271 ODBC: Fix transaction_test flakiness (#3237)
 add 92352f62b6 IGNITE-21554 Encapsulate raft-related code of InternalTable 
(#3227)

No new revisions were added by this update.

Summary of changes:
 .../ignite/client/fakes/FakeInternalTable.java |   8 +-
 .../ignite/internal/index/ItBuildIndexTest.java|   4 +-
 .../ItPrimaryReplicaChoiceTest.java|   4 +-
 .../app/ItIgniteInMemoryNodeRestartTest.java   |   4 +-
 .../ItRaftCommandLeftInLogUntilRestartTest.java|   6 +-
 .../apache/ignite/internal/table/NodeUtils.java|   2 +-
 .../exec/rel/TableScanNodeExecutionTest.java   |  10 +-
 .../ItInternalTableReadWriteScanTest.java  |   4 +-
 .../rebalance/ItRebalanceDistributedTest.java  |  10 +-
 .../ignite/internal/table/ItColocationTest.java|   5 +-
 .../ignite/internal/table/InternalTable.java   |  25 +--
 .../apache/ignite/internal/table/TableImpl.java|   2 +-
 .../ignite/internal/table/TableRaftService.java|  52 +++
 .../internal/table/distributed/TableManager.java   |  21 ++-
 .../distributed/storage/InternalTableImpl.java | 130 +++-
 .../distributed/storage/TableRaftServiceImpl.java  | 167 +
 .../distributed/storage/InternalTableImplTest.java |   8 +-
 .../apache/ignite/distributed/ItTxTestCluster.java |   5 +-
 .../ignite/internal/table/TxAbstractTest.java  |   2 +-
 .../table/impl/DummyInternalTableImpl.java |  14 +-
 20 files changed, 318 insertions(+), 165 deletions(-)
 create mode 100644 
modules/table/src/main/java/org/apache/ignite/internal/table/TableRaftService.java
 create mode 100644 
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/storage/TableRaftServiceImpl.java



(ignite-3) branch ignite-20368 deleted (was c0c64276e0)

2024-02-15 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


 was c0c64276e0 IGNITE-20448 StopNodeFailureHandler and 
StopNodeOrHaltFailureHandler were implemented. (#2646)

This change permanently discards the following revisions:

 discard c0c64276e0 IGNITE-20448 StopNodeFailureHandler and 
StopNodeOrHaltFailureHandler were implemented. (#2646)
 discard a34aa22bfb IGNITE-20447 Introduce Failure handling component (#2629)



(ignite-3) branch main updated (6729811f99 -> 53eff5b338)

2024-02-07 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from 6729811f99 IGNITE-21479 Fix race with setting priority in 
PriorityQueueExecutorTest (#3176)
 add 53eff5b338 IGNITE-20452 Integrate failure handler processor into 
Ignite components (#3090)

No new revisions were added by this update.

Summary of changes:
 .../java/org/apache/ignite/lang/ErrorGroups.java   |  13 +++
 modules/distribution-zones/build.gradle|   1 +
 ...niteDistributionZoneManagerNodeRestartTest.java |   4 +-
 .../build.gradle   |  25 ++--
 .../failure/handlers/FailureHandlerTest.java   |  72 
 .../ignite/internal/failure/FailureContext.java}   |  57 -
 .../ignite/internal/failure/FailureProcessor.java  | 128 +
 .../ignite/internal/failure/FailureType.java}  |  24 ++--
 .../internal/failure/handlers/FailureHandler.java} |  24 ++--
 .../failure/handlers/NoOpFailureHandler.java}  |  18 +--
 .../failure/handlers/StopNodeFailureHandler.java}  |  33 +++---
 .../handlers/StopNodeOrHaltFailureHandler.java | 117 +++
 .../internal/failure/FailureProcessorTest.java}|  43 +++
 modules/network/build.gradle   |   3 +
 .../network/netty/ItConnectionManagerTest.java |   4 +-
 .../internal/network/netty/ConnectionManager.java  |  20 +++-
 .../internal/network/recovery/FailureHandler.java  |  33 --
 .../recovery/RecoveryClientHandshakeManager.java   |  16 ++-
 .../recovery/RecoveryServerHandshakeManager.java   |  17 ++-
 .../scalecube/ScaleCubeClusterServiceFactory.java  |   8 +-
 .../network/DefaultMessagingServiceTest.java   |  18 ++-
 .../network/netty/RecoveryHandshakeTest.java   |  11 +-
 .../RecoveryClientHandshakeManagerTest.java|   7 +-
 .../RecoveryServerHandshakeManagerTest.java|   7 +-
 .../network/utils/ClusterServiceTestUtils.java |   5 +-
 modules/page-memory/build.gradle   |   3 +
 .../persistence/checkpoint/CheckpointManager.java  |  10 +-
 .../CheckpointReadLockTimeoutException.java|   9 +-
 .../checkpoint/CheckpointTimeoutLock.java  |  27 +++--
 .../persistence/checkpoint/Checkpointer.java   |  20 +++-
 .../persistence/compaction/Compactor.java  |  13 ++-
 .../persistence/store/FilePageStoreManager.java|  17 ++-
 .../PersistentPageMemoryNoLoadTest.java|  10 +-
 .../checkpoint/CheckpointManagerTest.java  |   3 +
 .../checkpoint/CheckpointTimeoutLockTest.java  |  95 ---
 .../persistence/checkpoint/CheckpointerTest.java   |   9 ++
 .../persistence/compaction/CompactorTest.java  |  55 -
 .../store/FilePageStoreManagerTest.java|   8 +-
 .../checkpoint/CheckpointTestUtils.java|   4 +-
 modules/platforms/cpp/ignite/common/error_codes.h  |   9 +-
 modules/platforms/cpp/ignite/odbc/common_types.cpp |   5 +
 .../platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs |  17 +++
 modules/raft/build.gradle  |   1 +
 .../raft/ItTruncateSuffixAndRestartTest.java   |   6 +-
 modules/runner/build.gradle|   2 +
 .../runner/app/ItIgniteNodeRestartTest.java|  15 ++-
 .../org/apache/ignite/internal/app/IgniteImpl.java |  20 +++-
 modules/storage-api/build.gradle   |   2 +
 .../ignite/internal/storage/DataStorageModule.java |   5 +-
 .../internal/storage/DataStorageModules.java   |   7 +-
 .../internal/storage/DataStorageManagerTest.java   |  15 ++-
 .../internal/storage/DataStorageModulesTest.java   |   6 +-
 .../storage/impl/TestDataStorageModule.java|   4 +-
 modules/storage-page-memory/build.gradle   |   1 +
 .../PersistentPageMemoryDataStorageModule.java |  12 +-
 .../PersistentPageMemoryStorageEngine.java |  12 +-
 .../VolatilePageMemoryDataStorageModule.java   |   4 +-
 .../PersistentPageMemoryMvTableStorageTest.java|   4 +-
 .../PersistentPageMemoryStorageEngineTest.java |   6 +-
 .../PersistentPageMemoryHashIndexStorageTest.java  |   4 +-
 ...PersistentPageMemorySortedIndexStorageTest.java |  10 +-
 ...ageMemoryMvPartitionStorageConcurrencyTest.java |   3 +-
 ...rsistentPageMemoryMvPartitionStorageGcTest.java |   3 +-
 ...PersistentPageMemoryMvPartitionStorageTest.java |   3 +-
 modules/storage-rocksdb/build.gradle   |   1 +
 .../storage/rocksdb/RocksDbDataStorageModule.java  |   4 +-
 modules/table/build.gradle |   3 +
 .../rebalance/ItRebalanceDistributedTest.java  |  13 ++-
 .../internal/table/distributed/LowWatermark.java   |  14 ++-
 .../internal/table/distributed/TableManager.java   |   7 +-
 .../table/distributed/LowWatermarkTest.java|   3 +-
 .../table/distributed/TableManagerTest.java|   6 +-
 .../PersistentPageMemoryGcUpdateHandlerTest.java   |   4

(ignite) branch master updated: IGNITE-21212 Removed cacheName parameter from rest api (#11183)

2024-01-26 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 6fa698fed87 IGNITE-21212 Removed cacheName parameter from rest api 
(#11183)
6fa698fed87 is described below

commit 6fa698fed87405ae14f39373e9340df3aee4f838
Author: IgGusev 
AuthorDate: Fri Jan 26 13:20:58 2024 +0400

IGNITE-21212 Removed cacheName parameter from rest api (#11183)
---
 docs/_docs/restapi.adoc | 15 ++-
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/docs/_docs/restapi.adoc b/docs/_docs/restapi.adoc
index 83270dafca5..4db745b6eae 100644
--- a/docs/_docs/restapi.adoc
+++ b/docs/_docs/restapi.adoc
@@ -494,7 +494,7 @@ Adds and gets current value of given atomic long.
 +
 [source,shell]
 
-http://host:port/ignite?cmd=incr&cacheName={cacheName}&key={incrKey}&init={initialValue}&delta={delta}
+http://host:port/ignite?cmd=incr&key={incrKey}&init={initialValue}&delta={delta}
 
 +
 [{request_table_props}]
@@ -506,12 +506,6 @@ 
http://host:port/ignite?cmd=incr&cacheName={cacheName}&key={incrKey}&init={initi
 |Example
 
 
-|`cacheName`
-| string
-| Yes
-| Cache name. If not provided, default cache is used.
-| partitionedCache
-
 |`key`
 | string
 |
@@ -553,7 +547,7 @@ Subtracts and gets current value of given atomic long.
 +
 [source,shell]
 
-http://host:port/ignite?cmd=decr&cacheName={cacheName}&key={key}&init={init_value}&delta={delta}
+http://host:port/ignite?cmd=decr&key={key}&init={init_value}&delta={delta}
 
 +
 [{request_table_props}]
@@ -564,11 +558,6 @@ 
http://host:port/ignite?cmd=decr&cacheName={cacheName}&key={key}&init={init_valu
 |Description
 |Example
 
-|`cacheName`
-| string
-|Yes
-|Cache name. If not provided, the default cache ("default") is used.
-|partitionedCache
 
 |`key`
 |string



(ignite) branch master updated: IGNITE-21280 Reserved new WAL record type (#11194)

2024-01-24 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 e4993b8a013 IGNITE-21280 Reserved new WAL record type (#11194)
e4993b8a013 is described below

commit e4993b8a0131ecfacbf4e29675a23913318307d8
Author: Slava Koptilin 
AuthorDate: Thu Jan 25 09:12:53 2024 +0200

IGNITE-21280 Reserved new WAL record type (#11194)
---
 .../org/apache/ignite/internal/pagemem/wal/record/WALRecord.java | 5 -
 .../java/org/apache/ignite/testframework/wal/record/RecordUtils.java | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/WALRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/WALRecord.java
index ebaa7262214..2a38b2e9e8a 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/WALRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/WALRecord.java
@@ -297,7 +297,10 @@ public abstract class WALRecord {
 CDC_MANAGER_RECORD(79, CUSTOM),
 
 /** CDC manager record. */
-CDC_MANAGER_STOP_RECORD(80, CUSTOM);
+CDC_MANAGER_STOP_RECORD(80, CUSTOM),
+
+/** Physical WAL record that represents a fragment of an entry update. 
(Placeholder) */
+DATA_PAGE_FRAGMENTED_UPDATE_RECORD(81, PHYSICAL);
 
 /** Index for serialization. Should be consistent throughout all 
versions. */
 private final int idx;
diff --git 
a/modules/core/src/test/java/org/apache/ignite/testframework/wal/record/RecordUtils.java
 
b/modules/core/src/test/java/org/apache/ignite/testframework/wal/record/RecordUtils.java
index c228cb33952..00c88ebc06f 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/testframework/wal/record/RecordUtils.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/testframework/wal/record/RecordUtils.java
@@ -121,6 +121,7 @@ import static 
org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType
 import static 
org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType.CHECKPOINT_RECORD;
 import static 
org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType.CLUSTER_SNAPSHOT;
 import static 
org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType.CONSISTENT_CUT;
+import static 
org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType.DATA_PAGE_FRAGMENTED_UPDATE_RECORD;
 import static 
org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType.DATA_PAGE_INSERT_FRAGMENT_RECORD;
 import static 
org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType.DATA_PAGE_INSERT_RECORD;
 import static 
org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType.DATA_PAGE_REMOVE_RECORD;
@@ -274,7 +275,7 @@ public class RecordUtils {
 put(INCREMENTAL_SNAPSHOT_FINISH_RECORD, 
RecordUtils::buildIncrementalSnapshotFinishRecord);
 put(CDC_MANAGER_RECORD, RecordUtils::buildCdcManagerStopRecord);
 put(CDC_MANAGER_STOP_RECORD, RecordUtils::buildCdcManagerStopRecord);
-
+put(DATA_PAGE_FRAGMENTED_UPDATE_RECORD, 
buildUpsupportedWalRecord(DATA_PAGE_FRAGMENTED_UPDATE_RECORD));
 }
 
 /** */



(ignite-3) 01/02: IGNITE-20447 Introduce Failure handling component (#2629)

2024-01-24 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 pushed a commit to branch ignite-20368
in repository https://gitbox.apache.org/repos/asf/ignite-3.git

commit a34aa22bfb965e9aa4e4a610da776744add15944
Author: Sergey Uttsel 
AuthorDate: Fri Sep 29 11:43:48 2023 +0300

IGNITE-20447 Introduce Failure handling component (#2629)
---
 modules/failure-handler/build.gradle   | 33 ++
 .../ignite/internal/failure/FailureContext.java| 66 +++
 .../ignite/internal/failure/FailureHandler.java| 34 ++
 .../ignite/internal/failure/FailureProcessor.java  | 75 ++
 .../ignite/internal/failure/FailureType.java   | 35 ++
 .../internal/failure/FailureProcessorTest.java | 43 +
 settings.gradle|  2 +
 7 files changed, 288 insertions(+)

diff --git a/modules/failure-handler/build.gradle 
b/modules/failure-handler/build.gradle
new file mode 100644
index 00..b6d8be625a
--- /dev/null
+++ b/modules/failure-handler/build.gradle
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+apply from: "$rootDir/buildscripts/java-core.gradle"
+apply from: "$rootDir/buildscripts/publishing.gradle"
+apply from: "$rootDir/buildscripts/java-junit5.gradle"
+apply from: "$rootDir/buildscripts/java-integration-test.gradle"
+apply from: "$rootDir/buildscripts/java-test-fixtures.gradle"
+
+dependencies {
+implementation project(':ignite-core')
+
+testImplementation libs.mockito.core
+testImplementation libs.mockito.junit
+
+testImplementation(testFixtures(project(':ignite-core')))
+}
+
+description = 'ignite-failure-handler'
diff --git 
a/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureContext.java
 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureContext.java
new file mode 100644
index 00..1100a6c216
--- /dev/null
+++ 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureContext.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.failure;
+
+import org.apache.ignite.internal.tostring.S;
+
+/**
+ * Failure context contains information about failure type and exception if 
applicable.
+ * This information could be used for appropriate handling of the failure.
+ */
+public class FailureContext {
+/** Type. */
+private final FailureType type;
+
+/** Error. */
+private final Throwable err;
+
+/**
+ * Creates instance of {@link FailureContext}.
+ *
+ * @param type Failure type.
+ * @param err Exception.
+ */
+public FailureContext(FailureType type, Throwable err) {
+this.type = type;
+this.err = err;
+}
+
+/**
+ * Gets the failure type.
+ *
+ * @return Failure type.
+ */
+public FailureType type() {
+return type;
+}
+
+/**
+ * Gets the exception.
+ *
+ * @return Exception or {@code null}.
+ */
+public Throwable error() {
+return err;
+}
+
+/** {@inheritDoc} */
+@Override public String toString() {
+return S.toString(FailureContext.class, this);
+}
+}
diff --git 
a/modules/failure-handler/src/main/java/org/apache/

(ignite-3) branch ignite-20368 updated (3012c9f0c6 -> c0c64276e0)

2024-01-24 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


 discard 3012c9f0c6 IGNITE-20448 StopNodeFailureHandler and 
StopNodeOrHaltFailureHandler were implemented. (#2646)
 discard 0224c294e6 IGNITE-20447 Introduce Failure handling component (#2629)
 add 8d3b926e0b IGNITE-21206 Lease grant messages should be retried after 
the failure of the placement driver active actor (#3016)
 add 57da4e559c IGNITE-21209 Do not try handle PrimaryReplicaMissException 
on transaction operation (#3017)
 add 0cb50387a9 IGNITE-20653 SQL script execution for C++ Client (#3018)
 add d357196a4c IGNITE-20995 Add more integration tests for tx recovery on 
unstable topology (#2995)
 add 461b637faa IGNITE-21214 Add Catalog API to get a schema by ID (#3023)
 add 4c26ef52a6 IGNITE-21018 Sql. Introduce cache for plan mapping (#2982)
 add 09116a30f7 IGNITE-21205 Get rid of metastorage in schema manager 
(#3013)
 add cdb906c550 IGNITE-20795: Sql. QuerySplitter does not visit 
IgniteTableFunctionScan nodes
 add 50ad9453c8 IGNITE-20905 Make it possible to add an explicitly NULL 
column via ADD COLUMN
 add f4fef42899 IGNITE-20885 Sql. Bump calcite version to 1.36 (#3014)
 add be6d294a60 IGNITE-16947 Resolve message send future when message is 
acknowledged (#3009)
 add f812debe86 IGNITE-21203 Sql. Fix flaky 
ItSqlAsynchronousApiTest.closeSession
 add 2142bcdcb4 IGNITE-20850 Add compute job failover  (#2990)
 add 07e8a6b384 IGNITE-19944 ODBC 3.0: Propagate SQL errors from engine to 
driver (#3022)
 add 1263f6b92e IGNITE-20879 Additional criterions for queries (#2933)
 add 6e5d3977be IGNITE-21233 Fix missing error codes (#3032)
 add 54568701e8 IGNITE-20477 Introduce async components start (#2997)
 add 642918794c IGNITE-21215 Add Catalog API for renaming a table (#3029)
 add 8f652e9624 IGNITE-21241 Compilation fails on Windows (#3039)
 add d811afde3b IGNITE-21157 Introduce transaction priorities (#3015)
 add 9cd0e5017f IGNITE-21070 Ensure that data node's primary replica 
expiration properly handled (#3027)
 add 7506065274 IGNITE-21055: Sql. ParserService should use 
SqlNode::unparse instead of SqlNode::toString (#3021)
 add b156fe96df IGNITE-20381 Prevent modification operations call after 
CatalogManagerImpl is closed (#3040)
 add 4fa174c269 IGNITE-21160 Fix error code on missing table in 
ClientPrimaryReplicaTracker (#3047)
 add c40b788b50 IGNITE-21245 Remove APPLIED_REV_KEY from metastorage 
manager (#3042)
 add 5ec189439b IGNITE-20827 Sql. Remove nullBound placeholder
 add e6e77836f6 IGNITE-17615 Close local cursors on primary replica 
expiration (#3001)
 add 46d64abd5e IGNITE-21226 NPE throws from MessageServiceImpl if service 
already stopped but incoming message still processed (#3026)
 add 1955452453 IGNITE-21061 Remove MarkLocksReleased command (#3048)
 add a9d4ae29e6 IGNITE-21166 Sql. Provide internal API to get a columns 
metadata for non-executed query (#3037)
 add ca21384f85 IGNITE-21234 Introduce a more flexible way of triggering 
"too many dirty pages" checkpoints (#3033)
 add b768928fed IGNITE-21202 Un-deprecate 
PrimaryReplicaEventParameters.leaseholder (#3053)
 add 9e915116f2 IGNITE-21262 Sql. Push down predicate under correlate
 add 3bfa91b863 IGNITE-20681 Remove limit on write intent switch attempts 
(#3052)
 add 560c6da4af IGNITE-21282 Fix flaky 
ItComputeTestEmbedded#cancelsJobLocally (#3060)
 add 041c6cd395 IGNITE-21134 Sql. Support NULL column type in jdbc (#3034)
 add 151585bdc2 IGNITE-20977 Basic criteria queries for keyValue view 
(#2934)
 add d9795df4b4 IGNITE-21231 Delegate to parent lock manager in release and 
iterator (#3059)
 add e9f51a3343 IGNITE-21273 Document newly-added thread pools in README 
files (#3055)
 add facb0f6b63 IGNITE-21066 Create job priority change API (#3019)
 add 74d5bc69cb IGNITE-21028 .NET: Fix pooled buffer leaks (#3063)
 add 4c7cf15e52 IGNITE-21071 Rollback the transaction on primary failure if 
replication is not finished (#3030)
 add f0e23a4b62 IGNITE-21036 introduce zones' system view (#3056)
 add a9ab2acc04 IGNITE-21309 Avoid potential memory leaks in direct message 
writer (#3065)
 add bba00639c6 IGNITE-21173 Repeated call to commit/abort should not emit 
exceptions (#3064)
 add 23a62cf818 IGNITE-20809 Sql. SUBSTRING function need to handle 
different numeric types as a params (#3051)
 add 8860541c01 IGNITE-21148 Java thin: Implement job execution interface 
(#3038)
 add 7f1ff909da IGNITE-21155 Adding a in-flight RW transaction counter by 
catalog version on a node (#3061)
 add 1ee1b28559 IGNITE-20098 Move exception classes related to distribution 
zones to an appropriate package/module (#3054)
 add 0442153b74 IGNITE-21103 Rename DataStreamer

(ignite-3) 02/02: IGNITE-20448 StopNodeFailureHandler and StopNodeOrHaltFailureHandler were implemented. (#2646)

2024-01-24 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 pushed a commit to branch ignite-20368
in repository https://gitbox.apache.org/repos/asf/ignite-3.git

commit c0c64276e03b51298d79b986730223db00252f44
Author: Sergey Uttsel 
AuthorDate: Wed Oct 4 16:53:26 2023 +0300

IGNITE-20448 StopNodeFailureHandler and StopNodeOrHaltFailureHandler were 
implemented. (#2646)
---
 modules/failure-handler/build.gradle   |   1 +
 .../ignite/internal/failure/FailureProcessor.java  |   1 +
 .../failure/{ => handlers}/FailureHandler.java |   5 +-
 .../StopNodeFailureHandler.java}   |  29 ++---
 .../handlers/StopNodeOrHaltFailureHandler.java | 118 +
 .../internal/failure/FailureProcessorTest.java |   1 +
 modules/runner/build.gradle|   1 +
 .../failurehandler/FailureHandlerTest.java |  93 
 8 files changed, 235 insertions(+), 14 deletions(-)

diff --git a/modules/failure-handler/build.gradle 
b/modules/failure-handler/build.gradle
index b6d8be625a..acc2d9b2ca 100644
--- a/modules/failure-handler/build.gradle
+++ b/modules/failure-handler/build.gradle
@@ -23,6 +23,7 @@ apply from: "$rootDir/buildscripts/java-test-fixtures.gradle"
 
 dependencies {
 implementation project(':ignite-core')
+implementation project(':ignite-api')
 
 testImplementation libs.mockito.core
 testImplementation libs.mockito.junit
diff --git 
a/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureProcessor.java
 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureProcessor.java
index 16d4a6d9ad..35a7ce5bd8 100644
--- 
a/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureProcessor.java
+++ 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureProcessor.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.failure;
 
+import org.apache.ignite.internal.failure.handlers.FailureHandler;
 import org.apache.ignite.internal.manager.IgniteComponent;
 
 /**
diff --git 
a/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureHandler.java
 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/FailureHandler.java
similarity index 88%
copy from 
modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureHandler.java
copy to 
modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/FailureHandler.java
index f56aba3130..fab77aad99 100644
--- 
a/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureHandler.java
+++ 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/FailureHandler.java
@@ -15,7 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.ignite.internal.failure;
+package org.apache.ignite.internal.failure.handlers;
+
+import org.apache.ignite.internal.failure.FailureContext;
+import org.apache.ignite.internal.failure.FailureProcessor;
 
 /**
  * Provides facility to handle failures.
diff --git 
a/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureHandler.java
 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/StopNodeFailureHandler.java
similarity index 58%
rename from 
modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureHandler.java
rename to 
modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/StopNodeFailureHandler.java
index f56aba3130..2b8f847d18 100644
--- 
a/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureHandler.java
+++ 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/StopNodeFailureHandler.java
@@ -15,20 +15,23 @@
  * limitations under the License.
  */
 
-package org.apache.ignite.internal.failure;
+package org.apache.ignite.internal.failure.handlers;
+
+import org.apache.ignite.IgnitionManager;
+import org.apache.ignite.internal.failure.FailureContext;
 
 /**
- * Provides facility to handle failures.
+ * Handler will stop node in case of critical error using {@code 
IgnitionManager.stop(nodeName)} call.
  */
-public interface FailureHandler {
-/**
- * Handles failure occurred on {@code ignite} instance.
- * Failure details is contained in {@code failureCtx}.
- * Returns {@code true} if Ignite node must be invalidated by {@link 
FailureProcessor} after calling this method.
- *
- * @param nodeName Node name.
- * @param failureCtx Failure context.
- * @return Whether Ignite node must be invalidated or not.
- */
-boolean onFailure(String nodeName, FailureContext failureCtx);
+public class StopNodeFailureHandler implements FailureHandler {
+/** {@inheritDoc} */
+@Override
+public boolean onFailure(String nodeName, FailureContext 

(ignite-3) branch main updated: IGNITE-20209 Recovery for rebalance triggers (#2919)

2024-01-22 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 f5de973f4b IGNITE-20209 Recovery for rebalance triggers (#2919)
f5de973f4b is described below

commit f5de973f4b9a78f3f30a48f04c33353252544e5e
Author: Kirill Gusakov 
AuthorDate: Mon Jan 22 19:06:28 2024 +0300

IGNITE-20209 Recovery for rebalance triggers (#2919)
---
 .../distributionzones/DistributionZoneManager.java |   2 +-
 .../rebalance/DistributionZoneRebalanceEngine.java |  98 +++--
 .../DistributionZoneRebalanceEngineTest.java   |   2 +
 .../rebalance/ItRebalanceTriggersRecoveryTest.java | 245 +
 .../internal/table/distributed/TableManager.java   |  15 +-
 5 files changed, 334 insertions(+), 28 deletions(-)

diff --git 
a/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
 
b/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
index 1347bb02d2..8ca12f33df 100644
--- 
a/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
+++ 
b/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
@@ -264,7 +264,7 @@ public class DistributionZoneManager implements 
IgniteComponent {
 return allOf(
 createOrRestoreZonesStates(recoveryRevision),
 
restoreLogicalTopologyChangeEventAndStartTimers(recoveryRevision)
-).thenRun(rebalanceEngine::start);
+).thenCompose((notUsed) -> rebalanceEngine.start());
 });
 }
 
diff --git 
a/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/rebalance/DistributionZoneRebalanceEngine.java
 
b/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/rebalance/DistributionZoneRebalanceEngine.java
index 94ea672eac..1a6d958b76 100644
--- 
a/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/rebalance/DistributionZoneRebalanceEngine.java
+++ 
b/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/rebalance/DistributionZoneRebalanceEngine.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.distributionzones.rebalance;
 
 import static java.util.concurrent.CompletableFuture.allOf;
+import static java.util.concurrent.CompletableFuture.completedFuture;
 import static java.util.stream.Collectors.toList;
 import static 
org.apache.ignite.internal.catalog.events.CatalogEvent.ZONE_ALTER;
 import static 
org.apache.ignite.internal.distributionzones.DistributionZonesUtil.extractZoneId;
@@ -32,6 +33,7 @@ import java.util.Set;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.stream.Collectors;
 import org.apache.ignite.internal.catalog.CatalogManager;
 import org.apache.ignite.internal.catalog.CatalogService;
 import org.apache.ignite.internal.catalog.descriptors.CatalogTableDescriptor;
@@ -99,8 +101,8 @@ public class DistributionZoneRebalanceEngine {
 /**
  * Starts the rebalance engine by registering corresponding meta storage 
and configuration listeners.
  */
-public void start() {
-IgniteUtils.inBusyLock(busyLock, () -> {
+public CompletableFuture start() {
+return IgniteUtils.inBusyLockAsync(busyLock, () -> {
 catalogService.listen(ZONE_ALTER, new 
CatalogAlterZoneEventListener(catalogService) {
 @Override
 protected CompletableFuture 
onReplicasUpdate(AlterZoneEventParameters parameters, int oldReplicas) {
@@ -110,9 +112,45 @@ public class DistributionZoneRebalanceEngine {
 
 // TODO: IGNITE-18694 - Recovery for the case when zones watch 
listener processed event but assignments were not updated.
 metaStorageManager.registerPrefixWatch(zoneDataNodesKey(), 
dataNodesListener);
+
+CompletableFuture recoveryFinishFuture = 
metaStorageManager.recoveryFinishedFuture();
+
+// At the moment of the start of this manager, it is guaranteed 
that Meta Storage has been recovered.
+assert recoveryFinishFuture.isDone();
+
+long recoveryRevision = recoveryFinishFuture.join();
+
+return rebalanceTriggersRecovery(recoveryRevision);
 });
 }
 
+/**
+ * Run the update of rebalance metastore's state.
+ *
+ * @param recoveryRevision Recovery revision.
+ */
+// TODO: https://issues.apache.org/jira/browse/IGNITE-21058 At the moment 
this method produce many metastore multi-invokes
+// TODO: which can be avoided by the local logic, which mirror

(ignite-3) branch main updated: IGNITE-21036 introduce zones' system view (#3056)

2024-01-18 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 f0e23a4b62 IGNITE-21036 introduce zones' system view (#3056)
f0e23a4b62 is described below

commit f0e23a4b62eb52e16d86c0d7cae44b30470a32d0
Author: Mirza Aliev 
AuthorDate: Thu Jan 18 21:35:43 2024 +0400

IGNITE-21036 introduce zones' system view (#3056)
---
 .../internal/catalog/CatalogManagerImpl.java   |  22 ++-
 .../internal/catalog/commands/CatalogUtils.java|   2 +-
 modules/distribution-zones/README.md   |   7 +
 .../ItDistributionZonesFilterTest.java |  16 +-
 .../internal/sql/engine/ItZonesSystemViewTest.java | 168 +
 5 files changed, 205 insertions(+), 10 deletions(-)

diff --git 
a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogManagerImpl.java
 
b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogManagerImpl.java
index 34f2a86585..f6bcdbc5e5 100644
--- 
a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogManagerImpl.java
+++ 
b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogManagerImpl.java
@@ -33,6 +33,7 @@ import java.util.NavigableMap;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ConcurrentSkipListMap;
 import java.util.concurrent.Flow.Publisher;
+import java.util.function.Function;
 import java.util.function.LongSupplier;
 import org.apache.ignite.internal.catalog.descriptors.CatalogIndexDescriptor;
 import org.apache.ignite.internal.catalog.descriptors.CatalogObjectDescriptor;
@@ -409,7 +410,8 @@ public class CatalogManagerImpl extends 
AbstractEventProducer> systemViews() {
 return List.of(
 createSystemViewsView(),
-createSystemViewColumnsView()
+createSystemViewColumnsView(),
+createSystemViewZonesView()
 );
 }
 
@@ -557,6 +559,24 @@ public class CatalogManagerImpl extends 
AbstractEventProducer createSystemViewZonesView() {
+return SystemViews.clusterViewBuilder()
+.name("ZONES")
+.addColumn("NAME", NativeTypes.STRING, 
CatalogZoneDescriptor::name)
+.addColumn("PARTITIONS", NativeTypes.INT32, 
CatalogZoneDescriptor::partitions)
+.addColumn("REPLICAS", NativeTypes.INT32, 
CatalogZoneDescriptor::replicas)
+.addColumn("DATA_NODES_AUTO_ADJUST_SCALE_UP", 
NativeTypes.INT32, CatalogZoneDescriptor::dataNodesAutoAdjustScaleUp)
+.addColumn("DATA_NODES_AUTO_ADJUST_SCALE_DOWN", 
NativeTypes.INT32, CatalogZoneDescriptor::dataNodesAutoAdjustScaleDown)
+.addColumn("DATA_NODES_FILTER", NativeTypes.STRING, 
CatalogZoneDescriptor::filter)
+.addColumn("IS_DEFAULT_ZONE", NativeTypes.BOOLEAN, 
isDefaultZone())
+.dataProvider(SubscriptionUtils.fromIterable(() -> 
catalog(latestCatalogVersion()).zones().iterator()))
+.build();
+}
+
+private static Function isDefaultZone() {
+return zone -> zone.name().equals(DEFAULT_ZONE_NAME);
+}
+
 /**
  * A container that keeps given descriptor along with name of the schema 
this
  * descriptor belongs to.
diff --git 
a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CatalogUtils.java
 
b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CatalogUtils.java
index 4a63ce972c..45d2e522f0 100644
--- 
a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CatalogUtils.java
+++ 
b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CatalogUtils.java
@@ -59,7 +59,7 @@ public class CatalogUtils {
  * Default filter of distribution zone, which is a {@link 
com.jayway.jsonpath.JsonPath} expression for including all attributes of
  * nodes.
  */
-public static final String DEFAULT_FILTER = "'$..*'";
+public static final String DEFAULT_FILTER = "$..*";
 
 /** Default distribution zone storage engine. */
 // TODO: IGNITE-19719 Should be defined differently
diff --git a/modules/distribution-zones/README.md 
b/modules/distribution-zones/README.md
index a567805b53..310122ea74 100644
--- a/modules/distribution-zones/README.md
+++ b/modules/distribution-zones/README.md
@@ -20,3 +20,10 @@ a zone. After timeout, new data nodes of a zone are 
propagated to the meta stora
 If a new intent is appeared at the moment, when old intent has not been 
started yet, 
 then old intent will be canceled and replaced with a new one.
 
+## Access to the list of zones
+To check the existing list of zones in the cluster, use zones' system view
+
+

(ignite) branch master updated: IGNITE-17780 Updated deployment example to StatefulSet (#11098)

2024-01-11 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 8a32f14e402 IGNITE-17780 Updated deployment example to StatefulSet 
(#11098)
8a32f14e402 is described below

commit 8a32f14e402326ee0a850429d2e79e688639455c
Author: IgGusev 
AuthorDate: Thu Jan 11 18:00:52 2024 +0400

IGNITE-17780 Updated deployment example to StatefulSet (#11098)
---
 .../k8s/stateless/deployment-template.yaml | 80 +++---
 .../kubernetes/generic-configuration.adoc  |  6 +-
 2 files changed, 57 insertions(+), 29 deletions(-)

diff --git a/docs/_docs/code-snippets/k8s/stateless/deployment-template.yaml 
b/docs/_docs/code-snippets/k8s/stateless/deployment-template.yaml
index fe388d8d191..0190060dccc 100644
--- a/docs/_docs/code-snippets/k8s/stateless/deployment-template.yaml
+++ b/docs/_docs/code-snippets/k8s/stateless/deployment-template.yaml
@@ -15,8 +15,8 @@
 
 #tag::config-block[]
 # An example of a Kubernetes configuration for pod deployment.
-apiVersion: apps/v1 
-kind: Deployment
+apiVersion: apps/v1
+kind: StatefulSet
 metadata:
   # Cluster name.
   name: ignite-cluster
@@ -27,34 +27,64 @@ spec:
   selector:
 matchLabels:
   app: ignite
+  serviceName: ignite
   template:
 metadata:
   labels:
-app: ignite 
+app: ignite
 spec:
-  serviceAccountName: ignite 
-  terminationGracePeriodSeconds: 6 
+  serviceAccountName: ignite
+  terminationGracePeriodSeconds: 6
   containers:
 # Custom pod name.
-  - name: ignite-node
-image: apacheignite/ignite:{version}
-env:
-- name: OPTION_LIBS
-  value: ignite-kubernetes,ignite-rest-http
-- name: CONFIG_URI
-  value: file:///ignite/config/node-configuration.xml
-ports:
-# Ports to open.
-- containerPort: 47100 # communication SPI port
-- containerPort: 47500 # discovery SPI port
-- containerPort: 49112 # dafault JMX port
-- containerPort: 10800 # thin clients/JDBC driver port
-- containerPort: 8080 # REST API
-volumeMounts:
-- mountPath: /ignite/config
-  name: config-vol
+- name: ignite-node
+  image: apacheignite/ignite:{version}
+  env:
+- name: OPTION_LIBS
+  value: ignite-kubernetes,ignite-rest-http
+- name: CONFIG_URI
+  value: file:///opt/ignite/config/node-configuration.xml
+- name: JVM_OPTS
+  value: "-DIGNITE_WAIT_FOR_BACKUPS_ON_SHUTDOWN=true"
+  ports:
+# Ports to open.
+- containerPort: 47100 # communication SPI port
+- containerPort: 47500 # discovery SPI port
+- containerPort: 49112 # JMX port
+- containerPort: 10800 # thin clients/JDBC driver port
+- containerPort: 8080 # REST API
+  volumeMounts:
+- mountPath: /opt/ignite/config
+  name: config-vol
+- mountPath: /opt/ignite/work/db/binary_meta
+  name: internal-metadata-vol
+  readinessProbe:
+httpGet:
+  path: /ignite?cmd=probe
+  port: 8080
+initialDelaySeconds: 5
+failureThreshold: 3
+periodSeconds: 10
+timeoutSeconds: 10
+  livenessProbe:
+httpGet:
+  path: /ignite?cmd=version
+  port: 8080
+  initialDelaySeconds: 5
+  failureThreshold: 3
+  periodSeconds: 10
+  timeoutSeconds: 10
   volumes:
-  - name: config-vol
-configMap:
-  name: ignite-config
+- name: config-vol
+  configMap:
+name: ignite-config
+  volumeClaimTemplates:
+- metadata:
+name: internal-metadata-vol
+  spec:
+accessModes: [ "ReadWriteOnce" ]
+resources:
+  requests:
+storage: "1Gi" # make sure to provide enough space for your 
application data
+
 #end::config-block[]
diff --git a/docs/_docs/installation/kubernetes/generic-configuration.adoc 
b/docs/_docs/installation/kubernetes/generic-configuration.adoc
index 4595a83f4e7..09abbfe53c7 100644
--- a/docs/_docs/installation/kubernetes/generic-configuration.adoc
+++ b/docs/_docs/installation/kubernetes/generic-configuration.adoc
@@ -159,9 +159,7 @@ include::{script}[tags=create-configmap]
 
 === Creating Pod Configuration
 
-Now we will create a configuration for pods.
-In the case of stateless deployment, we will use a 
link:https://kubernetes.io/docs/concepts/workloads/controllers/deployment/[Deployment,window=_blank].
-For a stateful deployment, we will use a 
link:https

(ignite-3) branch main updated: IGNITE-21233 Fix missing error codes (#3032)

2024-01-11 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 6e5d3977be IGNITE-21233 Fix missing error codes (#3032)
6e5d3977be is described below

commit 6e5d3977be2bc55941f57b40a0b94fbd7c8c9f4e
Author: Dmitriy Zabotlin 
AuthorDate: Thu Jan 11 10:36:48 2024 +0200

IGNITE-21233 Fix missing error codes (#3032)

Co-authored-by: dzabotlin 
---
 modules/platforms/cpp/ignite/common/error_codes.h  | 3 +++
 modules/platforms/cpp/ignite/odbc/common_types.cpp | 3 +++
 modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs | 9 +
 3 files changed, 15 insertions(+)

diff --git a/modules/platforms/cpp/ignite/common/error_codes.h 
b/modules/platforms/cpp/ignite/common/error_codes.h
index 3122b0af8a..6624b991ac 100644
--- a/modules/platforms/cpp/ignite/common/error_codes.h
+++ b/modules/platforms/cpp/ignite/common/error_codes.h
@@ -155,6 +155,7 @@ enum class code : underlying_t {
 // Network group. Group code: 11
 UNRESOLVABLE_CONSISTENT_ID = 0xb0001,
 PORT_IN_USE = 0xb0002,
+RECIPIENT_LEFT = 0xb0005,
 
 // NodeConfiguration group. Group code: 12
 CONFIG_READ = 0xc0001,
@@ -184,6 +185,8 @@ enum class code : underlying_t {
 COMPUTE_JOB_STATE_TRANSITION = 0x15,
 CANCELLING = 0x16,
 RESULT_NOT_FOUND = 0x17,
+FAIL_TO_GET_JOB_STATUS = 0x18,
+COMPUTE_JOB_FAILED = 0x19,
 
 // Catalog group. Group code: 17
 VALIDATION = 0x110001,
diff --git a/modules/platforms/cpp/ignite/odbc/common_types.cpp 
b/modules/platforms/cpp/ignite/odbc/common_types.cpp
index d91007f132..c3a2a0c6e3 100644
--- a/modules/platforms/cpp/ignite/odbc/common_types.cpp
+++ b/modules/platforms/cpp/ignite/odbc/common_types.cpp
@@ -239,6 +239,7 @@ sql_state error_code_to_sql_state(error::code code) {
 // Network group. Group code: 11
 case error::code::UNRESOLVABLE_CONSISTENT_ID:
 case error::code::PORT_IN_USE:
+case error::code::RECIPIENT_LEFT:
 return sql_state::S08001_CANNOT_CONNECT;
 
 // NodeConfiguration group. Group code: 12
@@ -273,6 +274,8 @@ sql_state error_code_to_sql_state(error::code code) {
 case error::code::COMPUTE_JOB_STATE_TRANSITION:
 case error::code::CANCELLING:
 case error::code::RESULT_NOT_FOUND:
+case error::code::FAIL_TO_GET_JOB_STATUS:
+case error::code::COMPUTE_JOB_FAILED:
 return sql_state::SHY000_GENERAL_ERROR;
 
 // Catalog group. Group code: 17
diff --git a/modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs 
b/modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs
index 4d4c0c05be..41408caf50 100644
--- a/modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs
+++ b/modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs
@@ -390,6 +390,9 @@ namespace Apache.Ignite
 
 ///  PortInUse error. 
 public const int PortInUse = (GroupCode << 16) | (2 & 0x);
+
+///  RecipientLeft error. 
+public const int RecipientLeft = (GroupCode << 16) | (5 & 0x);
 }
 
 ///  NodeConfiguration errors. 
@@ -497,6 +500,12 @@ namespace Apache.Ignite
 
 ///  ResultNotFound error. 
 public const int ResultNotFound = (GroupCode << 16) | (7 & 0x);
+
+///  FailToGetJobStatus error. 
+public const int FailToGetJobStatus = (GroupCode << 16) | (8 & 
0x);
+
+///  ComputeJobFailed error. 
+public const int ComputeJobFailed = (GroupCode << 16) | (9 & 
0x);
 }
 
 ///  Catalog errors. 



(ignite-3) 01/02: IGNITE-20447 Introduce Failure handling component (#2629)

2024-01-08 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 pushed a commit to branch ignite-20368
in repository https://gitbox.apache.org/repos/asf/ignite-3.git

commit 0224c294e697b16c4350b0d20429563591ae5601
Author: Sergey Uttsel 
AuthorDate: Fri Sep 29 11:43:48 2023 +0300

IGNITE-20447 Introduce Failure handling component (#2629)
---
 modules/failure-handler/build.gradle   | 33 ++
 .../ignite/internal/failure/FailureContext.java| 66 +++
 .../ignite/internal/failure/FailureHandler.java| 34 ++
 .../ignite/internal/failure/FailureProcessor.java  | 75 ++
 .../ignite/internal/failure/FailureType.java   | 35 ++
 .../internal/failure/FailureProcessorTest.java | 43 +
 settings.gradle|  2 +
 7 files changed, 288 insertions(+)

diff --git a/modules/failure-handler/build.gradle 
b/modules/failure-handler/build.gradle
new file mode 100644
index 00..b6d8be625a
--- /dev/null
+++ b/modules/failure-handler/build.gradle
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+apply from: "$rootDir/buildscripts/java-core.gradle"
+apply from: "$rootDir/buildscripts/publishing.gradle"
+apply from: "$rootDir/buildscripts/java-junit5.gradle"
+apply from: "$rootDir/buildscripts/java-integration-test.gradle"
+apply from: "$rootDir/buildscripts/java-test-fixtures.gradle"
+
+dependencies {
+implementation project(':ignite-core')
+
+testImplementation libs.mockito.core
+testImplementation libs.mockito.junit
+
+testImplementation(testFixtures(project(':ignite-core')))
+}
+
+description = 'ignite-failure-handler'
diff --git 
a/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureContext.java
 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureContext.java
new file mode 100644
index 00..1100a6c216
--- /dev/null
+++ 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureContext.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.failure;
+
+import org.apache.ignite.internal.tostring.S;
+
+/**
+ * Failure context contains information about failure type and exception if 
applicable.
+ * This information could be used for appropriate handling of the failure.
+ */
+public class FailureContext {
+/** Type. */
+private final FailureType type;
+
+/** Error. */
+private final Throwable err;
+
+/**
+ * Creates instance of {@link FailureContext}.
+ *
+ * @param type Failure type.
+ * @param err Exception.
+ */
+public FailureContext(FailureType type, Throwable err) {
+this.type = type;
+this.err = err;
+}
+
+/**
+ * Gets the failure type.
+ *
+ * @return Failure type.
+ */
+public FailureType type() {
+return type;
+}
+
+/**
+ * Gets the exception.
+ *
+ * @return Exception or {@code null}.
+ */
+public Throwable error() {
+return err;
+}
+
+/** {@inheritDoc} */
+@Override public String toString() {
+return S.toString(FailureContext.class, this);
+}
+}
diff --git 
a/modules/failure-handler/src/main/java/org/apache/

(ignite-3) 02/02: IGNITE-20448 StopNodeFailureHandler and StopNodeOrHaltFailureHandler were implemented. (#2646)

2024-01-08 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 pushed a commit to branch ignite-20368
in repository https://gitbox.apache.org/repos/asf/ignite-3.git

commit 3012c9f0c69d248a62fe5c4e3bf6f520e51cae6c
Author: Sergey Uttsel 
AuthorDate: Wed Oct 4 16:53:26 2023 +0300

IGNITE-20448 StopNodeFailureHandler and StopNodeOrHaltFailureHandler were 
implemented. (#2646)
---
 modules/failure-handler/build.gradle   |   1 +
 .../ignite/internal/failure/FailureProcessor.java  |   1 +
 .../failure/{ => handlers}/FailureHandler.java |   5 +-
 .../StopNodeFailureHandler.java}   |  29 ++---
 .../handlers/StopNodeOrHaltFailureHandler.java | 118 +
 .../internal/failure/FailureProcessorTest.java |   1 +
 modules/runner/build.gradle|   1 +
 .../failurehandler/FailureHandlerTest.java |  93 
 8 files changed, 235 insertions(+), 14 deletions(-)

diff --git a/modules/failure-handler/build.gradle 
b/modules/failure-handler/build.gradle
index b6d8be625a..acc2d9b2ca 100644
--- a/modules/failure-handler/build.gradle
+++ b/modules/failure-handler/build.gradle
@@ -23,6 +23,7 @@ apply from: "$rootDir/buildscripts/java-test-fixtures.gradle"
 
 dependencies {
 implementation project(':ignite-core')
+implementation project(':ignite-api')
 
 testImplementation libs.mockito.core
 testImplementation libs.mockito.junit
diff --git 
a/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureProcessor.java
 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureProcessor.java
index 16d4a6d9ad..35a7ce5bd8 100644
--- 
a/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureProcessor.java
+++ 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureProcessor.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.failure;
 
+import org.apache.ignite.internal.failure.handlers.FailureHandler;
 import org.apache.ignite.internal.manager.IgniteComponent;
 
 /**
diff --git 
a/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureHandler.java
 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/FailureHandler.java
similarity index 88%
copy from 
modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureHandler.java
copy to 
modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/FailureHandler.java
index f56aba3130..fab77aad99 100644
--- 
a/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureHandler.java
+++ 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/FailureHandler.java
@@ -15,7 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.ignite.internal.failure;
+package org.apache.ignite.internal.failure.handlers;
+
+import org.apache.ignite.internal.failure.FailureContext;
+import org.apache.ignite.internal.failure.FailureProcessor;
 
 /**
  * Provides facility to handle failures.
diff --git 
a/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureHandler.java
 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/StopNodeFailureHandler.java
similarity index 58%
rename from 
modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureHandler.java
rename to 
modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/StopNodeFailureHandler.java
index f56aba3130..2b8f847d18 100644
--- 
a/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureHandler.java
+++ 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/StopNodeFailureHandler.java
@@ -15,20 +15,23 @@
  * limitations under the License.
  */
 
-package org.apache.ignite.internal.failure;
+package org.apache.ignite.internal.failure.handlers;
+
+import org.apache.ignite.IgnitionManager;
+import org.apache.ignite.internal.failure.FailureContext;
 
 /**
- * Provides facility to handle failures.
+ * Handler will stop node in case of critical error using {@code 
IgnitionManager.stop(nodeName)} call.
  */
-public interface FailureHandler {
-/**
- * Handles failure occurred on {@code ignite} instance.
- * Failure details is contained in {@code failureCtx}.
- * Returns {@code true} if Ignite node must be invalidated by {@link 
FailureProcessor} after calling this method.
- *
- * @param nodeName Node name.
- * @param failureCtx Failure context.
- * @return Whether Ignite node must be invalidated or not.
- */
-boolean onFailure(String nodeName, FailureContext failureCtx);
+public class StopNodeFailureHandler implements FailureHandler {
+/** {@inheritDoc} */
+@Override
+public boolean onFailure(String nodeName, FailureContext 

(ignite-3) branch main updated: IGNITE-21014 Add table creation revision for table descriptor (#2980)

2023-12-20 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 8ea605f0b6 IGNITE-21014 Add table creation revision for table 
descriptor (#2980)
8ea605f0b6 is described below

commit 8ea605f0b6ce51838fc3a8bf3aae9081835bf102
Author: Mirza Aliev 
AuthorDate: Wed Dec 20 16:06:42 2023 +0400

IGNITE-21014 Add table creation revision for table descriptor (#2980)
---
 .../catalog/commands/CreateTableCommand.java   |  1 +
 .../descriptors/CatalogTableDescriptor.java| 23 ++-
 .../internal/catalog/storage/AlterColumnEntry.java |  4 +-
 .../internal/catalog/storage/DropColumnsEntry.java |  3 +-
 .../internal/catalog/storage/NewColumnsEntry.java  |  3 +-
 .../internal/catalog/CatalogManagerSelfTest.java   | 31 +++
 .../MakeIndexAvailableCommandValidationTest.java   |  1 +
 .../ignite/client/handler/FakeCatalogService.java  |  2 +-
 .../RebalanceUtilUpdateAssignmentsTest.java|  1 +
 .../ignite/internal/schema/SchemaManagerTest.java  | 44 --
 .../CatalogToSchemaDescriptorConverterTest.java|  1 +
 .../storage/AbstractMvTableStorageTest.java|  1 +
 .../storage/index/AbstractIndexStorageTest.java|  1 +
 .../replication/PartitionReplicaListenerTest.java  |  1 +
 .../schema/CatalogValidationSchemasSourceTest.java |  2 +-
 15 files changed, 108 insertions(+), 11 deletions(-)

diff --git 
a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CreateTableCommand.java
 
b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CreateTableCommand.java
index 4593514dce..f423f11578 100644
--- 
a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CreateTableCommand.java
+++ 
b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CreateTableCommand.java
@@ -115,6 +115,7 @@ public class CreateTableCommand extends 
AbstractTableCommand {
 
columns.stream().map(CatalogUtils::fromParams).collect(toList()),
 primaryKeyColumns,
 colocationColumns,
+INITIAL_CAUSALITY_TOKEN,
 INITIAL_CAUSALITY_TOKEN
 );
 
diff --git 
a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogTableDescriptor.java
 
b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogTableDescriptor.java
index 9949dc2bf8..89edf8bb98 100644
--- 
a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogTableDescriptor.java
+++ 
b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogTableDescriptor.java
@@ -17,6 +17,8 @@
 
 package org.apache.ignite.internal.catalog.descriptors;
 
+import static 
org.apache.ignite.internal.catalog.CatalogManagerImpl.INITIAL_CAUSALITY_TOKEN;
+
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.util.List;
@@ -52,6 +54,8 @@ public class CatalogTableDescriptor extends 
CatalogObjectDescriptor {
 @IgniteToStringExclude
 private transient Map columnsMap;
 
+private long creationToken;
+
 /**
  * Constructor.
  *
@@ -62,7 +66,8 @@ public class CatalogTableDescriptor extends 
CatalogObjectDescriptor {
  * @param tableVersion Version of the table.
  * @param columns Table column descriptors.
  * @param pkCols Primary key column names.
- * @param colocationCols Colocation column names.
+ * @param causalityToken Token of the update of the descriptor.
+ * @param creationToken Token of the creation of the table descriptor.
  */
 public CatalogTableDescriptor(
 int id,
@@ -74,7 +79,8 @@ public class CatalogTableDescriptor extends 
CatalogObjectDescriptor {
 List columns,
 List pkCols,
 @Nullable List colocationCols,
-long causalityToken
+long causalityToken,
+long creationToken
 ) {
 super(id, Type.TABLE, name, causalityToken);
 
@@ -88,6 +94,8 @@ public class CatalogTableDescriptor extends 
CatalogObjectDescriptor {
 
 this.columnsMap = 
columns.stream().collect(Collectors.toMap(CatalogTableColumnDescriptor::name, 
Function.identity()));
 
+this.creationToken = creationToken;
+
 // TODO: IGNITE-19082 Throw proper exceptions.
 assert !columnsMap.isEmpty() : "No columns.";
 
@@ -151,4 +159,15 @@ public class CatalogTableDescriptor extends 
CatalogObjectDescriptor {
 public String toString() {
 return S.toString(this);
 }
+
+public long creationToken() {
+return creationToken;
+}
+
+@Override
+public void updateToken(long updateToken) {
+super.updateToken(updateToken);
+
+this.creationToken = this.creationToken == INITIAL_CAUSALITY_TOKEN ? 
u

(ignite) branch master updated: IGNITE-21032 Ensured all entries in AttributeList are Attributes (#11046)

2023-12-14 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 e7a35b198ae IGNITE-21032 Ensured all entries in AttributeList are 
Attributes (#11046)
e7a35b198ae is described below

commit e7a35b198ae684ac0073608d985fefb3cd7e02db
Author: Simon Greatrix 
AuthorDate: Thu Dec 14 08:55:30 2023 +

IGNITE-21032 Ensured all entries in AttributeList are Attributes (#11046)
---
 .../org/apache/ignite/spi/metric/jmx/ReadOnlyDynamicMBean.java | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/spi/metric/jmx/ReadOnlyDynamicMBean.java
 
b/modules/core/src/main/java/org/apache/ignite/spi/metric/jmx/ReadOnlyDynamicMBean.java
index e59763064ab..9a8cd5f2625 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/spi/metric/jmx/ReadOnlyDynamicMBean.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/spi/metric/jmx/ReadOnlyDynamicMBean.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.spi.metric.jmx;
 
+import java.util.List;
 import javax.management.Attribute;
 import javax.management.AttributeList;
 import javax.management.AttributeNotFoundException;
@@ -58,12 +59,16 @@ public abstract class ReadOnlyDynamicMBean implements 
DynamicMBean {
 /** {@inheritDoc} */
 @Override public AttributeList getAttributes(String[] attributes) {
 AttributeList list = new AttributeList();
+List attrList = list.asList();
 
 try {
 for (String attr : attributes) {
 Object val = getAttribute(attr);
 
-list.add(val);
+if (val instanceof Attribute)
+attrList.add((Attribute)val);
+else
+attrList.add(new Attribute(attr, val));
 }
 
 return list;



(ignite) branch master updated: IGNITE-20748 Updated java opens (#11030)

2023-11-30 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 a57ef58eba5 IGNITE-20748 Updated java opens (#11030)
a57ef58eba5 is described below

commit a57ef58eba57976dd0a4e61483b88e4a83a7acd7
Author: IgGusev 
AuthorDate: Thu Nov 30 15:35:04 2023 +0400

IGNITE-20748 Updated java opens (#11030)
---
 docs/_docs/includes/java9.adoc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/docs/_docs/includes/java9.adoc b/docs/_docs/includes/java9.adoc
index 0e2316ab57f..dce4dc222db 100644
--- a/docs/_docs/includes/java9.adoc
+++ b/docs/_docs/includes/java9.adoc
@@ -58,5 +58,6 @@ tab:Java 17[]
 --add-opens=java.base/java.math=ALL-UNNAMED
 --add-opens=java.sql/java.sql=ALL-UNNAMED
 --add-opens=java.base/java.net=ALL-UNNAMED
+--add-opens=java.base/sun.util.calendar=ALL-UNNAMED
 
 --



(ignite-3) branch storage-profiles created (now d809333838)

2023-11-29 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


  at d809333838 IGNITE-20963 Fix 
testClientReceivesPartitionAssignmentUpdates flakiness (#2886)

No new revisions were added by this update.



(ignite-3) branch main updated: IGNITE-20825 Fix ItDurableFinishTest.testCoordinatorMissedResponse flakiness (#2835)

2023-11-17 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 901b9168d6 IGNITE-20825 Fix 
ItDurableFinishTest.testCoordinatorMissedResponse  flakiness (#2835)
901b9168d6 is described below

commit 901b9168d6ddfc2044c6dca5e65072c6d5da1fa0
Author: Cyrill 
AuthorDate: Fri Nov 17 11:54:45 2023 +0300

IGNITE-20825 Fix ItDurableFinishTest.testCoordinatorMissedResponse  
flakiness (#2835)

Co-authored-by: Kirill Sizov 
---
 .../ignite/internal/table/ItDurableFinishTest.java | 24 ++
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/table/ItDurableFinishTest.java
 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/table/ItDurableFinishTest.java
index 7060c8abef..606165ad51 100644
--- 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/table/ItDurableFinishTest.java
+++ 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/table/ItDurableFinishTest.java
@@ -27,6 +27,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 
+import java.util.ArrayList;
+import java.util.Collection;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutionException;
@@ -48,7 +50,6 @@ import org.apache.ignite.network.NetworkMessage;
 import org.apache.ignite.table.Tuple;
 import org.apache.ignite.tx.TransactionException;
 import org.jetbrains.annotations.Nullable;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 
 /**
@@ -59,6 +60,8 @@ public class ItDurableFinishTest extends 
ClusterPerTestIntegrationTest {
 
 private static final String TABLE_NAME = "TEST_FINISH";
 
+private final Collection> futures = new ArrayList<>();
+
 private void createTestTableWith3Replicas() {
 String zoneSql = "create zone test_zone with partitions=1, replicas=3";
 String sql = "create table " + TABLE_NAME + " (key int primary key, 
val varchar(20))"
@@ -178,9 +181,12 @@ public class ItDurableFinishTest extends 
ClusterPerTestIntegrationTest {
 }
 
 @Test
-@Disabled("https://issues.apache.org/jira/browse/IGNITE-20825";)
 void testCoordinatorMissedResponse() throws ExecutionException, 
InterruptedException {
 testFinishRow(this::coordinatorMissedResponse, this::commitRow);
+
+for (CompletableFuture future : futures) {
+assertThat(future, willCompleteSuccessfully());
+}
 }
 
 private void coordinatorMissedResponse(
@@ -197,15 +203,17 @@ public class ItDurableFinishTest extends 
ClusterPerTestIntegrationTest {
 if (networkMessage instanceof TxFinishReplicaRequest && 
!messageHandled.get()) {
 messageHandled.set(true);
 
-logger().info("Pausing message handling: {}.", networkMessage);
+logger().info("Drop message [msg={}].", networkMessage);
 
-CompletableFuture finish = 
coordinatorMessaging.invoke(s, networkMessage, 3000);
-
-assertThat(finish, willCompleteSuccessfully());
+// Here we act as a man-in-the-middle: the finish request is 
intercepted and further routed to
+// the commit partition as normal. The coordinator instead 
fails with a timeout (see DefaultMessagingService.invoke0)
+// and has to retry the finish request according to the 
durable finish logic.
+// The test checks that the second coordinator attempt to 
commit succeeds
+// and the server is able to apply a COMMIT over COMMIT 
without exceptions.
 
-finish.join();
+CompletableFuture finish = 
coordinatorMessaging.invoke(s, networkMessage, 3000);
 
-logger().info("Continue message handling: {}.", 
networkMessage);
+futures.add(finish);
 
 return true;
 }



(ignite-3) branch main updated: IGNITE-20013 Docs for ALTER ZONE and WITH params (#2341)

2023-11-08 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 eb937a0354 IGNITE-20013 Docs for ALTER ZONE and WITH params (#2341)
eb937a0354 is described below

commit eb937a0354a6381a679dfd4f0b8c42dc1c087f64
Author: IgGusev 
AuthorDate: Wed Nov 8 19:10:35 2023 +0400

IGNITE-20013 Docs for ALTER ZONE and WITH params (#2341)
---
 docs/_docs/sql-reference/ddl.adoc|  7 ---
 docs/_docs/sql-reference/distribution-zones.adoc | 80 
 2 files changed, 39 insertions(+), 48 deletions(-)

diff --git a/docs/_docs/sql-reference/ddl.adoc 
b/docs/_docs/sql-reference/ddl.adoc
index 21cdd70718..9cda9ed33f 100644
--- a/docs/_docs/sql-reference/ddl.adoc
+++ b/docs/_docs/sql-reference/ddl.adoc
@@ -48,12 +48,6 @@ NonTerminal('column_list')
 ),
 Optional(
 Sequence(
-NonTerminal('ENGINE'),
-NonTerminal('engine_name')
-)
-),
-Optional(
-Sequence(
 NonTerminal('WITH'),
 OneOrMore('param_name')
 )
@@ -66,7 +60,6 @@ Parameters:
 * `table_name` - name of the table. Can be schema-qualified.
 * `table_column` - name and type of a column to be created in the new table.
 * `IF NOT EXISTS` - create the table only if a table with the same name does 
not exist.
-* `ENGINE` - selects the storage engine to use. Currently `aipersist`, `aimem` 
and `rocksdb` are available.
 * `COLOCATED BY` - colocation key. The key can be composite. Primary key must 
include colocation key. Was `affinity_key` in Ignite 2.x.
 * `WITH` - accepts the following additional parameters:
 
diff --git a/docs/_docs/sql-reference/distribution-zones.adoc 
b/docs/_docs/sql-reference/distribution-zones.adoc
index 22b0a3262f..b7f4bca33a 100644
--- a/docs/_docs/sql-reference/distribution-zones.adoc
+++ b/docs/_docs/sql-reference/distribution-zones.adoc
@@ -14,7 +14,7 @@
 // limitations under the License.
 = Distribution Zones
 
-This section describes Apache Ignite 3 distribution zones.
+This section describes Apache Ignite distribution zones. In Ignite 3, you can 
fine tune distribution of your partitions on nodes for better performance and 
stability.
 
 == CREATE ZONE
 
@@ -22,7 +22,16 @@ Creates a new distribution zone.
 
 [source,sql]
 
-CREATE ZONE [IF NOT EXISTS] qualified_zone_name [;]
+CREATE ZONE [IF NOT EXISTS] qualified_zone_name [ENGINE engine_name]
+[WITH
+[PARTITIONS = partitionNumber],
+[REPLICAS = replicaNumber],
+{[DATA_NODES_AUTO_ADJUST_SCALE_UP = scale_up_value |
+DATA_NODES_AUTO_ADJUST_SCALE_DOWN = scale_down_value |
+(DATA_NODES_AUTO_ADJUST_SCALE_UP = scale_up_value & 
DATA_NODES_AUTO_ADJUST_SCALE_DOWN = scale_down_value)]},
+[DATA_NODES_FILTER = jsonPathFilter]
+]
+[;]
 
 
 Parameters:
@@ -30,10 +39,13 @@ Parameters:
 
 * `qualified_zone_name` - name of the distribution zone. Can be 
schema-qualified.
 * `IF NOT EXISTS` - create a zone only if a different zone with the same name 
does not exist.
-//* `WITH` - accepts the following additional parameters:
-//- `DATA_NODES_AUTO_ADJUST` - the delay in seconds between any topology 
changes and the start of data zone adjustment.
-//- `DATA_NODES_AUTO_ADJUST_SCALE_UP` - the delay in seconds between the new 
node joining and the start of data zone adjustment.
-//- `DATA_NODES_AUTO_ADJUST_SCALE_DOWN` - the delay in seconds between the 
node leaving the cluster and the start of data zone adjustment.
+* `ENGINE` - selects the storage engine to use. Currently `aipersist`, `aimem` 
and `rocksdb` are available.
+* `WITH` - accepts the following additional parameters:
+- `PARTITIONS` - the number of parts data is divinded into. Partitions are 
then split between nodes for storage.
+- `REPLICAS` - the number of copies of each partition.
+- `DATA_NODES_AUTO_ADJUST_SCALE_UP` - the delay in seconds between the new 
node joining and the start of data zone adjustment.
+- `DATA_NODES_AUTO_ADJUST_SCALE_DOWN` - the delay in seconds between the node 
leaving the cluster and the start of data zone adjustment.
+- `DATA_NODES_FILTER` - specifies the nodes that can be used to store data in 
the distribution zone based on node attributes. You can configure node 
attributes by using cli.  Filter uses JSONPath rules. If the attribute is not 
found, all negative comparisons will be valid. For example, `$[?(@.storage != 
'SSD']}` will also include nodes without the `storage` attribute specified.
 
 Examples:
 
@@ -45,41 +57,12 @@ CREATE ZONE IF NOT EXISTS exampleZone
 
 
 
-//Creates an `exampleZone` distribution zone that will only use nodes with SSD 
attribute and adjust 300 seconds after cluster topology changes:
+Creates an `exampleZone` distribution zone that will only use nodes with SSD 
attribute and adjust 300 seconds after cluster topology changes:
 
-//[source,sql]
-//
-//CREAT

(ignite-3) branch main updated (1e999dc6b6 -> b84b457deb)

2023-11-07 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from 1e999dc6b6 IGNITE-20774 
ItRebalanceDistributedTest#testRebalanceRetryWhenCatchupFailed is flaky on TC 
(#2791)
 add b84b457deb IGNITE-20540 Add information of logging to docs (#2805)

No new revisions were added by this update.

Summary of changes:
 docs/_docs/general-tips.adoc | 28 
 1 file changed, 28 insertions(+)
 create mode 100644 docs/_docs/general-tips.adoc



[ignite] branch master updated: IGNITE-20552 Fix ScanQuery code snippet (#10974)

2023-10-25 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 4eacde20333 IGNITE-20552 Fix ScanQuery code snippet (#10974)
4eacde20333 is described below

commit 4eacde203330ad515ec21f4c8d085ae38788de9d
Author: CyrilFeng <1491087...@qq.com>
AuthorDate: Thu Oct 26 00:20:46 2023 +0800

IGNITE-20552 Fix ScanQuery code snippet (#10974)
---
 .../main/java/org/apache/ignite/snippets/UsingScanQueries.java   | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git 
a/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/UsingScanQueries.java
 
b/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/UsingScanQueries.java
index e14668b9481..92aac8be2aa 100644
--- 
a/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/UsingScanQueries.java
+++ 
b/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/UsingScanQueries.java
@@ -101,11 +101,12 @@ public class UsingScanQueries {
 try (Ignite ignite = Ignition.start()) {
 //tag::idxQry[]
 // Create index by 2 fields (orgId, salary).
+LinkedHashMap fields = new LinkedHashMap<>();
+fields.put("orgId", Integer.class.getName());
+fields.put("salary", Integer.class.getName());
+  
 QueryEntity personEntity = new QueryEntity(Integer.class, 
Person.class)
-.setFields(new LinkedHashMap() {{
-put("orgId", Integer.class.getName());
-put("salary", Integer.class.getName());
-}})
+.setFields(fields)
 .setIndexes(Collections.singletonList(
 new QueryIndex(Arrays.asList("orgId", "salary"), 
QueryIndexType.SORTED)
 .setName("ORG_SALARY_IDX")



[ignite-3] branch main updated: IGNITE-20317 Return metastorage invokes for zones changes in handlers, immediately recalculate data nodes when scale up/down is immediate. (#2685)

2023-10-16 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 d5d8dde793 IGNITE-20317 Return metastorage invokes for zones changes 
in handlers, immediately recalculate data nodes when scale up/down is 
immediate. (#2685)
d5d8dde793 is described below

commit d5d8dde7939c66637be66e6b62966fc9429de068
Author: Mirza Aliev 
AuthorDate: Mon Oct 16 11:11:01 2023 +0400

IGNITE-20317 Return metastorage invokes for zones changes in handlers, 
immediately recalculate data nodes when scale up/down is immediate. (#2685)
---
 .../distributionzones/DistributionZoneManager.java | 144 -
 .../rebalance/DistributionZoneRebalanceEngine.java | 128 +-
 .../DistributionZoneCausalityDataNodesTest.java|   2 -
 3 files changed, 149 insertions(+), 125 deletions(-)

diff --git 
a/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
 
b/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
index a65a13eb16..ae1e59ef3b 100644
--- 
a/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
+++ 
b/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
@@ -24,6 +24,7 @@ import static 
java.util.concurrent.CompletableFuture.failedFuture;
 import static java.util.concurrent.TimeUnit.SECONDS;
 import static java.util.stream.Collectors.toList;
 import static java.util.stream.Collectors.toSet;
+import static 
org.apache.ignite.internal.catalog.commands.CatalogUtils.IMMEDIATE_TIMER_VALUE;
 import static 
org.apache.ignite.internal.catalog.commands.CatalogUtils.INFINITE_TIMER_VALUE;
 import static 
org.apache.ignite.internal.catalog.events.CatalogEvent.ZONE_ALTER;
 import static 
org.apache.ignite.internal.catalog.events.CatalogEvent.ZONE_CREATE;
@@ -150,17 +151,17 @@ public class DistributionZoneManager implements 
IgniteComponent {
 private final LogicalTopologyEventListener topologyEventListener = new 
LogicalTopologyEventListener() {
 @Override
 public void onNodeJoined(LogicalNode joinedNode, 
LogicalTopologySnapshot newTopology) {
-updateLogicalTopologyInMetaStorage(newTopology, false);
+updateLogicalTopologyInMetaStorage(newTopology);
 }
 
 @Override
 public void onNodeLeft(LogicalNode leftNode, LogicalTopologySnapshot 
newTopology) {
-updateLogicalTopologyInMetaStorage(newTopology, false);
+updateLogicalTopologyInMetaStorage(newTopology);
 }
 
 @Override
 public void onTopologyLeap(LogicalTopologySnapshot newTopology) {
-updateLogicalTopologyInMetaStorage(newTopology, true);
+updateLogicalTopologyInMetaStorage(newTopology);
 }
 };
 
@@ -295,6 +296,14 @@ public class DistributionZoneManager implements 
IgniteComponent {
 
 long causalityToken = parameters.causalityToken();
 
+if (newScaleUp == IMMEDIATE_TIMER_VALUE) {
+return saveDataNodesToMetaStorageOnScaleUp(zoneId, 
causalityToken).thenRun(() -> {
+// TODO: causalityOnUpdateScaleUp will be removed 
https://issues.apache.org/jira/browse/IGNITE-20604,
+// catalog must be used instead
+
causalityDataNodesEngine.causalityOnUpdateScaleUp(causalityToken, zoneId, 
IMMEDIATE_TIMER_VALUE);
+});
+}
+
 // It is safe to zonesTimers.get(zoneId) in term of NPE because meta 
storage notifications are one-threaded
 // and this map will be initialized on a manager start or with catalog 
notification
 ZoneState zoneState = zonesState.get(zoneId);
@@ -329,6 +338,14 @@ public class DistributionZoneManager implements 
IgniteComponent {
 
 long causalityToken = parameters.causalityToken();
 
+if (newScaleDown == IMMEDIATE_TIMER_VALUE) {
+return saveDataNodesToMetaStorageOnScaleDown(zoneId, 
causalityToken).thenRun(() -> {
+// TODO: causalityOnUpdateScaleDown will be removed 
https://issues.apache.org/jira/browse/IGNITE-20604,
+// catalog must be used instead
+
causalityDataNodesEngine.causalityOnUpdateScaleDown(causalityToken, zoneId, 
IMMEDIATE_TIMER_VALUE);
+});
+}
+
 // It is safe to zonesTimers.get(zoneId) in term of NPE because meta 
storage notifications are one-threaded
 // and this map will be initialized on a manager start or with catalog 
notification
 ZoneState zoneState = zonesState.get(zoneId);
@@ -387,8 +404,9 @@ public class DistributionZoneManager implements 
IgniteComponent {
  *
  * @param zone Zone descriptor.
  * 

[ignite-extensions] 01/01: IGNITE-19899 Use autoconfigure scheme for SpringBoot 2.7+

2023-10-13 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-extensions.git

commit 0a7c39def42a59b9059997d7de100aad0ef3e105
Merge: 61293c3f 8baf3fcf
Author: Slava Koptilin 
AuthorDate: Fri Oct 13 10:35:47 2023 +0300

IGNITE-19899 Use autoconfigure scheme for SpringBoot 2.7+

 ...mework.boot.autoconfigure.AutoConfiguration.imports | 17 +
 ...mework.boot.autoconfigure.AutoConfiguration.imports | 18 ++
 2 files changed, 35 insertions(+)



[ignite-extensions] branch master updated (61293c3f -> 0a7c39de)

2023-10-13 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from 61293c3f IGNITE-20582 [CDC] Update Kafka client dependency to 2.8.2 
version (#231)
 add 44ff90a3 IGNITE-19899 Use autoconfigure scheme for SpringBoot 2.7+
 add 8baf3fcf Add missing EOL
 new 0a7c39de IGNITE-19899 Use autoconfigure scheme for SpringBoot 2.7+

The 1 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.


Summary of changes:
 .../org.springframework.boot.autoconfigure.AutoConfiguration.imports} | 3 +--
 .../org.springframework.boot.autoconfigure.AutoConfiguration.imports} | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)
 copy 
modules/spring-boot-autoconfigure-ext/spring-boot-autoconfigure/src/main/resources/META-INF/{spring.factories
 => spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports} 
(92%)
 copy 
modules/spring-boot-thin-client-autoconfigure-ext/spring-boot-thin-client-autoconfigure/src/main/resources/META-INF/{spring.factories
 => spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports} 
(91%)



[ignite-3] branch main updated (564c4ada56 -> 4bec83b321)

2023-10-05 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from 564c4ada56 IGNITE-20519 Introduce update token for 
CatalogObjectDescriptor (#2656)
 add 4bec83b321 IGNITE-20397 Remove assert in StripedDisruptor if handler 
is null. (#2644)

No new revisions were added by this update.

Summary of changes:
 .../org/apache/ignite/raft/jraft/disruptor/StripedDisruptor.java | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)



[ignite-3] branch ignite-20368 updated: IGNITE-20448 StopNodeFailureHandler and StopNodeOrHaltFailureHandler were implemented. (#2646)

2023-10-04 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 pushed a commit to branch ignite-20368
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/ignite-20368 by this push:
 new 416abea88b IGNITE-20448 StopNodeFailureHandler and 
StopNodeOrHaltFailureHandler were implemented. (#2646)
416abea88b is described below

commit 416abea88b319e45df0413194c0c9140be67b8db
Author: Sergey Uttsel 
AuthorDate: Wed Oct 4 16:53:26 2023 +0300

IGNITE-20448 StopNodeFailureHandler and StopNodeOrHaltFailureHandler were 
implemented. (#2646)
---
 modules/failure-handler/build.gradle   |   1 +
 .../ignite/internal/failure/FailureProcessor.java  |   1 +
 .../failure/{ => handlers}/FailureHandler.java |   5 +-
 .../StopNodeFailureHandler.java}   |  29 ++---
 .../handlers/StopNodeOrHaltFailureHandler.java | 118 +
 .../internal/failure/FailureProcessorTest.java |   1 +
 modules/runner/build.gradle|   1 +
 .../failurehandler/FailureHandlerTest.java |  93 
 8 files changed, 235 insertions(+), 14 deletions(-)

diff --git a/modules/failure-handler/build.gradle 
b/modules/failure-handler/build.gradle
index b6d8be625a..acc2d9b2ca 100644
--- a/modules/failure-handler/build.gradle
+++ b/modules/failure-handler/build.gradle
@@ -23,6 +23,7 @@ apply from: "$rootDir/buildscripts/java-test-fixtures.gradle"
 
 dependencies {
 implementation project(':ignite-core')
+implementation project(':ignite-api')
 
 testImplementation libs.mockito.core
 testImplementation libs.mockito.junit
diff --git 
a/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureProcessor.java
 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureProcessor.java
index 16d4a6d9ad..35a7ce5bd8 100644
--- 
a/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureProcessor.java
+++ 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureProcessor.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.failure;
 
+import org.apache.ignite.internal.failure.handlers.FailureHandler;
 import org.apache.ignite.internal.manager.IgniteComponent;
 
 /**
diff --git 
a/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureHandler.java
 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/FailureHandler.java
similarity index 88%
copy from 
modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureHandler.java
copy to 
modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/FailureHandler.java
index f56aba3130..fab77aad99 100644
--- 
a/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureHandler.java
+++ 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/FailureHandler.java
@@ -15,7 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.ignite.internal.failure;
+package org.apache.ignite.internal.failure.handlers;
+
+import org.apache.ignite.internal.failure.FailureContext;
+import org.apache.ignite.internal.failure.FailureProcessor;
 
 /**
  * Provides facility to handle failures.
diff --git 
a/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureHandler.java
 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/StopNodeFailureHandler.java
similarity index 58%
rename from 
modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureHandler.java
rename to 
modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/StopNodeFailureHandler.java
index f56aba3130..2b8f847d18 100644
--- 
a/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureHandler.java
+++ 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/handlers/StopNodeFailureHandler.java
@@ -15,20 +15,23 @@
  * limitations under the License.
  */
 
-package org.apache.ignite.internal.failure;
+package org.apache.ignite.internal.failure.handlers;
+
+import org.apache.ignite.IgnitionManager;
+import org.apache.ignite.internal.failure.FailureContext;
 
 /**
- * Provides facility to handle failures.
+ * Handler will stop node in case of critical error using {@code 
IgnitionManager.stop(nodeName)} call.
  */
-public interface FailureHandler {
-/**
- * Handles failure occurred on {@code ignite} instance.
- * Failure details is contained in {@code failureCtx}.
- * Returns {@code true} if Ignite node must be invalidated by {@link 
FailureProcessor} after calling this method.
- *
- * @param nodeName Node name.
- * @param failureCtx Failure context.
- * @return Whether Ignite node must be invalidated or not.
- */
-boolean onFailur

[ignite-3] branch ignite-20368 updated: IGNITE-20447 Introduce Failure handling component (#2629)

2023-09-29 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 pushed a commit to branch ignite-20368
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/ignite-20368 by this push:
 new ffe67c56d6 IGNITE-20447 Introduce Failure handling component (#2629)
ffe67c56d6 is described below

commit ffe67c56d64e93621eed5cdd0d0a0116e72e60bf
Author: Sergey Uttsel 
AuthorDate: Fri Sep 29 11:43:48 2023 +0300

IGNITE-20447 Introduce Failure handling component (#2629)
---
 modules/failure-handler/build.gradle   | 33 ++
 .../ignite/internal/failure/FailureContext.java| 66 +++
 .../ignite/internal/failure/FailureHandler.java| 34 ++
 .../ignite/internal/failure/FailureProcessor.java  | 75 ++
 .../ignite/internal/failure/FailureType.java   | 35 ++
 .../internal/failure/FailureProcessorTest.java | 43 +
 settings.gradle|  2 +
 7 files changed, 288 insertions(+)

diff --git a/modules/failure-handler/build.gradle 
b/modules/failure-handler/build.gradle
new file mode 100644
index 00..b6d8be625a
--- /dev/null
+++ b/modules/failure-handler/build.gradle
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+apply from: "$rootDir/buildscripts/java-core.gradle"
+apply from: "$rootDir/buildscripts/publishing.gradle"
+apply from: "$rootDir/buildscripts/java-junit5.gradle"
+apply from: "$rootDir/buildscripts/java-integration-test.gradle"
+apply from: "$rootDir/buildscripts/java-test-fixtures.gradle"
+
+dependencies {
+implementation project(':ignite-core')
+
+testImplementation libs.mockito.core
+testImplementation libs.mockito.junit
+
+testImplementation(testFixtures(project(':ignite-core')))
+}
+
+description = 'ignite-failure-handler'
diff --git 
a/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureContext.java
 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureContext.java
new file mode 100644
index 00..1100a6c216
--- /dev/null
+++ 
b/modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureContext.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.failure;
+
+import org.apache.ignite.internal.tostring.S;
+
+/**
+ * Failure context contains information about failure type and exception if 
applicable.
+ * This information could be used for appropriate handling of the failure.
+ */
+public class FailureContext {
+/** Type. */
+private final FailureType type;
+
+/** Error. */
+private final Throwable err;
+
+/**
+ * Creates instance of {@link FailureContext}.
+ *
+ * @param type Failure type.
+ * @param err Exception.
+ */
+public FailureContext(FailureType type, Throwable err) {
+this.type = type;
+this.err = err;
+}
+
+/**
+ * Gets the failure type.
+ *
+ * @return Failure type.
+ */
+public FailureType type() {
+return type;
+}
+
+/**
+ * Gets the exception.
+ *
+ * @return Exception or {@code null}.
+ */
+public Throwable error() {
+return err;
+}
+
+/** {@inheritDoc} *

[ignite-3] branch ignite-20368 created (now 0860e0caa4)

2023-09-29 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


  at 0860e0caa4 IGNITE-20386 Remove CatalogTables (#2640)

No new revisions were added by this update.



[ignite-3] branch test-mute deleted (was bff5dc50a9)

2023-09-29 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


 was bff5dc50a9 Test

This change permanently discards the following revisions:

 discard bff5dc50a9 Test



[ignite-3] branch main updated: IGNITE-20286 Fix missed logs in tests (#2572)

2023-09-15 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 e470097db2 IGNITE-20286 Fix missed logs in tests (#2572)
e470097db2 is described below

commit e470097db283cee4d0b58947c55bbeffcd2782f3
Author: Slava Koptilin 
AuthorDate: Fri Sep 15 10:12:08 2023 +0300

IGNITE-20286 Fix missed logs in tests (#2572)
---
 buildscripts/java-integration-test.gradle | 1 +
 buildscripts/java-junit5.gradle   | 1 +
 buildscripts/java-test-fixtures.gradle| 1 +
 gradle/libs.versions.toml | 4 ++--
 modules/cli/build.gradle  | 7 +++
 modules/network/build.gradle  | 3 ---
 6 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/buildscripts/java-integration-test.gradle 
b/buildscripts/java-integration-test.gradle
index b683fdb3db..a5793d66fe 100644
--- a/buildscripts/java-integration-test.gradle
+++ b/buildscripts/java-integration-test.gradle
@@ -40,6 +40,7 @@ testing {
 implementation libs.log4j.api
 implementation libs.log4j.core
 implementation libs.log4j.bridge
+implementation libs.slf4j.log4j
 }
 
 sources {
diff --git a/buildscripts/java-junit5.gradle b/buildscripts/java-junit5.gradle
index dc71359380..5ca6ba1e29 100644
--- a/buildscripts/java-junit5.gradle
+++ b/buildscripts/java-junit5.gradle
@@ -39,4 +39,5 @@ dependencies {
 testImplementation libs.log4j.api
 testImplementation libs.log4j.core
 testImplementation libs.log4j.bridge
+testImplementation libs.slf4j.log4j
 }
diff --git a/buildscripts/java-test-fixtures.gradle 
b/buildscripts/java-test-fixtures.gradle
index 17feb22e60..5ee1985b1b 100644
--- a/buildscripts/java-test-fixtures.gradle
+++ b/buildscripts/java-test-fixtures.gradle
@@ -25,6 +25,7 @@ dependencies {
 testFixturesImplementation libs.log4j.api
 testFixturesImplementation libs.log4j.core
 testFixturesImplementation libs.log4j.bridge
+testFixturesImplementation libs.slf4j.log4j
 }
 
 pmdTestFixtures {
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 7742524aab..9b8e21c259 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -44,8 +44,8 @@ micronautSecurity="3.9.2"
 micronautReactor="2.5.0"
 mockito = "5.4.0"
 picocli = "4.7.0"
-slf4j = "2.0.7"
-log4j = "2.19.0"
+slf4j = "2.0.9"
+log4j = "2.20.0"
 spoon = "8.4.0-beta-18"
 swagger = "2.2.8"
 swaggerLegacy = "1.6.4"
diff --git a/modules/cli/build.gradle b/modules/cli/build.gradle
index a4c28040a0..32c06fe66e 100644
--- a/modules/cli/build.gradle
+++ b/modules/cli/build.gradle
@@ -115,6 +115,13 @@ dependencies {
 integrationTestImplementation libs.hamcrest.optional
 }
 
+// Use the same logging implementation for ignite components and cli.
+configurations {
+testImplementation.exclude group: "org.slf4j", module: "slf4j-jdk14"
+testFixturesImplementation.exclude group: "org.slf4j", module: 
"slf4j-jdk14"
+integrationTestImplementation.exclude group: "org.slf4j", module: 
"slf4j-jdk14"
+}
+
 ext.generatedClientDir = layout.buildDirectory.dir("swagger/client")
 
 task copyOpenapiDefinition(type: Copy) {
diff --git a/modules/network/build.gradle b/modules/network/build.gradle
index 9944c87007..ece7813037 100644
--- a/modules/network/build.gradle
+++ b/modules/network/build.gradle
@@ -63,7 +63,6 @@ dependencies {
 testImplementation libs.bytebuddy
 testImplementation libs.compileTesting
 testImplementation libs.awaitility
-testImplementation libs.slf4j.log4j
 
 testFixturesAnnotationProcessor 
project(":ignite-network-annotation-processor")
 testFixturesImplementation project(':ignite-configuration')
@@ -73,8 +72,6 @@ dependencies {
 testFixturesImplementation libs.fastutil.core
 testFixturesImplementation libs.scalecube.cluster
 testFixturesImplementation libs.jetbrains.annotations
-testFixturesImplementation libs.slf4j.log4j
-
 integrationTestAnnotationProcessor 
project(":ignite-network-annotation-processor")
 
 integrationTestAnnotationProcessor 
project(":ignite-network-annotation-processor")



[ignite-3] branch main updated: IGNITE-20414 Rollover test logs on startup (#2589)

2023-09-14 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 f390218e6f IGNITE-20414 Rollover test logs on startup (#2589)
f390218e6f is described below

commit f390218e6ffda986f66c152dd72cf38a235113ac
Author: Vadim Pakhnushev <8614891+valep...@users.noreply.github.com>
AuthorDate: Thu Sep 14 15:11:36 2023 +0300

IGNITE-20414 Rollover test logs on startup (#2589)
---
 modules/core/src/testFixtures/resources/log4j2-test.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/core/src/testFixtures/resources/log4j2-test.xml 
b/modules/core/src/testFixtures/resources/log4j2-test.xml
index 3e07e837ed..bd24cf9063 100755
--- a/modules/core/src/testFixtures/resources/log4j2-test.xml
+++ b/modules/core/src/testFixtures/resources/log4j2-test.xml
@@ -42,6 +42,7 @@
   filePattern="build/ignite.log.%i">
   
   
+
 
   
   



[ignite-3] branch main updated: IGNITE-20394 ItSchemaSyncAndReplicationTest#laggingSchemasPreventPartitionDataReplication sometims fails with TimeoutException (#2587)

2023-09-14 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 bf1bb0589f IGNITE-20394 
ItSchemaSyncAndReplicationTest#laggingSchemasPreventPartitionDataReplication 
sometims fails with TimeoutException (#2587)
bf1bb0589f is described below

commit bf1bb0589fb295512ae75e0a2e329e8f9e604e95
Author: Alexander Lapin 
AuthorDate: Thu Sep 14 14:15:45 2023 +0300

IGNITE-20394 
ItSchemaSyncAndReplicationTest#laggingSchemasPreventPartitionDataReplication 
sometims fails with TimeoutException (#2587)
---
 .../ignite/internal/schemasync/ItSchemaSyncAndReplicationTest.java  | 2 +-
 .../java/org/apache/ignite/internal/table/distributed/TableManager.java | 2 ++
 .../ignite/internal/table/distributed/raft/PartitionListener.java   | 2 ++
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/schemasync/ItSchemaSyncAndReplicationTest.java
 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/schemasync/ItSchemaSyncAndReplicationTest.java
index 1439d68ca0..1cb820a732 100644
--- 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/schemasync/ItSchemaSyncAndReplicationTest.java
+++ 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/schemasync/ItSchemaSyncAndReplicationTest.java
@@ -72,7 +72,7 @@ class ItSchemaSyncAndReplicationTest extends 
ClusterPerTestIntegrationTest {
  * cannot execute without waiting for schemas). This method tests this 
scenario.
  */
 @Test
-@Disabled("https://issues.apache.org/jira/browse/IGNITE-20394";)
+@Disabled("https://issues.apache.org/jira/browse/IGNITE-20410";)
 void laggingSchemasPreventPartitionDataReplication() throws Exception {
 createTestTableWith3Replicas();
 
diff --git 
a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
 
b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
index 66af7c86cf..111975e0bf 100644
--- 
a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
+++ 
b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
@@ -708,6 +708,8 @@ public class TableManager extends Producer imp
 PartitionDataStorage partitionDataStorage = 
partitionDataStorage(partitionStorages.getMvPartitionStorage(),
 internalTbl, partId);
 
+
storageIndexTracker.update(partitionDataStorage.lastAppliedIndex(), null);
+
 PartitionUpdateHandlers partitionUpdateHandlers = 
createPartitionUpdateHandlers(
 partId,
 partitionDataStorage,
diff --git 
a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/PartitionListener.java
 
b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/PartitionListener.java
index 61022405c2..d8b91da9f1 100644
--- 
a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/PartitionListener.java
+++ 
b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/PartitionListener.java
@@ -396,6 +396,7 @@ public class PartitionListener implements RaftGroupListener 
{
 new RaftGroupConfiguration(config.peers(), 
config.learners(), config.oldPeers(), config.oldLearners())
 );
 storage.lastApplied(config.index(), config.term());
+
updateTrackerIgnoringTrackerClosedException(storageIndexTracker, 
config.index());
 
 return null;
 });
@@ -428,6 +429,7 @@ public class PartitionListener implements RaftGroupListener 
{
 });
 
 txStateStorage.lastApplied(maxLastAppliedIndex, maxLastAppliedTerm);
+updateTrackerIgnoringTrackerClosedException(storageIndexTracker, 
maxLastAppliedIndex);
 
 CompletableFuture.allOf(storage.flush(), txStateStorage.flush())
 .whenComplete((unused, throwable) -> 
doneClo.accept(throwable));



[ignite-3] branch main updated: IGNITE-20355 Fix failing RO tests in TxLocalTest (#2582)

2023-09-13 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 6bc603deb6 IGNITE-20355 Fix failing RO tests in TxLocalTest (#2582)
6bc603deb6 is described below

commit 6bc603deb67a1b5fcb02c0954c55859b17d53244
Author: Cyrill 
AuthorDate: Wed Sep 13 17:09:01 2023 +0300

IGNITE-20355 Fix failing RO tests in TxLocalTest (#2582)
---
 .../apache/ignite/internal/table/TxLocalTest.java  | 49 --
 .../table/impl/DummyInternalTableImpl.java | 13 +++---
 2 files changed, 13 insertions(+), 49 deletions(-)

diff --git 
a/modules/table/src/test/java/org/apache/ignite/internal/table/TxLocalTest.java 
b/modules/table/src/test/java/org/apache/ignite/internal/table/TxLocalTest.java
index dc67894f76..b5cf8349d8 100644
--- 
a/modules/table/src/test/java/org/apache/ignite/internal/table/TxLocalTest.java
+++ 
b/modules/table/src/test/java/org/apache/ignite/internal/table/TxLocalTest.java
@@ -28,7 +28,6 @@ import static org.mockito.Mockito.when;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.concurrent.CompletableFuture;
-import org.apache.ignite.internal.hlc.HybridClockImpl;
 import org.apache.ignite.internal.hlc.HybridTimestamp;
 import org.apache.ignite.internal.replicator.ReplicaService;
 import org.apache.ignite.internal.replicator.ReplicationGroupId;
@@ -72,9 +71,10 @@ public class TxLocalTest extends TxAbstractTest {
 
 ReplicaMessagesFactory replicaMessagesFactory = new 
ReplicaMessagesFactory();
 
-HybridClockImpl localClock = new HybridClockImpl();
 MessagingService msgSvc = mock(MessagingService.class, 
RETURNS_DEEP_STUBS);
-ReplicaService replicaSvc = new ReplicaService(msgSvc, localClock);
+ReplicaService replicaSvc = new ReplicaService(msgSvc, 
DummyInternalTableImpl.CLOCK);
+
+String localNodeName = DummyInternalTableImpl.LOCAL_NODE.name();
 
 Map tables = new 
HashMap<>();
 doAnswer(invocationOnMock -> {
@@ -85,7 +85,7 @@ public class TxLocalTest extends TxAbstractTest {
 TimestampAware aware = (TimestampAware) request;
 HybridTimestamp updated = 
DummyInternalTableImpl.CLOCK.update(aware.timestamp());
 
-return replicaListener.invoke(request, "local").handle((res, 
err) -> err == null ? replicaMessagesFactory
+return replicaListener.invoke(request, 
localNodeName).handle((res, err) -> err == null ? replicaMessagesFactory
 .timestampAwareReplicaResponse()
 .result(res)
 .timestampLong(updated.longValue())
@@ -96,7 +96,7 @@ public class TxLocalTest extends TxAbstractTest {
 .timestampLong(updated.longValue())
 .build());
 } else {
-return replicaListener.invoke(request, "local").handle((res, 
err) -> err == null ? replicaMessagesFactory
+return replicaListener.invoke(request, 
localNodeName).handle((res, err) -> err == null ? replicaMessagesFactory
 .replicaResponse()
 .result(res)
 .build() : replicaMessagesFactory
@@ -116,7 +116,8 @@ public class TxLocalTest extends TxAbstractTest {
 
tables.get(request.groupId()).txStateStorage().getTxStateStorage(0).get(request.txId()));
 }).when(transactionStateResolver).sendMetaRequest(any(), any());
 
-txManager = new TxManagerImpl(replicaSvc, lockManager, localClock, new 
TransactionIdGenerator(0xdeadbeef), () -> "local");
+txManager = new TxManagerImpl(replicaSvc, lockManager, 
DummyInternalTableImpl.CLOCK,
+new TransactionIdGenerator(0xdeadbeef), () -> localNodeName);
 
 igniteTransactions = new IgniteTransactionsImpl(txManager, 
timestampTracker);
 
@@ -171,40 +172,4 @@ public class TxLocalTest extends TxAbstractTest {
 protected boolean assertPartitionsSame(TableImpl table, int partId) {
 return true;
 }
-
-// TODO: https://issues.apache.org/jira/browse/IGNITE-20355
-@Override
-public void testReadOnlyGet() {
-// No-op
-}
-
-// TODO: https://issues.apache.org/jira/browse/IGNITE-20355
-@Override
-public void testReadOnlyScan() throws Exception {
-// No-op
-}
-
-// TODO: https://issues.apache.org/jira/browse/IGNITE-20355
-@Override
-public void testReadOnlyGetWriteIntentResolutionUpdate() {
-// No-op
-}
-
-// TODO: https://issues.apache.org/jira/browse/IGNITE-20355
-@Override
-public void testReadOnlyGetWriteIntentResolutionRemove() {
-// No-op
-}
-
-// TODO: https://issues.apache.org/jira/browse/IGNITE-20355
-@Override

[ignite-3] branch main updated: IGNITE-20332 Fix flaky test testScaleUpTriggeredByFilterUpdateIsRestoredAfterRestart (#2554)

2023-09-12 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 da7bcdd9d9 IGNITE-20332 Fix flaky test 
testScaleUpTriggeredByFilterUpdateIsRestoredAfterRestart (#2554)
da7bcdd9d9 is described below

commit da7bcdd9d96f8a69ccd9ebe66b346753f64924e8
Author: Sergey Uttsel 
AuthorDate: Tue Sep 12 12:36:11 2023 +0300

IGNITE-20332 Fix flaky test 
testScaleUpTriggeredByFilterUpdateIsRestoredAfterRestart (#2554)
---
 .../distributionzones/DistributionZonesUtil.java   | 13 ++
 ...niteDistributionZoneManagerNodeRestartTest.java | 53 --
 2 files changed, 52 insertions(+), 14 deletions(-)

diff --git 
a/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZonesUtil.java
 
b/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZonesUtil.java
index e04e9970e2..79c24eaacf 100644
--- 
a/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZonesUtil.java
+++ 
b/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZonesUtil.java
@@ -54,6 +54,7 @@ import 
org.apache.ignite.internal.thread.StripedScheduledThreadPoolExecutor;
 import org.apache.ignite.internal.util.ByteUtils;
 import org.apache.ignite.lang.ByteArray;
 import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.TestOnly;
 
 /**
  * Util class for Distribution Zones flow.
@@ -601,4 +602,16 @@ public class DistributionZonesUtil {
 new ThreadPoolExecutor.DiscardPolicy()
 );
 }
+
+/** Key prefix for zone's scale up change trigger key. */
+@TestOnly
+public static ByteArray zoneScaleUpChangeTriggerKeyPrefix() {
+return new ByteArray(DISTRIBUTION_ZONE_SCALE_UP_CHANGE_TRIGGER_PREFIX);
+}
+
+/** Key prefix for zone's scale down change trigger key. */
+@TestOnly
+public static ByteArray zoneScaleDownChangeTriggerKeyPrefix() {
+return new 
ByteArray(DISTRIBUTION_ZONE_SCALE_DOWN_CHANGE_TRIGGER_PREFIX);
+}
 }
diff --git 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/distribution/zones/ItIgniteDistributionZoneManagerNodeRestartTest.java
 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/distribution/zones/ItIgniteDistributionZoneManagerNodeRestartTest.java
index c0d289fd47..ac282dd9ea 100644
--- 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/distribution/zones/ItIgniteDistributionZoneManagerNodeRestartTest.java
+++ 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/distribution/zones/ItIgniteDistributionZoneManagerNodeRestartTest.java
@@ -26,18 +26,19 @@ import static 
org.apache.ignite.internal.distributionzones.DistributionZoneManag
 import static 
org.apache.ignite.internal.distributionzones.DistributionZonesTestUtil.assertDataNodesFromManager;
 import static 
org.apache.ignite.internal.distributionzones.DistributionZonesTestUtil.assertValueInStorage;
 import static 
org.apache.ignite.internal.distributionzones.DistributionZonesUtil.zoneDataNodesKey;
-import static 
org.apache.ignite.internal.distributionzones.DistributionZonesUtil.zoneScaleDownChangeTriggerKey;
 import static 
org.apache.ignite.internal.distributionzones.DistributionZonesUtil.zoneScaleUpChangeTriggerKey;
 import static 
org.apache.ignite.internal.distributionzones.DistributionZonesUtil.zonesGlobalStateRevision;
 import static 
org.apache.ignite.internal.testframework.IgniteTestUtils.testNodeName;
 import static 
org.apache.ignite.internal.testframework.IgniteTestUtils.waitForCondition;
 import static org.apache.ignite.internal.util.ByteUtils.bytesToLong;
 import static org.apache.ignite.internal.util.ByteUtils.fromBytes;
+import static org.apache.ignite.internal.util.IgniteUtils.startsWith;
 import static 
org.apache.ignite.utils.ClusterServiceTestUtils.defaultSerializationRegistry;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.mockito.ArgumentMatchers.argThat;
+import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.when;
@@ -46,7 +47,6 @@ import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -87,12 +87,12 @@ import 
org.apache.ignite.internal.network.recovery.VaultStateIds;
 import org.apache.ignite.internal.schema.configuration.TablesConfiguration;
 import org.apache.ignite.internal.testframework.TestIgnitionManage

[ignite-3] branch main updated: IGNITE-20335 Move IgniteRunner class into internal package (#2567)

2023-09-11 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 a1172c844f IGNITE-20335 Move IgniteRunner class into internal package 
(#2567)
a1172c844f is described below

commit a1172c844f1760dfea89d59113773d09faaa553f
Author: Slava Koptilin 
AuthorDate: Mon Sep 11 19:19:50 2023 +0300

IGNITE-20335 Move IgniteRunner class into internal package (#2567)
---
 modules/runner/build.gradle   | 2 +-
 .../org/apache/ignite/internal/component/ItRestAddressReportTest.java | 2 +-
 .../java/org/apache/ignite/internal/runner/app/IgniteRunnerTest.java  | 3 +--
 .../main/java/org/apache/ignite/{ => internal}/app/IgniteRunner.java  | 3 +--
 packaging/build.gradle| 2 +-
 packaging/db/build.gradle | 4 ++--
 6 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/modules/runner/build.gradle b/modules/runner/build.gradle
index 35795f4331..40fea9ac27 100644
--- a/modules/runner/build.gradle
+++ b/modules/runner/build.gradle
@@ -220,7 +220,7 @@ integrationTest {
 jar {
 manifest {
 attributes(
-'Main-Class': 'org.apache.ignite.app.IgniteRunner'
+'Main-Class': 'org.apache.ignite.internal.app.IgniteRunner'
 )
 }
 }
diff --git 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/component/ItRestAddressReportTest.java
 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/component/ItRestAddressReportTest.java
index 23f07deb2d..1e41ed74bb 100644
--- 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/component/ItRestAddressReportTest.java
+++ 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/component/ItRestAddressReportTest.java
@@ -33,8 +33,8 @@ import java.util.concurrent.CompletableFuture;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgnitionManager;
 import org.apache.ignite.InitParameters;
-import org.apache.ignite.app.IgniteRunner;
 import org.apache.ignite.internal.IgniteIntegrationTest;
+import org.apache.ignite.internal.app.IgniteRunner;
 import org.apache.ignite.internal.runner.app.IgniteRunnerTest;
 import org.apache.ignite.internal.testframework.TestIgnitionManager;
 import org.apache.ignite.internal.testframework.WorkDirectory;
diff --git 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/IgniteRunnerTest.java
 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/IgniteRunnerTest.java
index 950a91eed7..543f8c6a8f 100644
--- 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/IgniteRunnerTest.java
+++ 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/IgniteRunnerTest.java
@@ -26,8 +26,8 @@ import java.util.concurrent.CompletableFuture;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgnitionManager;
 import org.apache.ignite.InitParameters;
-import org.apache.ignite.app.IgniteRunner;
 import org.apache.ignite.internal.IgniteIntegrationTest;
+import org.apache.ignite.internal.app.IgniteRunner;
 import org.apache.ignite.internal.testframework.WorkDirectory;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.Test;
@@ -46,7 +46,6 @@ public class IgniteRunnerTest extends IgniteIntegrationTest {
 IgnitionManager.stop(NODE_NAME);
 }
 
-/** TODO: Replace this test by full integration test on the cli side 
IGNITE-15097. */
 @Test
 public void smokeTestArgs() throws Exception {
 Path configPath = 
Path.of(IgniteRunnerTest.class.getResource("/ignite-config.json").toURI());
diff --git 
a/modules/runner/src/main/java/org/apache/ignite/app/IgniteRunner.java 
b/modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteRunner.java
similarity index 96%
rename from modules/runner/src/main/java/org/apache/ignite/app/IgniteRunner.java
rename to 
modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteRunner.java
index fdfd036676..13d94aad70 100644
--- a/modules/runner/src/main/java/org/apache/ignite/app/IgniteRunner.java
+++ 
b/modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteRunner.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.ignite.app;
+package org.apache.ignite.internal.app;
 
 import java.nio.file.Path;
 import java.util.concurrent.Callable;
@@ -23,7 +23,6 @@ import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ExecutionException;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgnitionManager;
-import org.apache.ignite.internal.app.EnvironmentDefaultValueProvider;
 import picocli.CommandLine;
 import picocli.CommandLine.Command;
 impo

[ignite-3] branch main updated (42d717ed93 -> 22efe81f33)

2023-09-07 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from 42d717ed93 IGNITE-18670: Sql. It is possible to reference aliases in 
GROUP BY clause. (#2545)
 add 22efe81f33 IGNITE-20354 Reduce code duplication in commit cleanup 
(#2557)

No new revisions were added by this update.

Summary of changes:
 .../table/distributed/StorageUpdateHandler.java| 106 +++--
 .../table/distributed/raft/PartitionListener.java  |  59 ++--
 .../replicator/PartitionReplicaListener.java   |  52 ++
 .../table/distributed/replicator/PendingRows.java  |  99 +++
 .../internal/table/distributed/IndexBaseTest.java  |  12 ++-
 .../table/distributed/IndexCleanupTest.java|  13 ++-
 .../distributed/StorageUpdateHandlerTest.java  |   2 +
 7 files changed, 229 insertions(+), 114 deletions(-)
 create mode 100644 
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PendingRows.java



[ignite-3] branch main updated (5ac19cfb95 -> 6ada35b789)

2023-09-05 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from 5ac19cfb95 IGNITE-19710 .NET: Add Data Streamer schema synchronization 
(#2548)
 add 6ada35b789 IGNITE-20303 Fix an issue that could lead to "Raft group on 
the node is already started" (#2519)

No new revisions were added by this update.

Summary of changes:
 .../java/org/apache/ignite/internal/raft/Loza.java |   9 ++
 .../ignite/internal/raft/server/RaftServer.java|   8 +
 .../internal/raft/server/impl/JraftServerImpl.java |   5 +
 .../ignite/internal/replicator/ReplicaManager.java |  10 ++
 .../storage/ItRebalanceDistributedTest.java| 177 +++--
 .../internal/table/distributed/TableManager.java   |  50 +++---
 6 files changed, 226 insertions(+), 33 deletions(-)



[ignite-3] branch main updated: IGNITE-15713 Remove outdated TODO

2023-09-05 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 1fa1caf370 IGNITE-15713 Remove outdated TODO
1fa1caf370 is described below

commit 1fa1caf370f94e791c9728b77452bd7f0333252f
Author: Slava Koptilin 
AuthorDate: Tue Sep 5 14:11:31 2023 +0300

IGNITE-15713 Remove outdated TODO
---
 modules/cli/src/main/java/org/apache/ignite/internal/cli/Main.java | 2 --
 1 file changed, 2 deletions(-)

diff --git a/modules/cli/src/main/java/org/apache/ignite/internal/cli/Main.java 
b/modules/cli/src/main/java/org/apache/ignite/internal/cli/Main.java
index 60e361da8e..e524016560 100644
--- a/modules/cli/src/main/java/org/apache/ignite/internal/cli/Main.java
+++ b/modules/cli/src/main/java/org/apache/ignite/internal/cli/Main.java
@@ -126,9 +126,7 @@ public class Main {
 /**
  * This is a temporary solution to hide unnecessary java util logs that 
are produced by ivy. ConsoleHandler.level should be set to
  * SEVERE.
- * TODO: https://issues.apache.org/jira/browse/IGNITE-15713
  */
-@Deprecated
 private static void initJavaLoggerProps() {
 InputStream propsFile = 
Main.class.getResourceAsStream("/cli.java.util.logging.properties");
 



[ignite-3] branch main updated: IGNITE-14604 Remove outdated TODOs

2023-09-05 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 948f6f1874 IGNITE-14604 Remove outdated TODOs
948f6f1874 is described below

commit 948f6f18743888ed65198d31a0ed809e737f9d09
Author: Slava Koptilin 
AuthorDate: Tue Sep 5 13:44:30 2023 +0300

IGNITE-14604 Remove outdated TODOs
---
 .../configuration/storage/DistributedConfigurationStorage.java| 4 
 1 file changed, 4 deletions(-)

diff --git 
a/modules/runner/src/main/java/org/apache/ignite/internal/configuration/storage/DistributedConfigurationStorage.java
 
b/modules/runner/src/main/java/org/apache/ignite/internal/configuration/storage/DistributedConfigurationStorage.java
index 999d1f49cd..c9d95e84fb 100644
--- 
a/modules/runner/src/main/java/org/apache/ignite/internal/configuration/storage/DistributedConfigurationStorage.java
+++ 
b/modules/runner/src/main/java/org/apache/ignite/internal/configuration/storage/DistributedConfigurationStorage.java
@@ -300,8 +300,6 @@ public class DistributedConfigurationStorage implements 
ConfigurationStorage {
 
 this.lsnr = lsnr;
 
-// TODO: registerPrefixWatch could throw OperationTimeoutException and 
CompactedException and we should
-// TODO: properly handle such cases 
https://issues.apache.org/jira/browse/IGNITE-14604
 metaStorageMgr.registerPrefixWatch(DST_KEYS_START_RANGE, new 
WatchListener() {
 @Override
 public CompletableFuture onUpdate(WatchEvent events) {
@@ -339,8 +337,6 @@ public class DistributedConfigurationStorage implements 
ConfigurationStorage {
 
 @Override
 public void onError(Throwable e) {
-// TODO: need to handle this case and there should some 
mechanism for registering new watch as far as
-// TODO: onError unregisters failed watch 
https://issues.apache.org/jira/browse/IGNITE-14604
 LOG.warn("Meta storage listener issue", e);
 }
 });



[ignite-3] branch main updated: IGNITE-17539 Fix error groups initialization on start-up (#2507)

2023-08-30 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 cfb3b11893 IGNITE-17539 Fix error groups initialization on start-up 
(#2507)
cfb3b11893 is described below

commit cfb3b11893b63ba368061d95ba0645d1b6724625
Author: Slava Koptilin 
AuthorDate: Wed Aug 30 16:41:47 2023 +0300

IGNITE-17539 Fix error groups initialization on start-up (#2507)
---
 .../java/org/apache/ignite/lang/ErrorGroup.java|  80 +-
 .../java/org/apache/ignite/lang/ErrorGroups.java   | 119 ++---
 .../apache/ignite/lang/IgniteCheckedException.java |   4 +-
 .../org/apache/ignite/lang/IgniteException.java|   4 +-
 .../ignite/internal/client/TcpIgniteClient.java|   3 +
 .../lang/IgniteInternalCheckedException.java   |   4 +-
 .../ignite/lang/IgniteInternalException.java   |   4 +-
 .../org/apache/ignite/lang/ErrorGroupTest.java |  13 +++
 .../ErrorGroupsGenerator.cs|   2 +-
 .../dotnet/Apache.Ignite.Tests/ErrorGroupTests.cs  |   4 +-
 .../apache/ignite/internal/app/IgnitionImpl.java   |   3 +
 .../tx/TransactionInternalCheckedException.java|   4 +-
 12 files changed, 139 insertions(+), 105 deletions(-)

diff --git a/modules/api/src/main/java/org/apache/ignite/lang/ErrorGroup.java 
b/modules/api/src/main/java/org/apache/ignite/lang/ErrorGroup.java
index b76cf37b7f..b564afbd2c 100755
--- a/modules/api/src/main/java/org/apache/ignite/lang/ErrorGroup.java
+++ b/modules/api/src/main/java/org/apache/ignite/lang/ErrorGroup.java
@@ -18,12 +18,10 @@
 package org.apache.ignite.lang;
 
 import static java.util.regex.Pattern.DOTALL;
+import static org.apache.ignite.lang.ErrorGroups.errorGroupByCode;
 
-import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
-import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
 import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
 import it.unimi.dsi.fastutil.ints.IntSet;
-import java.util.Locale;
 import java.util.UUID;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -41,9 +39,6 @@ public class ErrorGroup {
 private static final Pattern EXCEPTION_MESSAGE_PATTERN =
 
Pattern.compile("(.*)(IGN)-([A-Z]+)-(\\d+)\\s(TraceId:)([a-f0-9]{8}(?:-[a-f0-9]{4}){4}[a-f0-9]{8})(\\s?)(.*)",
 DOTALL);
 
-/** List of all registered error groups. */
-private static final Int2ObjectMap registeredGroups = new 
Int2ObjectOpenHashMap<>();
-
 /** Group name. */
 private final String groupName;
 
@@ -59,7 +54,7 @@ public class ErrorGroup {
  * @param groupName Group name.
  * @param groupCode Group code.
  */
-private ErrorGroup(String groupName, short groupCode) {
+ErrorGroup(String groupName, short groupCode) {
 this.groupName = groupName;
 this.groupCode = groupCode;
 }
@@ -99,53 +94,6 @@ public class ErrorGroup {
 return (groupCode() << 16) | (errorCode & 0x);
 }
 
-/**
- * Creates a new error group with the given {@code groupName} and {@code 
groupCode}.
- *
- * @param groupName Group name to be created.
- * @param groupCode Group code to be created.
- * @return New error group.
- * @throws IllegalArgumentException If the specified name or group code 
already registered.
- *  Also, this exception is thrown if the given {@code groupName} is 
{@code null} or empty.
- */
-public static synchronized ErrorGroup newGroup(String groupName, short 
groupCode) {
-if (groupName == null || groupName.isEmpty()) {
-throw new IllegalArgumentException("Group name is null or empty");
-}
-
-String grpName = groupName.toUpperCase(Locale.ENGLISH);
-
-if (registeredGroups.containsKey(groupCode)) {
-throw new IllegalArgumentException(
-"Error group already registered [groupName=" + groupName + 
", groupCode=" + groupCode
-+ ", registeredGroup=" + 
registeredGroups.get(groupCode) + ']');
-}
-
-for (ErrorGroup group : registeredGroups.values()) {
-if (group.name().equals(groupName)) {
-throw new IllegalArgumentException(
-"Error group already registered [groupName=" + groupName + 
", groupCode=" + groupCode
-+ ", registeredGroup=" + group + ']');
-}
-}
-
-ErrorGroup newGroup = new ErrorGroup(grpName, groupCode);
-
-registeredGroups.put(groupCode, newGroup);
-
-return newGroup;
-}
-
-/**
- * Returns group code extracted from the given full error code.
- *
- * @param code Full error code.
- * @return Group code.
- */
-public static short extractGroupCode(int code)

[ignite-3] branch main updated (9ba717a670 -> 1f080dd0cd)

2023-08-30 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from 9ba717a670 IGNITE-20266 .NET: Fix MetricsTests flakiness (#2516)
 add 1f080dd0cd IGNITE-20279 Fix asynchronous zone altering in 
DistributionZonesTestUtil. (#2511)

No new revisions were added by this update.

Summary of changes:
 .../internal/distributionzones/DistributionZonesTestUtil.java | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)



[ignite-3] branch main updated (d857cf28ba -> d579c39443)

2023-08-30 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from d857cf28ba IGNITE-20205 Fix race in dummy table (#2495)
 add d579c39443 IGNITE-20260 Fix RaftGroupServiceImpl#readIndex (#2498)

No new revisions were added by this update.

Summary of changes:
 .../org/apache/ignite/raft/server/ItJraftCounterServerTest.java   | 8 
 .../org/apache/ignite/internal/raft/RaftGroupServiceImpl.java | 1 +
 2 files changed, 9 insertions(+)



[ignite-3] branch main updated (e26fc8016d -> d857cf28ba)

2023-08-30 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from e26fc8016d IGNITE-20290 Command reordering wrt safe time in 
MetaStorage (#2506)
 add d857cf28ba IGNITE-20205 Fix race in dummy table (#2495)

No new revisions were added by this update.

Summary of changes:
 .../apache/ignite/internal/table/TxLocalTest.java  |  6 ---
 .../table/impl/DummyInternalTableImpl.java | 62 --
 2 files changed, 33 insertions(+), 35 deletions(-)



[ignite-3] branch main updated (59107180be -> cba48c77ea)

2023-08-29 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from 59107180be IGNITE-19788 Sql. Change QueryBatchMessage serialization 
(#2476)
 add cba48c77ea IGNITE-20272 Clean up of 
DistributionZoneManagerWatchListenerTest (#2490)

No new revisions were added by this update.

Summary of changes:
 ...butionZoneManagerLogicalTopologyEventsTest.java |  28 ++
 .../DistributionZoneManagerWatchListenerTest.java  | 109 -
 2 files changed, 28 insertions(+), 109 deletions(-)
 delete mode 100644 
modules/distribution-zones/src/test/java/org/apache/ignite/internal/distributionzones/DistributionZoneManagerWatchListenerTest.java



[ignite-3] branch main updated: IGNITE-20054 Disabled tests in ItIgniteDistributionZoneManagerNodeRestartTest were fixed. (#2425)

2023-08-28 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 5f5d592494 IGNITE-20054 Disabled tests in 
ItIgniteDistributionZoneManagerNodeRestartTest were fixed. (#2425)
5f5d592494 is described below

commit 5f5d592494b8eac71e62e70a8dfb470d8f320800
Author: Sergey Uttsel 
AuthorDate: Mon Aug 28 10:23:59 2023 +0300

IGNITE-20054 Disabled tests in 
ItIgniteDistributionZoneManagerNodeRestartTest were fixed. (#2425)
---
 ...niteDistributionZoneManagerNodeRestartTest.java | 64 +-
 1 file changed, 51 insertions(+), 13 deletions(-)

diff --git 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/distribution/zones/ItIgniteDistributionZoneManagerNodeRestartTest.java
 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/distribution/zones/ItIgniteDistributionZoneManagerNodeRestartTest.java
index 06482bb2c9..c0d289fd47 100644
--- 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/distribution/zones/ItIgniteDistributionZoneManagerNodeRestartTest.java
+++ 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/distribution/zones/ItIgniteDistributionZoneManagerNodeRestartTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.distribution.zones;
 
+import static java.util.Collections.emptySet;
 import static java.util.concurrent.CompletableFuture.completedFuture;
 import static java.util.stream.Collectors.toSet;
 import static 
org.apache.ignite.internal.distributionzones.DistributionZoneManager.DEFAULT_ZONE_NAME;
@@ -92,7 +93,6 @@ import org.apache.ignite.network.NettyBootstrapFactory;
 import org.apache.ignite.network.NetworkAddress;
 import org.apache.ignite.network.scalecube.TestScaleCubeClusterServiceFactory;
 import org.jetbrains.annotations.Nullable;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
 import org.junit.jupiter.params.ParameterizedTest;
@@ -378,7 +378,6 @@ public class ItIgniteDistributionZoneManagerNodeRestartTest 
extends BaseIgniteRe
 assertDataNodesFromManager(distributionZoneManager, () -> 
revisionBeforeRestart, zoneId, Set.of(A), TIMEOUT_MILLIS);
 }
 
-@Disabled("https://issues.apache.org/jira/browse/IGNITE-20054";)
 @ParameterizedTest
 @MethodSource("provideArgumentsRestartTests")
 public void testScaleUpTimerIsRestoredAfterRestart(String zoneName) throws 
Exception {
@@ -407,11 +406,11 @@ public class 
ItIgniteDistributionZoneManagerNodeRestartTest extends BaseIgniteRe
 node.logicalTopology().putNode(C);
 node.logicalTopology().removeNodes(Set.of(B));
 
-assertDataNodesFromManager(
-distributionZoneManager,
-metastore::appliedRevision,
-zoneId,
-Set.of(A),
+assertValueInStorage(
+metastore,
+zoneDataNodesKey(zoneId),
+(v) -> 
DistributionZonesUtil.dataNodes(fromBytes(v)).stream().map(Node::nodeName).collect(toSet()),
+Set.of(A.name()),
 TIMEOUT_MILLIS
 );
 
@@ -422,9 +421,18 @@ public class 
ItIgniteDistributionZoneManagerNodeRestartTest extends BaseIgniteRe
 distributionZoneManager = getDistributionZoneManager(node);
 
 assertDataNodesFromManager(distributionZoneManager, 
metastore::appliedRevision, zoneId, Set.of(A, C), TIMEOUT_MILLIS);
+
+metastore = findComponent(node.startedComponents(), 
MetaStorageManager.class);
+
+assertValueInStorage(
+metastore,
+zoneDataNodesKey(zoneId),
+(v) -> 
DistributionZonesUtil.dataNodes(fromBytes(v)).stream().map(Node::nodeName).collect(toSet()),
+Set.of(A.name(), C.name()),
+TIMEOUT_MILLIS
+);
 }
 
-@Disabled("https://issues.apache.org/jira/browse/IGNITE-20054";)
 @ParameterizedTest
 @MethodSource("provideArgumentsRestartTests")
 public void 
testScaleUpTriggeredByFilterUpdateIsRestoredAfterRestart(String zoneName) 
throws Exception {
@@ -453,7 +461,13 @@ public class 
ItIgniteDistributionZoneManagerNodeRestartTest extends BaseIgniteRe
 
 alterZone(node, zoneName, null, null, filter);
 
-assertDataNodesFromManager(distributionZoneManager, 
metastore::appliedRevision, zoneId, Set.of(A), TIMEOUT_MILLIS);
+assertValueInStorage(
+metastore,
+zoneDataNodesKey(zoneId),
+(v) -> 
DistributionZonesUtil.dataNodes(fromBytes(v)).stream().map(Node::nodeName).collect(toSet()),
+Set.of(A.name()),
+TIMEOUT_MILLIS
+);
 
 node.stop();
 
@@ -464,7 +478,6 @@ public class ItIgniteDistribu

[ignite-3] branch main updated (b191cf8c42 -> 4a5b7357d6)

2023-08-22 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from b191cf8c42 IGNITE-19983 C++: Support BOOLEAN datatype (#2481)
 add 4a5b7357d6 IGNITE-19995 
PendingComparableValuesTrackerTest#testMultithreadedWaitFor fails with 
ConcurrentModificationException (#2482)

No new revisions were added by this update.

Summary of changes:
 .../internal/util/PendingIndependentComparableValuesTracker.java  | 4 ++--
 .../ignite/internal/util/PendingComparableValuesTrackerTest.java  | 3 ---
 2 files changed, 2 insertions(+), 5 deletions(-)



[ignite-3] branch main updated (c8e47892b9 -> 7e0987afe1)

2023-08-22 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from c8e47892b9 IGNITE-19711 Add a note for CREATE INDEX (#2362)
 add 7e0987afe1 IGNITE-19920 Fix ALTER TABLE syntax (#2361)

No new revisions were added by this update.

Summary of changes:
 docs/_docs/sql-reference/ddl.adoc | 21 ++---
 1 file changed, 2 insertions(+), 19 deletions(-)



[ignite-3] branch main updated (f72bf5f036 -> c8e47892b9)

2023-08-22 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from f72bf5f036 IGNITE-20261 Configure Xmx for unit tests (#2474)
 add c8e47892b9 IGNITE-19711 Add a note for CREATE INDEX (#2362)

No new revisions were added by this update.

Summary of changes:
 docs/_docs/sql-reference/ddl.adoc | 2 ++
 1 file changed, 2 insertions(+)



[ignite-3] branch main updated: IGNITE 19148 Switch tests from using JUL to log4j2 (#2429)

2023-08-21 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 e32fd8d092 IGNITE 19148 Switch tests from using JUL to log4j2 (#2429)
e32fd8d092 is described below

commit e32fd8d092ed1a3074013dcd2cb64f2b1b50ab18
Author: Slava Koptilin 
AuthorDate: Mon Aug 21 13:48:41 2023 +0300

IGNITE 19148 Switch tests from using JUL to log4j2 (#2429)
---
 build.gradle   |   1 -
 buildscripts/java-integration-test.gradle  |   5 +
 buildscripts/java-junit5.gradle|   5 +
 buildscripts/java-test-fixtures.gradle |   5 +
 config/java.util.logging.properties|  57 
 gradle/libs.versions.toml  |   7 +
 modules/catalog/build.gradle   |   1 -
 .../cli/commands/ItClusterCommandTest.java |  44 +--
 modules/client-handler/build.gradle|   1 -
 modules/cluster-management/build.gradle|   1 -
 modules/configuration-presentation/build.gradle|   1 -
 .../testframework/BaseIgniteAbstractTest.java  |  14 -
 .../internal/testframework/jul/NoOpHandler.java|  36 --
 .../testframework/log4j2/LogInspector.java | 364 +
 .../resources/java.util.logging.properties |  57 
 .../src/testFixtures/resources/log4j2-test.xml |  58 
 modules/index/build.gradle |   1 -
 modules/network/build.gradle   |   3 +-
 .../scalecube/ItScaleCubeNetworkMessagingTest.java |  36 +-
 modules/raft/build.gradle  |   1 -
 modules/rest/build.gradle  |   1 -
 modules/runner/build.gradle|   1 -
 .../raftsnapshot/ItTableRaftSnapshotsTest.java |  69 ++--
 .../apache/ignite/internal/start/ItStartTest.java  |  42 ++-
 modules/sql-engine/build.gradle|   1 -
 modules/table/build.gradle |   1 -
 26 files changed, 529 insertions(+), 284 deletions(-)

diff --git a/build.gradle b/build.gradle
index 974560658a..bd9d33f11f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -67,7 +67,6 @@ allprojects {
 "--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED",
 "--add-opens=java.base/sun.security.x509=ALL-UNNAMED",
 "-Dio.netty.tryReflectionSetAccessible=true",
-
"-Djava.util.logging.config.file=${project.rootDir}/config/java.util.logging.properties",
 "-XX:+HeapDumpOnOutOfMemoryError"]
 
 systemProperty 'jraft.available_processors', 1
diff --git a/buildscripts/java-integration-test.gradle 
b/buildscripts/java-integration-test.gradle
index 173598386d..b683fdb3db 100644
--- a/buildscripts/java-integration-test.gradle
+++ b/buildscripts/java-integration-test.gradle
@@ -35,6 +35,11 @@ testing {
 implementation libs.hamcrest.core
 implementation libs.hamcrest.optional
 implementation libs.hamcrest.path
+
+implementation libs.jansi.core
+implementation libs.log4j.api
+implementation libs.log4j.core
+implementation libs.log4j.bridge
 }
 
 sources {
diff --git a/buildscripts/java-junit5.gradle b/buildscripts/java-junit5.gradle
index f233c06084..f29fc1d6fa 100644
--- a/buildscripts/java-junit5.gradle
+++ b/buildscripts/java-junit5.gradle
@@ -33,4 +33,9 @@ dependencies {
 testImplementation libs.junit5.impl
 testImplementation libs.junit5.api
 testImplementation libs.junit5.params
+
+testImplementation libs.jansi.core
+testImplementation libs.log4j.api
+testImplementation libs.log4j.core
+testImplementation libs.log4j.bridge
 }
diff --git a/buildscripts/java-test-fixtures.gradle 
b/buildscripts/java-test-fixtures.gradle
index 49ec0f1f60..17feb22e60 100644
--- a/buildscripts/java-test-fixtures.gradle
+++ b/buildscripts/java-test-fixtures.gradle
@@ -20,6 +20,11 @@ apply plugin: 'java-test-fixtures'
 dependencies {
 testFixturesImplementation libs.junit5.api
 testFixturesImplementation libs.junit5.impl
+
+testFixturesImplementation libs.jansi.core
+testFixturesImplementation libs.log4j.api
+testFixturesImplementation libs.log4j.core
+testFixturesImplementation libs.log4j.bridge
 }
 
 pmdTestFixtures {
diff --git a/config/java.util.logging.properties 
b/config/java.util.logging.properties
deleted file mode 100644
index 9a4ef63f5f..00
--- a/config/java.util.logging.properties
+++ /dev/null
@@ -1,57 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this wor

[ignite] branch master updated: IGNITE-15742 Specified time units for IgniteCluster.baselineAutoAdjustEnabled (#10723)

2023-08-17 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 61a4a48e7b5 IGNITE-15742 Specified time units for 
IgniteCluster.baselineAutoAdjustEnabled (#10723)
61a4a48e7b5 is described below

commit 61a4a48e7b521b22be31b32b308165fad7abe491
Author: Venkatesh Prasad Kannan 
AuthorDate: Thu Aug 17 12:34:25 2023 +0100

IGNITE-15742 Specified time units for 
IgniteCluster.baselineAutoAdjustEnabled (#10723)
---
 modules/core/src/main/java/org/apache/ignite/IgniteCluster.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java 
b/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
index 26147cd02d4..eb1dd7bd74b 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
@@ -627,14 +627,14 @@ public interface IgniteCluster extends ClusterGroup, 
IgniteAsyncSupport {
 public void baselineAutoAdjustEnabled(boolean baselineAutoAdjustEnabled) 
throws IgniteException;
 
 /**
- * @return Value of time which we would wait before the actual topology 
change since last server topology change
+ * @return Number of milliseconds to wait before the actual topology 
change since last server topology change
  * (node join/left/fail).
  * @throws IgniteException If operation failed.
  */
 public long baselineAutoAdjustTimeout();
 
 /**
- * @param baselineAutoAdjustTimeout Value of time which we would wait 
before the actual topology change since last
+ * @param baselineAutoAdjustTimeout Number of milliseconds to wait before 
the actual topology change since last
  * server topology change (node join/left/fail).
  * @throws IgniteException If failed.
  */



[ignite-3] branch main updated: IGNITE-16700 Fix flaky ItTxDistributedTestThreeNodesThreeReplicas#testBalance (#2439)

2023-08-17 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 641b340d76 IGNITE-16700 Fix flaky 
ItTxDistributedTestThreeNodesThreeReplicas#testBalance (#2439)
641b340d76 is described below

commit 641b340d76270e8c9f7623a4a856d0933617fc11
Author: Denis Chudov 
AuthorDate: Thu Aug 17 13:05:41 2023 +0300

IGNITE-16700 Fix flaky 
ItTxDistributedTestThreeNodesThreeReplicas#testBalance (#2439)
---
 .../distributed/ItTxDistributedTestSingleNode.java |  3 ++-
 .../org/apache/ignite/internal/table/TxLocalTest.java  |  6 ++
 .../apache/ignite/internal/table/TxAbstractTest.java   | 18 ++
 3 files changed, 18 insertions(+), 9 deletions(-)

diff --git 
a/modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItTxDistributedTestSingleNode.java
 
b/modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItTxDistributedTestSingleNode.java
index b45566ec17..2abef1ee43 100644
--- 
a/modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItTxDistributedTestSingleNode.java
+++ 
b/modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItTxDistributedTestSingleNode.java
@@ -138,7 +138,8 @@ import org.junit.jupiter.api.extension.ExtendWith;
  */
 @ExtendWith(ConfigurationExtension.class)
 public class ItTxDistributedTestSingleNode extends TxAbstractTest {
-@InjectConfiguration
+//TODO fsync can be turned on again after 
https://issues.apache.org/jira/browse/IGNITE-20195
+@InjectConfiguration("mock: { fsync: false }")
 private static RaftConfiguration raftConfiguration;
 
 @InjectConfiguration
diff --git 
a/modules/table/src/test/java/org/apache/ignite/internal/table/TxLocalTest.java 
b/modules/table/src/test/java/org/apache/ignite/internal/table/TxLocalTest.java
index 64cdcb87ab..39d5335f18 100644
--- 
a/modules/table/src/test/java/org/apache/ignite/internal/table/TxLocalTest.java
+++ 
b/modules/table/src/test/java/org/apache/ignite/internal/table/TxLocalTest.java
@@ -139,6 +139,12 @@ public class TxLocalTest extends TxAbstractTest {
 // TODO asch IGNITE-15928 implement local scan
 }
 
+@Disabled("https://issues.apache.org/jira/browse/IGNITE-20205";)
+@Override
+public void testBalance() throws InterruptedException {
+super.testBalance();
+}
+
 @Override
 protected TxManager clientTxManager() {
 return txManager;
diff --git 
a/modules/table/src/testFixtures/java/org/apache/ignite/internal/table/TxAbstractTest.java
 
b/modules/table/src/testFixtures/java/org/apache/ignite/internal/table/TxAbstractTest.java
index c39638ebb0..44f1dea58a 100644
--- 
a/modules/table/src/testFixtures/java/org/apache/ignite/internal/table/TxAbstractTest.java
+++ 
b/modules/table/src/testFixtures/java/org/apache/ignite/internal/table/TxAbstractTest.java
@@ -1223,7 +1223,6 @@ public abstract class TxAbstractTest extends 
IgniteAbstractTest {
 }
 
 @Test
-@Disabled("https://issues.apache.org/jira/browse/IGNITE-16700";)
 public void testBalance() throws InterruptedException {
 doTestSingleKeyMultithreaded(5_000, false);
 }
@@ -1501,16 +1500,18 @@ public abstract class TxAbstractTest extends 
IgniteAbstractTest {
 
 Thread[] threads = new Thread[threadsCnt];
 
+final int accountsCount = threads.length * 10;
+
 final double initial = 1000;
-final double total = threads.length * initial;
+final double total = accountsCount * initial;
 
-for (int i = 0; i < threads.length; i++) {
+for (int i = 0; i < accountsCount; i++) {
 accounts.recordView().upsert(null, makeValue(i, 1000));
 }
 
 double total0 = 0;
 
-for (long i = 0; i < threads.length; i++) {
+for (long i = 0; i < accountsCount; i++) {
 double balance = accounts.recordView().get(null, 
makeKey(i)).doubleValue("balance");
 
 total0 += balance;
@@ -1530,7 +1531,6 @@ public abstract class TxAbstractTest extends 
IgniteAbstractTest {
 AtomicReference firstErr = new AtomicReference<>();
 
 for (int i = 0; i < threads.length; i++) {
-long finalI = i;
 threads[i] = new Thread(new Runnable() {
 @Override
 public void run() {
@@ -1546,7 +1546,7 @@ public abstract class TxAbstractTest extends 
IgniteAbstractTest {
 var table = accounts.recordView();
 
 try {
-long acc1 = finalI;
+long acc1 = r.nextInt(accountsCount);
 
 double amount = 100 + r.nextInt(500);
 
@@ -1559,7 +1559,7 @@ public abstract class TxAbstractTest extends 
Ignit

[ignite-3] branch main updated: IGNITE-20058 Flaky distribution zone tests were fixed by fixing order of the meta storage watches deploying and a distribution zone manager start (#2400)

2023-08-07 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 23d886ad2a IGNITE-20058 Flaky distribution zone tests were fixed by 
fixing order of the meta storage watches deploying and a distribution zone 
manager start (#2400)
23d886ad2a is described below

commit 23d886ad2ab93dcc88f6899cd3e738d991f1979e
Author: Sergey Uttsel 
AuthorDate: Mon Aug 7 11:30:49 2023 +0300

IGNITE-20058 Flaky distribution zone tests were fixed by fixing order of 
the meta storage watches deploying and a distribution zone manager start (#2400)
---
 .../distributionzones/DistributionZoneManager.java | 14 +--
 .../BaseDistributionZoneManagerTest.java   |  7 +++---
 .../DistributionZoneManagerAlterFilterTest.java|  5 
 ...ibutionZoneManagerConfigurationChangesTest.java |  7 ++
 .../DistributionZonesTestUtil.java | 29 --
 5 files changed, 11 insertions(+), 51 deletions(-)

diff --git 
a/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
 
b/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
index adef274358..3bf87f766a 100644
--- 
a/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
+++ 
b/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
@@ -719,12 +719,12 @@ public class DistributionZoneManager implements 
IgniteComponent {
 if (newScaleDown != INFINITE_TIMER_VALUE) {
 Optional highestRevision = 
zoneState.highestRevision(false);
 
-assert highestRevision.isEmpty() || ctx.storageRevision() >= 
highestRevision.get() : "Expected revision that "
+assert highestRevision.isEmpty() || revision >= 
highestRevision.get() : "Expected revision that "
 + "is greater or equal to already seen meta storage 
events.";
 
 zoneState.rescheduleScaleDown(
 newScaleDown,
-() -> saveDataNodesToMetaStorageOnScaleDown(zoneId, 
ctx.storageRevision()),
+() -> saveDataNodesToMetaStorageOnScaleDown(zoneId, 
revision),
 zoneId
 );
 } else {
@@ -759,20 +759,18 @@ public class DistributionZoneManager implements 
IgniteComponent {
 
 VaultEntry filterUpdateRevision = 
vaultMgr.get(zonesFilterUpdateRevision()).join();
 
-long eventRevision = ctx.storageRevision();
-
 if (filterUpdateRevision != null) {
 // This means that we have already handled event with this 
revision.
 // It is possible when node was restarted after this listener 
completed,
 // but applied revision didn't have time to be propagated to 
the Vault.
-if (bytesToLong(filterUpdateRevision.value()) >= 
eventRevision) {
+if (bytesToLong(filterUpdateRevision.value()) >= revision) {
 return completedFuture(null);
 }
 }
 
-vaultMgr.put(zonesFilterUpdateRevision(), 
longToBytes(eventRevision)).join();
+vaultMgr.put(zonesFilterUpdateRevision(), 
longToBytes(revision)).join();
 
-saveDataNodesToMetaStorageOnScaleUp(zoneId, eventRevision);
+saveDataNodesToMetaStorageOnScaleUp(zoneId, revision);
 
 causalityDataNodesEngine.onUpdateFilter(revision, zoneId, filter);
 
@@ -800,7 +798,7 @@ public class DistributionZoneManager implements 
IgniteComponent {
 
 zoneState.stopTimers();
 
-removeTriggerKeysAndDataNodes(zoneId, ctx.storageRevision());
+removeTriggerKeysAndDataNodes(zoneId, revision);
 
 causalityDataNodesEngine.onDelete(revision, zoneId);
 
diff --git 
a/modules/distribution-zones/src/test/java/org/apache/ignite/internal/distributionzones/BaseDistributionZoneManagerTest.java
 
b/modules/distribution-zones/src/test/java/org/apache/ignite/internal/distributionzones/BaseDistributionZoneManagerTest.java
index 366e51b796..01d01f70d0 100644
--- 
a/modules/distribution-zones/src/test/java/org/apache/ignite/internal/distributionzones/BaseDistributionZoneManagerTest.java
+++ 
b/modules/distribution-zones/src/test/java/org/apache/ignite/internal/distributionzones/BaseDistributionZoneManagerTest.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.distributionzones;
 
 import static java.util.concurrent.CompletableFuture.completedFuture;
-import static 
org.apache.ignite.internal.distributionzones.DistributionZonesTestUtil.deployWatchesAndUpdateMetaSto

[ignite-3] branch main updated (6546bc46f9 -> 5d9494fc7a)

2023-08-07 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from 6546bc46f9 IGNITE-20128: Clean up ignored SQL tests (#2392)
 add 5d9494fc7a IGNITE-19783 StripedScheduledExecutorService is created for 
DistributionZoneManager#executor (#2380)

No new revisions were added by this update.

Summary of changes:
 ...java => AbstractStripedThreadPoolExecutor.java} | 109 --
 .../thread/StripedScheduledThreadPoolExecutor.java | 105 +
 .../internal/thread/StripedThreadPoolExecutor.java | 196 ++---
 .../distributionzones/DistributionZoneManager.java |  42 ++--
 .../distributionzones/DistributionZonesUtil.java   |  13 +-
 .../DistributionZoneManagerScaleUpTest.java|  11 +-
 .../DistributionZonesSchedulersTest.java   | 237 ++---
 .../DistributionZoneCausalityDataNodesTest.java|  24 ++-
 8 files changed, 377 insertions(+), 360 deletions(-)
 copy 
modules/core/src/main/java/org/apache/ignite/internal/thread/{StripedThreadPoolExecutor.java
 => AbstractStripedThreadPoolExecutor.java} (64%)
 create mode 100644 
modules/core/src/main/java/org/apache/ignite/internal/thread/StripedScheduledThreadPoolExecutor.java



[ignite] branch master updated: IGNITE-19647 Cleared up Cache Template docs (#10853)

2023-07-27 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 dc011c75583 IGNITE-19647 Cleared up Cache Template docs (#10853)
dc011c75583 is described below

commit dc011c75583362de4afbfa393c6d815223f649e6
Author: IgGusev 
AuthorDate: Thu Jul 27 13:22:09 2023 +0400

IGNITE-19647 Cleared up Cache Template docs (#10853)
---
 docs/_docs/configuring-caches/configuration-overview.adoc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/_docs/configuring-caches/configuration-overview.adoc 
b/docs/_docs/configuring-caches/configuration-overview.adoc
index 1a6c9551495..00541fd95a4 100644
--- a/docs/_docs/configuring-caches/configuration-overview.adoc
+++ b/docs/_docs/configuring-caches/configuration-overview.adoc
@@ -123,9 +123,9 @@ tab:C++[unsupported]
 == Cache Templates
 A cache template is an instance of `CacheConfiguration` that can be registered 
in the cluster and used later as a basis for creating new caches or SQL tables. 
A cache or table created from a template inherits all the properties of the 
template.
 
-Templates are useful when creating a table using the 
link:sql-reference/ddl#create-table[CREATE TABLE] command, because the command 
does not support all available cache parameters.
+A cache template is an instance of `CacheConfiguration` that can be registered 
in the cluster and used later as a basis for creating new caches or SQL tables. 
A cache or table created from a template inherits all the properties of the 
template.
 
-NOTE: Currently, templates are supported for the CREATE TABLE and REST 
commands.
+Templates can be used in many contexts: on servers, clients (thin and thick), 
in SQL (e.g., CREATE TABLE), in commands such as `createCache` and 
`getOrCreateCache`, as well as in the REST API calls. For example, thin clients 
and SQL do not support some cache configuration properties, and cache templates 
can be used to work around this limitation.
 
 To create a template, define a cache configuration and add it to the `Ignite` 
instance, as shown below. If you want do define a cache template in the XML 
configuration file, you must add an asterisk to the template's name. This is 
required to indicate that the configuration is a template and not an actual 
cache.
 



[ignite] branch master updated: IGNITE-20008 FIxed awkward code boxes in rest docs (#10848)

2023-07-20 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 c9f4d5404df IGNITE-20008 FIxed awkward code boxes in rest docs (#10848)
c9f4d5404df is described below

commit c9f4d5404df2632ad0138b110ca4d383206f4b43
Author: IgGusev 
AuthorDate: Thu Jul 20 17:35:40 2023 +0300

IGNITE-20008 FIxed awkward code boxes in rest docs (#10848)
---
 docs/_docs/restapi.adoc | 33 +
 1 file changed, 9 insertions(+), 24 deletions(-)

diff --git a/docs/_docs/restapi.adoc b/docs/_docs/restapi.adoc
index b92d5bd0300..a206e9be617 100644
--- a/docs/_docs/restapi.adoc
+++ b/docs/_docs/restapi.adoc
@@ -141,17 +141,7 @@ In the above connection string, replace `[host]`, 
`[port]`, and `[sessionToken]`
 [WARNING]
 
 Either user credentials or a session token is required when authentication is 
enabled on the server.
-Failure to provide either a `sessionToken` or `user` & `password` parameters 
in the REST connection string results in an error:
-
-[source, json]
-
-{
-"successStatus":2,
-"sessionToken":null,
-"error":"Failed to handle request - session token not found or invalid",
-"response":null
-}
-
+Failure to provide either a `sessionToken` or `user` & `password` parameters 
in the REST connection string results in an error.
 
 
 
@@ -160,17 +150,7 @@ Failure to provide either a `sessionToken` or `user` & 
`password` parameters in
 [discrete]
 === Session Token Expiration
 
-A session token is valid only for 30 seconds. Using an expired session token 
results in an error, like the one below:
-
-[source, json]
-
-{
-"successStatus":1,
-"error":"Failed to handle request - unknown session token (maybe expired 
session) [sesTok=12FFFD4827D149068E9FFF59700E5FDA]",
-"sessionToken":null,
-"response":null
-}
-
+A session token is valid only for 30 seconds. Using an expired session token 
results in an error.
 
 To set a custom expire time, set the system variable: 
`IGNITE_REST_SESSION_TIMEOUT` (in seconds).
 
@@ -293,9 +273,9 @@ 
link:/docs/data-modeling/data-modeling#binary-object-format[binary object] forma
 * If the `Person` class is not available on the server’s classpath, but there 
is a `QueryEntity` object that defines
 the `Person`, then the JSON object is resolved to a binary object of that 
`Person` type:
 +
-[%header, cols="2"]
+[%header, cols="1"]
 |===
-|Query entity|Binary Object (Person)
+|Query entity
 a|
 [source,xml]
 
@@ -313,6 +293,11 @@ a|
 
 
 
+|===
++
+[%header, cols="1"]
+|===
+|Binary Object (Person)
 a|
 [source,javascript]
 



[ignite-3] branch main updated (45ab580e4e -> 93ebaf441b)

2023-07-14 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from 45ab580e4e IGNITE-19985 Allow single empty line at the end of the SQL 
test script (#2320)
 add 93ebaf441b IGNITE-19928 Change error and group codes from int to short 
(#2300)

No new revisions were added by this update.

Summary of changes:
 .../apache/ignite/lang/IgniteCheckedException.java |  12 +-
 .../org/apache/ignite/lang/IgniteException.java|  12 +-
 .../ignite/lang/IgniteExceptionMapperUtilTest.java |   6 +-
 .../exception/handler/SqlExceptionHandler.java |  10 +-
 .../java/org/apache/ignite/lang/ErrorGroup.java|  57 +++--
 .../java/org/apache/ignite/lang/ErrorGroups.java   | 236 ++---
 .../lang/IgniteInternalCheckedException.java   |  14 +-
 .../ignite/lang/IgniteInternalException.java   |  12 +-
 .../org/apache/ignite/lang/TraceableException.java |   4 +-
 .../org/apache/ignite/lang/ErrorGroupTest.java |   8 +-
 .../ErrorGroupsGenerator.cs|  10 +-
 .../dotnet/Apache.Ignite.Tests/ErrorGroupTests.cs  |  16 +-
 .../platforms/dotnet/Apache.Ignite/ErrorGroups.cs  |   7 +-
 .../dotnet/Apache.Ignite/IgniteException.cs|   2 +-
 .../tx/TransactionInternalCheckedException.java|  29 ++-
 15 files changed, 219 insertions(+), 216 deletions(-)



[ignite-3] branch main updated: IGNITE-18959 Placement driver's local map cleanup on assingments removal (#2292)

2023-07-12 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 1910afa0b1 IGNITE-18959 Placement driver's local map cleanup on 
assingments removal (#2292)
1910afa0b1 is described below

commit 1910afa0b1aec6b0f97330532303f237f75db029
Author: Denis Chudov 
AuthorDate: Wed Jul 12 13:38:09 2023 +0300

IGNITE-18959 Placement driver's local map cleanup on assingments removal 
(#2292)
---
 .../ignite/internal/metastorage/MetaStorageManager.java   | 10 ++
 .../internal/metastorage/impl/MetaStorageManagerImpl.java |  2 ++
 .../internal/placementdriver/AssignmentsTracker.java  |  2 +-
 .../placementdriver/negotiation/LeaseNegotiator.java  | 11 +--
 .../java/org/apache/ignite/internal/app/IgniteImpl.java   | 12 ++--
 .../ignite/internal/table/distributed/TableManager.java   | 15 +++
 6 files changed, 39 insertions(+), 13 deletions(-)

diff --git 
a/modules/metastorage-api/src/main/java/org/apache/ignite/internal/metastorage/MetaStorageManager.java
 
b/modules/metastorage-api/src/main/java/org/apache/ignite/internal/metastorage/MetaStorageManager.java
index fb37f7f1ab..54453fbff0 100644
--- 
a/modules/metastorage-api/src/main/java/org/apache/ignite/internal/metastorage/MetaStorageManager.java
+++ 
b/modules/metastorage-api/src/main/java/org/apache/ignite/internal/metastorage/MetaStorageManager.java
@@ -131,6 +131,16 @@ public interface MetaStorageManager extends 
IgniteComponent {
  */
 CompletableFuture putAll(Map vals);
 
+/**
+ * Removes an entry for the given key.
+ */
+CompletableFuture remove(ByteArray key);
+
+/**
+ * Removes entries for given keys.
+ */
+CompletableFuture removeAll(Set keys);
+
 /**
  * Retrieves entries for the given key prefix in lexicographic order. 
Shortcut for {@link #prefix(ByteArray, long)} where
  * {@code revUpperBound = LATEST_REVISION}.
diff --git 
a/modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/impl/MetaStorageManagerImpl.java
 
b/modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/impl/MetaStorageManagerImpl.java
index 10ec576f1a..8d810e6044 100644
--- 
a/modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/impl/MetaStorageManagerImpl.java
+++ 
b/modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/impl/MetaStorageManagerImpl.java
@@ -638,6 +638,7 @@ public class MetaStorageManagerImpl implements 
MetaStorageManager {
  *
  * @see MetaStorageService#remove(ByteArray)
  */
+@Override
 public CompletableFuture remove(ByteArray key) {
 if (!busyLock.enterBusy()) {
 return CompletableFuture.failedFuture(new NodeStoppingException());
@@ -672,6 +673,7 @@ public class MetaStorageManagerImpl implements 
MetaStorageManager {
  *
  * @see MetaStorageService#removeAll(Set)
  */
+@Override
 public CompletableFuture removeAll(Set keys) {
 if (!busyLock.enterBusy()) {
 return CompletableFuture.failedFuture(new NodeStoppingException());
diff --git 
a/modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/AssignmentsTracker.java
 
b/modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/AssignmentsTracker.java
index cc197a44a5..c8a3542421 100644
--- 
a/modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/AssignmentsTracker.java
+++ 
b/modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/AssignmentsTracker.java
@@ -144,7 +144,7 @@ public class AssignmentsTracker {
 var replicationGrpId = TablePartitionId.fromString(
 new String(evt.newEntry().key(), 
StandardCharsets.UTF_8).replace(STABLE_ASSIGNMENTS_PREFIX, ""));
 
-if (evt.newEntry().empty()) {
+if (evt.newEntry().tombstone()) {
 groupAssignments.remove(replicationGrpId);
 } else {
 Set prevAssignment = 
groupAssignments.put(replicationGrpId, 
ByteUtils.fromBytes(evt.newEntry().value()));
diff --git 
a/modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/negotiation/LeaseNegotiator.java
 
b/modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/negotiation/LeaseNegotiator.java
index dbd3326fc5..ffcd828fa8 100644
--- 
a/modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/negotiation/LeaseNegotiator.java
+++ 
b/modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/negotiation/LeaseNegotiator.java
@@ -22,6 +22,8 @@ import static 
org.apache.ignite.internal.placementdriver.negotiation.LeaseAgreem
 import ja

[ignite-3] branch main updated (5b1b2d3b37 -> 37a0ee3831)

2023-07-10 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from 5b1b2d3b37 IGNITE-19932 Simplify handleChangePendingAssignmentEvent in 
TableManager (#2299)
 add 37a0ee3831 IGNITE-19865 Fix propagating trace identifier (#2291)

No new revisions were added by this update.

Summary of changes:
 .../apache/ignite/lang/IgniteCheckedException.java |   9 +-
 .../org/apache/ignite/lang/IgniteException.java|   9 +-
 .../apache/ignite/lang/IgniteExceptionUtils.java   |   6 +-
 .../apache/ignite/lang/IgniteExceptionTest.java| 100 +++--
 .../ignite/internal/util/ExceptionUtils.java   |  30 +++
 .../lang/IgniteInternalCheckedException.java   |   9 +-
 .../ignite/lang/IgniteInternalException.java   |   9 +-
 7 files changed, 146 insertions(+), 26 deletions(-)



[ignite-3] branch main updated: IGNITE-19864 Introduce TraceableException (#2287)

2023-07-05 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 6145deb7d9 IGNITE-19864 Introduce TraceableException (#2287)
6145deb7d9 is described below

commit 6145deb7d99ebde954e5d2b2f46609a9c521c209
Author: Slava Koptilin 
AuthorDate: Wed Jul 5 18:20:51 2023 +0300

IGNITE-19864 Introduce TraceableException (#2287)
---
 .../apache/ignite/lang/IgniteCheckedException.java |  6 ++-
 .../org/apache/ignite/lang/IgniteException.java|  6 ++-
 .../apache/ignite/lang/IgniteExceptionUtils.java   | 25 ++
 .../handler/ClientInboundMessageHandler.java   | 10 ++--
 .../lang/IgniteInternalCheckedException.java   |  6 ++-
 .../ignite/lang/IgniteInternalException.java   |  6 ++-
 .../org/apache/ignite/lang/TraceableException.java | 57 ++
 7 files changed, 85 insertions(+), 31 deletions(-)

diff --git 
a/modules/api/src/main/java/org/apache/ignite/lang/IgniteCheckedException.java 
b/modules/api/src/main/java/org/apache/ignite/lang/IgniteCheckedException.java
index c8a3b94277..9c736cb4fb 100755
--- 
a/modules/api/src/main/java/org/apache/ignite/lang/IgniteCheckedException.java
+++ 
b/modules/api/src/main/java/org/apache/ignite/lang/IgniteCheckedException.java
@@ -28,7 +28,7 @@ import java.util.UUID;
 /**
  * General Ignite exception. Used to indicate any error condition within a 
node.
  */
-public class IgniteCheckedException extends Exception {
+public class IgniteCheckedException extends Exception implements 
TraceableException {
 /** Serial version UID. */
 private static final long serialVersionUID = 0L;
 
@@ -165,6 +165,7 @@ public class IgniteCheckedException extends Exception {
  *
  * @return Full error code.
  */
+@Override
 public int code() {
 return code;
 }
@@ -185,6 +186,7 @@ public class IgniteCheckedException extends Exception {
  * @see #code()
  * @return Error group.
  */
+@Override
 public int groupCode() {
 return extractGroupCode(code);
 }
@@ -196,6 +198,7 @@ public class IgniteCheckedException extends Exception {
  * @see #groupCode()
  * @return Error code.
  */
+@Override
 public int errorCode() {
 return extractErrorCode(code);
 }
@@ -205,6 +208,7 @@ public class IgniteCheckedException extends Exception {
  *
  * @return Unique identifier of the exception.
  */
+@Override
 public UUID traceId() {
 return traceId;
 }
diff --git 
a/modules/api/src/main/java/org/apache/ignite/lang/IgniteException.java 
b/modules/api/src/main/java/org/apache/ignite/lang/IgniteException.java
index 130f2afc87..64a06ac5c9 100644
--- a/modules/api/src/main/java/org/apache/ignite/lang/IgniteException.java
+++ b/modules/api/src/main/java/org/apache/ignite/lang/IgniteException.java
@@ -30,7 +30,7 @@ import org.jetbrains.annotations.Nullable;
 /**
  * General Ignite exception. Used to indicate any error condition within a 
node.
  */
-public class IgniteException extends RuntimeException {
+public class IgniteException extends RuntimeException implements 
TraceableException {
 /** Serial version UID. */
 private static final long serialVersionUID = 0L;
 
@@ -205,6 +205,7 @@ public class IgniteException extends RuntimeException {
  *
  * @return Full error code.
  */
+@Override
 public int code() {
 return code;
 }
@@ -225,6 +226,7 @@ public class IgniteException extends RuntimeException {
  * @see #code()
  * @return Error group.
  */
+@Override
 public int groupCode() {
 return extractGroupCode(code);
 }
@@ -236,6 +238,7 @@ public class IgniteException extends RuntimeException {
  * @see #groupCode()
  * @return Error code.
  */
+@Override
 public int errorCode() {
 return extractErrorCode(code);
 }
@@ -245,6 +248,7 @@ public class IgniteException extends RuntimeException {
  *
  * @return Unique identifier of the exception.
  */
+@Override
 public UUID traceId() {
 return traceId;
 }
diff --git 
a/modules/api/src/main/java/org/apache/ignite/lang/IgniteExceptionUtils.java 
b/modules/api/src/main/java/org/apache/ignite/lang/IgniteExceptionUtils.java
index 7b447bd70c..b80700356d 100755
--- a/modules/api/src/main/java/org/apache/ignite/lang/IgniteExceptionUtils.java
+++ b/modules/api/src/main/java/org/apache/ignite/lang/IgniteExceptionUtils.java
@@ -142,15 +142,8 @@ public class IgniteExceptionUtils {
  * @return Trace identifier.
  */
 public static @Nullable UUID extractTraceIdFrom(Throwable t) {
-// Perhaps, it would be nice to introduce a new interface 
IgniteTraceableException to overcome if else statements.
-if (t instanceof IgniteException) {
-return ((IgniteException) t).traceId

[ignite-3] branch main updated: IGNITE-19539 Add exception mapper utility (#2225)

2023-06-28 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 e65f5cf532 IGNITE-19539 Add exception mapper utility (#2225)
e65f5cf532 is described below

commit e65f5cf5329ab90f048034ef2b826a5ed1845554
Author: Slava Koptilin 
AuthorDate: Wed Jun 28 16:36:44 2023 +0300

IGNITE-19539 Add exception mapper utility (#2225)
---
 modules/api/build.gradle   |   3 +
 .../apache/ignite/lang/IgniteExceptionMapper.java  |  95 ++
 .../ignite/lang/IgniteExceptionMapperUtil.java | 140 ++
 .../lang/IgniteExceptionMappersProvider.java   |  48 +
 .../apache/ignite/lang/IgniteExceptionUtils.java   |  12 +-
 .../java/org/apache/ignite/tx/Transaction.java |   4 +-
 .../ignite/lang/IgniteExceptionMapperUtilTest.java | 204 +
 .../lang/TestIgniteExceptionMappersProvider.java   |  52 ++
 .../ignite/configuration/ConfigurationModule.java  |   2 +-
 9 files changed, 552 insertions(+), 8 deletions(-)

diff --git a/modules/api/build.gradle b/modules/api/build.gradle
index c53932e48f..b46903b23b 100644
--- a/modules/api/build.gradle
+++ b/modules/api/build.gradle
@@ -29,8 +29,11 @@ dependencies {
 testImplementation libs.hamcrest.optional
 testImplementation libs.archunit.core
 testImplementation libs.archunit.junit5
+testImplementation libs.auto.service.annotations
 testImplementation testFixtures(project(":ignite-core"))
 
+testAnnotationProcessor libs.auto.service
+
 testFixturesAnnotationProcessor libs.micronaut.inject.annotation.processor
 testFixturesImplementation project(":ignite-core")
 testFixturesImplementation testFixtures(project(":ignite-core"))
diff --git 
a/modules/api/src/main/java/org/apache/ignite/lang/IgniteExceptionMapper.java 
b/modules/api/src/main/java/org/apache/ignite/lang/IgniteExceptionMapper.java
new file mode 100755
index 00..f50cb604b3
--- /dev/null
+++ 
b/modules/api/src/main/java/org/apache/ignite/lang/IgniteExceptionMapper.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.lang;
+
+import java.util.function.Function;
+
+/**
+ * Represents a mapper from an internal exception {@code T} to a public one 
{@code R}.
+ */
+public class IgniteExceptionMapper {
+/** Class that represents an internal exception for mapping. */
+private final Class from;
+
+/** Mapping function. */
+private final Function mapper;
+
+/**
+ * Creates a new instance of mapper.
+ *
+ * @param from Class instance that represents a class of internal 
exception.
+ * @param mapper Mapping function to map an internal exception to a public 
one.
+ */
+private IgniteExceptionMapper(Class from, Function mapper) {
+this.from = from;
+this.mapper = mapper;
+}
+
+/**
+ * Returns a class instance that represents an internal exception to be 
used for mapping.
+ *
+ * @return Class instance that represents an internal exception to be used 
for mapping.
+ */
+public Class mappingFrom() {
+return from;
+}
+
+/**
+ * Maps the provided internal exception to a public one.
+ *
+ * @param exception Exception instance to be mapped.
+ * @return Public exception instance.
+ */
+public R map(T exception) {
+return mapper.apply(exception);
+}
+
+/**
+ * Creates a new exception mapper from an internal exception {@code T} to 
a public runtime exception {@code R}.
+ *
+ * @param from Class instance that represents a class of internal 
exception.
+ * @param mapper Mapping function to map an internal exception to a public 
one.
+ * @param  Internal exception type.
+ * @param  Public runtime exception type.
+ *
+ * @return New instance of {@link IgniteExceptionMapper}.
+ */
+public static  
IgniteExceptionMapper unchecked(
+Class from,
+Function mapper
+) {
+   

[ignite-3] branch main updated: IGNITE-17770 Fix ItIgniteNodeRestartTest.testCfgGap (#2224)

2023-06-28 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 1f61771f70 IGNITE-17770 Fix ItIgniteNodeRestartTest.testCfgGap (#2224)
1f61771f70 is described below

commit 1f61771f709a2c9cad60bf91706e013c396e4137
Author: Denis Chudov 
AuthorDate: Wed Jun 28 15:57:51 2023 +0300

IGNITE-17770 Fix ItIgniteNodeRestartTest.testCfgGap (#2224)
---
 .../runner/app/ItIgniteNodeRestartTest.java| 24 ++
 .../distributed/storage/InternalTableImpl.java | 18 
 2 files changed, 34 insertions(+), 8 deletions(-)

diff --git 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java
 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java
index 08b11f42ed..f57fae0c9e 100644
--- 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java
+++ 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java
@@ -135,6 +135,7 @@ import org.apache.ignite.sql.SqlRow;
 import org.apache.ignite.table.Table;
 import org.apache.ignite.table.Tuple;
 import org.apache.ignite.tx.TransactionException;
+import org.awaitility.Awaitility;
 import org.intellij.lang.annotations.Language;
 import org.jetbrains.annotations.Nullable;
 import org.junit.jupiter.api.Disabled;
@@ -1092,7 +1093,6 @@ public class ItIgniteNodeRestartTest extends 
BaseIgniteRestartTest {
  * The test for node restart when there is a gap between the node local 
configuration and distributed configuration.
  */
 @Test
-@Disabled("https://issues.apache.org/jira/browse/IGNITE-17770";)
 public void testCfgGap() throws InterruptedException {
 List nodes = startNodes(4);
 
@@ -1150,9 +1150,25 @@ public class ItIgniteNodeRestartTest extends 
BaseIgniteRestartTest {
 assertNotNull(table);
 
 for (int i = 0; i < 100; i++) {
-Tuple row = table.keyValueView().get(null, 
Tuple.create().set("id", i));
-
-assertEquals(VALUE_PRODUCER.apply(i), row.stringValue("name"));
+int fi = i;
+
+Awaitility.with()
+.await()
+.pollInterval(100, TimeUnit.MILLISECONDS)
+.pollDelay(0, TimeUnit.MILLISECONDS)
+.atMost(30, TimeUnit.SECONDS)
+.until(() -> {
+try {
+Tuple row = table.keyValueView().get(null, 
Tuple.create().set("id", fi));
+
+assertEquals(VALUE_PRODUCER.apply(fi), 
row.stringValue("name"));
+
+return true;
+} catch (TransactionException te) {
+// There may be an exception if the primary 
replica node was stopped. We should wait for new primary to appear.
+return false;
+}
+});
 }
 }
 
diff --git 
a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImpl.java
 
b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImpl.java
index 98fc9148c4..d50e41233c 100644
--- 
a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImpl.java
+++ 
b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImpl.java
@@ -450,11 +450,13 @@ public class InternalTableImpl implements InternalTable {
 throw new TransactionException(e);
 } catch (Throwable e) {
 throw new TransactionException(
+INTERNAL_ERR,
 IgniteStringFormatter.format(
-"Failed to enlist 
partition[tableName={}, partId={}] into a transaction",
+"Failed to enlist partition 
[tableName={}, partId={}] into a transaction",
 tableName,
 partId
-)
+),
+e
 );
 }
 })
@@ -1315,10 +1317,18 @@ public class InternalTableImpl implements InternalTable 
{
 throw new TransactionException(REPLICA_UNAVAILABLE_ERR, 
"Failed to get the primary replica.");
  

[ignite-3] branch main updated: IGNITE-19724 Remove redundant joins (#2252)

2023-06-27 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 cae90410a3 IGNITE-19724 Remove redundant joins (#2252)
cae90410a3 is described below

commit cae90410a32ba3946d09f6a135683f9c3e231f38
Author: Kirill Gusakov 
AuthorDate: Tue Jun 27 21:10:15 2023 +0300

IGNITE-19724 Remove redundant joins (#2252)
---
 .../java/org/apache/ignite/internal/replicator/ReplicaManager.java  | 3 +--
 .../java/org/apache/ignite/internal/rebalance/ItRebalanceTest.java  | 6 +++---
 .../java/org/apache/ignite/distributed/ReplicaUnavailableTest.java  | 3 ++-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaManager.java
 
b/modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaManager.java
index 61e86f7ee6..c2b1008f20 100644
--- 
a/modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaManager.java
+++ 
b/modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaManager.java
@@ -407,8 +407,7 @@ public class ReplicaManager implements IgniteComponent {
 
 if (!removed.isCompletedExceptionally()) {
 return removed
-.join()
-.shutdown()
+.thenCompose(Replica::shutdown)
 .handle((notUsed, throwable) -> {
 if (throwable == null) {
 return true;
diff --git 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceTest.java
 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceTest.java
index 963a800946..baa7178279 100644
--- 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceTest.java
+++ 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.rebalance;
 import static java.util.stream.Collectors.toList;
 import static org.apache.ignite.internal.SessionUtils.executeUpdate;
 import static 
org.apache.ignite.internal.distributionzones.rebalance.RebalanceUtil.partitionAssignments;
+import static org.apache.ignite.internal.testframework.IgniteTestUtils.await;
 import static 
org.apache.ignite.internal.testframework.IgniteTestUtils.waitForCondition;
 import static 
org.apache.ignite.internal.testframework.matchers.CompletableFutureExceptionMatcher.willThrow;
 import static 
org.apache.ignite.internal.testframework.matchers.CompletableFutureMatcher.willBe;
@@ -153,9 +154,8 @@ public class ItRebalanceTest extends IgniteIntegrationTest {
 
 assertTrue(waitForCondition(() -> {
 Set assignments =
-partitionAssignments(
-cluster.aliveNode().metaStorageManager(), table, 0
-).join().stream()
+
await(partitionAssignments(cluster.aliveNode().metaStorageManager(), table, 0))
+.stream()
 .map(Assignment::consistentId)
 .collect(Collectors.toSet());
 
diff --git 
a/modules/table/src/integrationTest/java/org/apache/ignite/distributed/ReplicaUnavailableTest.java
 
b/modules/table/src/integrationTest/java/org/apache/ignite/distributed/ReplicaUnavailableTest.java
index 006744e698..4378cac984 100644
--- 
a/modules/table/src/integrationTest/java/org/apache/ignite/distributed/ReplicaUnavailableTest.java
+++ 
b/modules/table/src/integrationTest/java/org/apache/ignite/distributed/ReplicaUnavailableTest.java
@@ -21,6 +21,7 @@ import static 
java.util.concurrent.CompletableFuture.completedFuture;
 import static 
org.apache.ignite.distributed.ItTxDistributedTestSingleNode.NODE_PORT_BASE;
 import static 
org.apache.ignite.distributed.ItTxDistributedTestSingleNode.startNode;
 import static 
org.apache.ignite.internal.testframework.matchers.CompletableFutureExceptionMatcher.willThrow;
+import static 
org.apache.ignite.internal.testframework.matchers.CompletableFutureMatcher.willSucceedFast;
 import static 
org.apache.ignite.internal.testframework.matchers.CompletableFutureMatcher.willSucceedIn;
 import static org.apache.ignite.internal.util.ExceptionUtils.unwrapCause;
 import static 
org.apache.ignite.lang.ErrorGroups.Replicator.REPLICA_TIMEOUT_ERR;
@@ -196,7 +197,7 @@ public class ReplicaUnavailableTest extends 
IgniteAbstractTest {
 try {
 log.info("Replica msg " + 
message.getClass().getSimpleName());
 
-replicaManager.stopReplica(tablePartitionId).join();
+
assertThat(replicaManager.stopReplica(tablePartitionId),

[ignite-3] branch main updated: IGNITE-19736 Do not cancel tasks in DistributionZoneManager#executor if they were created by immediate scaleUp/scaleDown events. Avoid concurrent executing several task

2023-06-27 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 ff7407fd9a IGNITE-19736 Do not cancel tasks in 
DistributionZoneManager#executor if they were created by immediate 
scaleUp/scaleDown events. Avoid concurrent executing several tasks for the same 
zone. (#2201)
ff7407fd9a is described below

commit ff7407fd9a930bcabbecb40d0f3067320054075a
Author: Sergey Uttsel 
AuthorDate: Tue Jun 27 11:30:15 2023 +0300

IGNITE-19736 Do not cancel tasks in DistributionZoneManager#executor if 
they were created by immediate scaleUp/scaleDown events. Avoid concurrent 
executing several tasks for the same zone. (#2201)
---
 .../distributionzones/DistributionZoneManager.java |  61 ++--
 .../distributionzones/DistributionZonesUtil.java   |  22 ++
 .../DistributionZoneManagerScaleUpTest.java| 312 -
 .../DistributionZonesSchedulersTest.java   | 275 --
 4 files changed, 312 insertions(+), 358 deletions(-)

diff --git 
a/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
 
b/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
index 70f082753c..c2fb15a2af 100644
--- 
a/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
+++ 
b/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
@@ -21,8 +21,10 @@ import static java.util.Collections.emptySet;
 import static java.util.concurrent.CompletableFuture.completedFuture;
 import static java.util.concurrent.CompletableFuture.failedFuture;
 import static java.util.concurrent.CompletableFuture.supplyAsync;
+import static java.util.concurrent.TimeUnit.SECONDS;
 import static java.util.stream.Collectors.toList;
 import static java.util.stream.Collectors.toSet;
+import static 
org.apache.ignite.internal.distributionzones.DistributionZonesUtil.createZoneManagerExecutor;
 import static 
org.apache.ignite.internal.distributionzones.DistributionZonesUtil.deleteDataNodesAndUpdateTriggerKeys;
 import static 
org.apache.ignite.internal.distributionzones.DistributionZonesUtil.extractChangeTriggerRevision;
 import static 
org.apache.ignite.internal.distributionzones.DistributionZonesUtil.extractDataNodes;
@@ -73,9 +75,6 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentSkipListMap;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.ScheduledThreadPoolExecutor;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.function.BiFunction;
 import org.apache.ignite.configuration.ConfigurationChangeException;
@@ -282,10 +281,8 @@ public class DistributionZoneManager implements 
IgniteComponent {
 
 nodesAttributes = new ConcurrentHashMap<>();
 
-executor = new ScheduledThreadPoolExecutor(
-Math.min(Runtime.getRuntime().availableProcessors() * 3, 20),
-new 
NamedThreadFactory(NamedThreadFactory.threadPrefix(nodeName, 
DISTRIBUTION_ZONE_MANAGER_POOL_NAME), LOG),
-new ThreadPoolExecutor.DiscardPolicy()
+executor = createZoneManagerExecutor(
+new 
NamedThreadFactory(NamedThreadFactory.threadPrefix(nodeName, 
DISTRIBUTION_ZONE_MANAGER_POOL_NAME), LOG)
 );
 
 // It's safe to leak with partially initialised object here, because 
rebalanceEngine is only accessible through this or by
@@ -361,7 +358,7 @@ public class DistributionZoneManager implements 
IgniteComponent {
 metaStorageManager.unregisterWatch(topologyWatchListener);
 metaStorageManager.unregisterWatch(dataNodesWatchListener);
 
-shutdownAndAwaitTermination(executor, 10, TimeUnit.SECONDS);
+shutdownAndAwaitTermination(executor, 10, SECONDS);
 }
 
 /**
@@ -1610,6 +1607,12 @@ public class DistributionZoneManager implements 
IgniteComponent {
 /** Schedule task for a scale down process. */
 private ScheduledFuture scaleDownTask;
 
+/** The delay for the scale up task. */
+private long scaleUpTaskDelay;
+
+/** The delay for the scale down task. */
+private long scaleDownTaskDelay;
+
 /**
  * Map that stores pairs revision -> {@link Augmentation} for a zone. 
With this map we can track which nodes
  * should be added or removed in the processes of scale up or scale 
down. Revision helps to track visibility of the events
@@ -1644,56 +1647,64 @@ public class DistributionZoneManager implements 
I

[ignite-3] branch main updated (f71681e1af -> cb0fdb75ab)

2023-06-21 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from f71681e1af IGNITE-19617 Add basic data streamer to embedded API (#2215)
 add cb0fdb75ab IGNITE-19535 Removed a requirement to have a special 
constructor for Ignite exceptions (#2178)

No new revisions were added by this update.

Summary of changes:
 .../apache/ignite/lang/IgniteCheckedException.java |   2 +-
 .../org/apache/ignite/lang/IgniteException.java|  49 +-
 .../apache/ignite/lang/IgniteExceptionUtils.java   | 553 +
 .../apache/ignite/lang/MarshallerException.java|  14 -
 .../ignite/security/AuthenticationException.java   |  14 +-
 .../UnknownAuthenticationTypeException.java|  19 +-
 .../apache/ignite/sql/CursorClosedException.java   |  14 -
 .../ignite/sql/NoRowSetExpectedException.java  |  14 -
 .../main/java/org/apache/ignite/sql/Session.java   |  12 +-
 .../org/apache/ignite/sql/SqlBatchException.java   |   3 +
 .../apache/ignite/sql/SyncResultSetAdapter.java|   3 +-
 .../apache/ignite/lang/IgniteExceptionTest.java|   8 +-
 .../ignite/lang/IgniteExceptionUtilsTest.java  | 187 +++
 .../ignite/internal/IgniteExceptionArchTest.java   |  42 +-
 .../IgniteClientAuthenticationException.java   |  13 -
 .../client/IgniteClientConnectionException.java|  13 -
 ...ClientFeatureNotSupportedByServerException.java |  13 -
 .../apache/ignite/internal/client/ClientUtils.java |  10 +-
 .../ignite/internal/client/TcpClientChannel.java   |  31 +-
 .../apache/ignite/client/ClientMetricsTest.java|   4 +-
 .../apache/ignite/client/fakes/FakeSession.java|   4 +-
 .../DeploymentUnitAlreadyExistsException.java  |   2 -
 .../internal/causality/OutdatedTokenException.java |   1 -
 .../ignite/internal/util/ExceptionUtils.java   |   1 +
 .../lang/IgniteInternalCheckedException.java   |   2 +-
 .../ignite/lang/IgniteInternalException.java   |   2 +-
 .../exceptions/MetaStorageException.java   |  12 -
 .../network/UnresolvableConsistentIdException.java |   5 -
 .../ignite/internal/sql/api/SessionImpl.java   |   3 +-
 .../internal/sql/engine/AsyncSqlCursorImpl.java|   5 +-
 .../sql/engine/exec/ExchangeServiceImpl.java   |   4 +-
 .../internal/table/distributed/TableManager.java   |   4 +-
 .../apache/ignite/internal/tx/LockException.java   |  15 -
 .../tx/TransactionInternalCheckedException.java|  14 -
 34 files changed, 840 insertions(+), 252 deletions(-)
 create mode 100755 
modules/api/src/main/java/org/apache/ignite/lang/IgniteExceptionUtils.java
 create mode 100755 
modules/api/src/test/java/org/apache/ignite/lang/IgniteExceptionUtilsTest.java



[ignite-3] branch main updated (8f62930cd6 -> 9c7ec2b25f)

2023-06-20 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from 8f62930cd6 IGNITE-19774 .NET: Fix IgniteClientTests.TestToString 
flakiness (#)
 add 9c7ec2b25f IGNITE-19716 Added a temporary fix for AssertionError in 
randomNodes until IGNITE-19466 is resolved (#2212)

No new revisions were added by this update.

Summary of changes:
 .../org/apache/ignite/internal/raft/RaftGroupServiceImpl.java | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)



[ignite-3] branch main updated: IGNITE-19772 Fixed Compilation error (#2213)

2023-06-19 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 feb4c1d466 IGNITE-19772 Fixed Compilation error (#2213)
feb4c1d466 is described below

commit feb4c1d46614aecaf56b82ed28a7247c38975ca8
Author: Sergey Uttsel 
AuthorDate: Mon Jun 19 12:22:42 2023 +0300

IGNITE-19772 Fixed Compilation error (#2213)
---
 .../distributionzones/DistributionZoneCausalityDataNodesTest.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/modules/distribution-zones/src/test/java/org/apache/ignite/internal/distributionzones/DistributionZoneCausalityDataNodesTest.java
 
b/modules/distribution-zones/src/test/java/org/apache/ignite/internal/distributionzones/DistributionZoneCausalityDataNodesTest.java
index 3d44dabca2..7e3820a322 100644
--- 
a/modules/distribution-zones/src/test/java/org/apache/ignite/internal/distributionzones/DistributionZoneCausalityDataNodesTest.java
+++ 
b/modules/distribution-zones/src/test/java/org/apache/ignite/internal/distributionzones/DistributionZoneCausalityDataNodesTest.java
@@ -48,12 +48,12 @@ import 
org.apache.ignite.internal.cluster.management.topology.api.LogicalNode;
 import 
org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologySnapshot;
 import 
org.apache.ignite.internal.distributionzones.DistributionZoneConfigurationParameters.Builder;
 import 
org.apache.ignite.internal.distributionzones.configuration.DistributionZoneView;
-import 
org.apache.ignite.internal.distributionzones.exception.DistributionZoneNotFoundException;
 import org.apache.ignite.internal.metastorage.Entry;
 import org.apache.ignite.internal.metastorage.EntryEvent;
 import org.apache.ignite.internal.metastorage.WatchEvent;
 import org.apache.ignite.internal.metastorage.WatchListener;
 import org.apache.ignite.internal.util.ByteUtils;
+import org.apache.ignite.lang.DistributionZoneNotFoundException;
 import org.apache.ignite.lang.IgniteBiTuple;
 import org.apache.ignite.lang.NodeStoppingException;
 import org.apache.ignite.network.ClusterNode;



[ignite-3] branch main updated: IGNITE-19602 API and tests for causality data nodes in DistributionZoneManager (#2170)

2023-06-19 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 b560f12406 IGNITE-19602 API and tests for causality data nodes in 
DistributionZoneManager (#2170)
b560f12406 is described below

commit b560f124065a1f3d93ffa2fc17632de9ee4b26a6
Author: Sergey Uttsel 
AuthorDate: Mon Jun 19 10:42:10 2023 +0300

IGNITE-19602 API and tests for causality data nodes in 
DistributionZoneManager (#2170)
---
 .../distributionzones/DistributionZoneManager.java |   15 +
 .../DistributionZoneCausalityDataNodesTest.java| 1094 
 2 files changed, 1109 insertions(+)

diff --git 
a/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
 
b/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
index 9666848b01..2be2641924 100644
--- 
a/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
+++ 
b/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
@@ -650,6 +650,21 @@ public class DistributionZoneManager implements 
IgniteComponent {
 });
 }
 
+/**
+ * Asynchronously gets data nodes of the zone using causality token.
+ *
+ * The returned future can be completed with {@link 
DistributionZoneNotFoundException} if the zone with the provided {@code zoneId}
+ * does not exist.
+ *
+ * @param causalityToken Causality token.
+ * @param zoneId Zone id.
+ * @return The future which will be completed with data nodes for the 
zoneId or with exception.
+ */
+// TODO: Will be implemented in IGNITE-19506.
+public CompletableFuture> dataNodes(long causalityToken, int 
zoneId) {
+return null;
+}
+
 /**
  * Creates configuration listener for updates of scale up value.
  *
diff --git 
a/modules/distribution-zones/src/test/java/org/apache/ignite/internal/distributionzones/DistributionZoneCausalityDataNodesTest.java
 
b/modules/distribution-zones/src/test/java/org/apache/ignite/internal/distributionzones/DistributionZoneCausalityDataNodesTest.java
new file mode 100644
index 00..3d44dabca2
--- /dev/null
+++ 
b/modules/distribution-zones/src/test/java/org/apache/ignite/internal/distributionzones/DistributionZoneCausalityDataNodesTest.java
@@ -0,0 +1,1094 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.distributionzones;
+
+import static java.util.Collections.emptySet;
+import static java.util.concurrent.CompletableFuture.completedFuture;
+import static java.util.concurrent.TimeUnit.SECONDS;
+import static java.util.stream.Collectors.toSet;
+import static 
org.apache.ignite.internal.cluster.management.topology.LogicalTopologyImpl.LOGICAL_TOPOLOGY_KEY;
+import static 
org.apache.ignite.internal.distributionzones.DistributionZoneManager.DEFAULT_ZONE_ID;
+import static 
org.apache.ignite.internal.distributionzones.DistributionZoneManager.DEFAULT_ZONE_NAME;
+import static 
org.apache.ignite.internal.distributionzones.DistributionZoneManager.IMMEDIATE_TIMER_VALUE;
+import static 
org.apache.ignite.internal.distributionzones.DistributionZonesUtil.extractZoneId;
+import static 
org.apache.ignite.internal.distributionzones.DistributionZonesUtil.zoneDataNodesKey;
+import static 
org.apache.ignite.internal.distributionzones.DistributionZonesUtil.zonesDataNodesPrefix;
+import static 
org.apache.ignite.internal.distributionzones.DistributionZonesUtil.zonesLogicalTopologyKey;
+import static 
org.apache.ignite.internal.distributionzones.DistributionZonesUtil.zonesLogicalTopologyPrefix;
+import static 
org.apache.ignite.internal.distributionzones.DistributionZonesUtil.zonesLogicalTopologyVersionKey;
+import static 
org.apache.ignite.internal.testframework.matchers.CompletableFutureMatcher.willBe;
+import static org.apache.ignite.internal.util.ByteUtils.fr

[ignite-3] branch main updated: IGNITE-19184 Added javadocs and md file to describe node attributes and distribution zone filters (#2188)

2023-06-15 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 f91a642951 IGNITE-19184 Added javadocs and md file to describe node 
attributes and distribution zone filters (#2188)
f91a642951 is described below

commit f91a6429513629d2906e88a14b9bb35e2dc64172
Author: Mirza Aliev 
AuthorDate: Thu Jun 15 12:30:13 2023 +0400

IGNITE-19184 Added javadocs and md file to describe node attributes and 
distribution zone filters (#2188)
---
 .../NodeAttributeConfigurationSchema.java  |  7 ++-
 .../management/topology/api/LogicalNode.java   |  7 ++-
 .../distributionzones/DistributionZoneManager.java |  2 +
 .../DistributionZoneConfigurationSchema.java   |  2 +
 modules/distribution-zones/tech-notes/filters.md   | 70 ++
 5 files changed, 85 insertions(+), 3 deletions(-)

diff --git 
a/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/configuration/NodeAttributeConfigurationSchema.java
 
b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/configuration/NodeAttributeConfigurationSchema.java
index 55b4479550..cb52ebf3a2 100644
--- 
a/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/configuration/NodeAttributeConfigurationSchema.java
+++ 
b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/configuration/NodeAttributeConfigurationSchema.java
@@ -22,8 +22,11 @@ import 
org.apache.ignite.configuration.annotation.InjectedName;
 import org.apache.ignite.configuration.annotation.Value;
 
 /**
- * Node's attribute configuration schema.
- * TODO: add proper javadocs when filtering feature will be closer to the end 
https://issues.apache.org/jira/browse/IGNITE-19184
+ * Node's attribute configuration schema. User can specify any number of pairs 
(key, attribute) for a node through the local configuration
+ * of a node, and also can specify a filter through the SQL syntax of 
distribution zones. Any time data nodes will be recalculated,
+ * corresponding filter will be applied to set of nodes with pre-defined 
attributes.
+ *
+ * @see https://github.com/apache/ignite-3/blob/main/modules/distribution-zones/tech-notes/filters.md";>Filter
 documentation
  */
 @Config
 public class NodeAttributeConfigurationSchema {
diff --git 
a/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/api/LogicalNode.java
 
b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/api/LogicalNode.java
index ce808d4a50..9ff7789dcd 100644
--- 
a/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/api/LogicalNode.java
+++ 
b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/api/LogicalNode.java
@@ -28,7 +28,12 @@ import org.apache.ignite.network.NetworkAddress;
  * Representation of a logical node in a cluster.
  */
 public class LogicalNode extends ClusterNode {
-/** Node's attributes. */
+/**
+ * Node's attributes.
+ *
+ * @see https://github.com/apache/ignite-3/blob/main/modules/distribution-zones/tech-notes/filters.md";>Filter
+ * documentation
+ */
 @IgniteToStringInclude
 private final Map nodeAttributes;
 
diff --git 
a/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
 
b/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
index 92a98f7ead..9666848b01 100644
--- 
a/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
+++ 
b/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java
@@ -230,6 +230,8 @@ public class DistributionZoneManager implements 
IgniteComponent {
  * Local mapping of {@code nodeId} -> node's attributes, where {@code 
nodeId} is a node id, that changes between restarts.
  * This map is updated every time we receive a topology event in a {@code 
topologyWatchListener}.
  * TODO: https://issues.apache.org/jira/browse/IGNITE-19491 properly clean 
up this map
+ *
+ * @see https://github.com/apache/ignite-3/blob/main/modules/distribution-zones/tech-notes/filters.md";>Filter
 documentation
  */
 private final Map> nodesAttributes;
 
diff --git 
a/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/configuration/DistributionZoneConfigurationSchema.java
 
b/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/configuration/DistributionZoneConfigurationSchema.

[ignite-3] branch main updated (dd927f7d43 -> 5200f0c1f3)

2023-06-13 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from dd927f7d43 IGNITE-19483 Transform TableManager and IndexManager to 
internally work against Catalog event types (#2184)
 add 5200f0c1f3 IGNITE-19600 Removed topologyVersionedDataNodes (#2171)

No new revisions were added by this update.

Summary of changes:
 .../distributionzones/DistributionZoneManager.java | 241 +-
 .../DistributionZoneAwaitDataNodesTest.java| 522 -
 .../DistributionZoneManagerFilterTest.java |  60 ++-
 .../sql/engine/exec/MockedStructuresTest.java  |   3 -
 .../table/distributed/TableManagerTest.java|   3 -
 5 files changed, 30 insertions(+), 799 deletions(-)
 delete mode 100644 
modules/distribution-zones/src/test/java/org/apache/ignite/internal/distributionzones/DistributionZoneAwaitDataNodesTest.java



[ignite-3] branch main updated: IGNITE-19005 Fixed metric names (#2132)

2023-06-08 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 f21bac0dca IGNITE-19005 Fixed metric names (#2132)
f21bac0dca is described below

commit f21bac0dcad7ed3ff7be6528b19d4f2343c2b947
Author: Slava Koptilin 
AuthorDate: Thu Jun 8 10:43:13 2023 +0300

IGNITE-19005 Fixed metric names (#2132)
---
 .../cli/call/metric/ItEnabledMetricCallsTest.java  | 16 
 .../metric/ItEnabledNodeMetricCommandTest.java | 21 +-
 modules/metrics/build.gradle   |  1 +
 .../metrics/exporters/ItJvmMetricSourceTest.java   | 16 
 .../exporters/ItMetricExportersLoadingTest.java|  8 ++--
 .../metrics/exporters/TestMetricsSource.java   |  2 +-
 .../internal/metrics/sources/JvmMetricSource.java  | 32 +++
 .../internal/metrics/MetricEntitiesTest.java   |  4 +-
 .../metrics/sources/JvmMetricSourceTest.java   | 48 --
 9 files changed, 76 insertions(+), 72 deletions(-)

diff --git 
a/modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/call/metric/ItEnabledMetricCallsTest.java
 
b/modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/call/metric/ItEnabledMetricCallsTest.java
index d3c295e2b2..a28b33b4e3 100644
--- 
a/modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/call/metric/ItEnabledMetricCallsTest.java
+++ 
b/modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/call/metric/ItEnabledMetricCallsTest.java
@@ -87,14 +87,14 @@ class ItEnabledMetricCallsTest extends 
CallInitializedIntegrationTestBase {
 
 // And
 Metric[] expectedMetrics = {
-new Metric().name("memory.heap.init").desc("Initial amount of 
heap memory"),
-new Metric().name("memory.heap.used").desc("Current used 
amount of heap memory"),
-new Metric().name("memory.heap.committed").desc("Committed 
amount of heap memory"),
-new Metric().name("memory.heap.max").desc("Maximum amount of 
heap memory"),
-new Metric().name("memory.non-heap.init").desc("Initial amount 
of non-heap memory"),
-new Metric().name("memory.non-heap.used").desc("Used amount of 
non-heap memory"),
-new Metric().name("memory.non-heap.committed").desc("Committed 
amount of non-heap memory"),
-new Metric().name("memory.non-heap.max").desc("Maximum amount 
of non-heap memory")
+new Metric().name("memory.heap.Init").desc("Initial amount of 
heap memory"),
+new Metric().name("memory.heap.Used").desc("Current used 
amount of heap memory"),
+new Metric().name("memory.heap.Committed").desc("Committed 
amount of heap memory"),
+new Metric().name("memory.heap.Max").desc("Maximum amount of 
heap memory"),
+new Metric().name("memory.non-heap.Init").desc("Initial amount 
of non-heap memory"),
+new Metric().name("memory.non-heap.Used").desc("Used amount of 
non-heap memory"),
+new Metric().name("memory.non-heap.Committed").desc("Committed 
amount of non-heap memory"),
+new Metric().name("memory.non-heap.Max").desc("Maximum amount 
of non-heap memory")
 };
 
 assertAll(
diff --git 
a/modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/commands/metric/ItEnabledNodeMetricCommandTest.java
 
b/modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/commands/metric/ItEnabledNodeMetricCommandTest.java
index 01fd6bcf32..6a4eb2c5be 100644
--- 
a/modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/commands/metric/ItEnabledNodeMetricCommandTest.java
+++ 
b/modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/commands/metric/ItEnabledNodeMetricCommandTest.java
@@ -72,17 +72,16 @@ class ItEnabledNodeMetricCommandTest extends 
CliCommandTestInitializedIntegratio
 assertAll(
 this::assertExitCodeIsZero,
 this::assertErrOutputIsEmpty,
-() -> assertOutputIs("Set name\tMetric name\tDescription" + NL
-+ "jvm\t\t" + NL
-+ "\tmemory.heap.committed\tCommitted amount of heap 
memory" + NL
-+ "\tmemory.heap.max\tMaximum amount of heap memory" + 
NL
-+ "\tmemory.non-heap.max\tMaximum amount of non-heap 
memory" + NL

[ignite-3] branch main updated: IGNITE-19408 Removed unnecessary TODO (#2130)

2023-06-01 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 d7897cfbe0 IGNITE-19408 Removed unnecessary TODO (#2130)
d7897cfbe0 is described below

commit d7897cfbe0b5b3ad087828bb39ab3789e8aaeff8
Author: Sergey Uttsel 
AuthorDate: Fri Jun 2 00:26:18 2023 +0300

IGNITE-19408 Removed unnecessary TODO (#2130)
---
 .../org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java   | 1 -
 1 file changed, 1 deletion(-)

diff --git 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java
 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java
index 444e5b3385..7ab43806c3 100644
--- 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java
+++ 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java
@@ -1017,7 +1017,6 @@ public class ItIgniteNodeRestartTest extends 
IgniteAbstractTest {
 public void testOneNodeRestartWithGap() throws InterruptedException {
 IgniteImpl ignite = startNode(0);
 
-// TODO: https://issues.apache.org/jira/browse/IGNITE-19408 Need to 
use ItIgniteNodeRestartTest.startPartialNode(int, String)
 startNode(1);
 
 createTableWithData(List.of(ignite), TABLE_NAME, 2);



[ignite-3] branch main updated: IGNITE-19627 Fixed ItReadOnlyTransactionTest (#2133)

2023-06-01 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 226c23e0a4 IGNITE-19627 Fixed ItReadOnlyTransactionTest (#2133)
226c23e0a4 is described below

commit 226c23e0a4b3d38de907ffc268a96ae4c28374c4
Author: Mirza Aliev 
AuthorDate: Thu Jun 1 20:06:54 2023 +0400

IGNITE-19627 Fixed ItReadOnlyTransactionTest (#2133)
---
 .../internal/table/ItReadOnlyTransactionTest.java  | 75 ++
 1 file changed, 34 insertions(+), 41 deletions(-)

diff --git 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/table/ItReadOnlyTransactionTest.java
 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/table/ItReadOnlyTransactionTest.java
index ccd2c9a99a..ad95f44e20 100644
--- 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/table/ItReadOnlyTransactionTest.java
+++ 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/table/ItReadOnlyTransactionTest.java
@@ -41,7 +41,8 @@ import 
org.apache.ignite.internal.sql.engine.ClusterPerClassIntegrationTest;
 import org.apache.ignite.lang.IgniteStringFormatter;
 import org.apache.ignite.network.ClusterNode;
 import org.apache.ignite.tx.Transaction;
-import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
 /**
@@ -49,18 +50,19 @@ import org.junit.jupiter.api.Test;
  */
 public class ItReadOnlyTransactionTest extends ClusterPerClassIntegrationTest {
 /** Table name. */
-public static final String TABLE_NAME = "tbl";
-/** Gap in future to request a data. */
-public static final int FUTURE_GAP = 200;
+private static final String TABLE_NAME = "tbl";
+
+private static final String ZONE_NAME = "ZONE_" + TABLE_NAME.toUpperCase();
 
-@BeforeAll
-public void beforeTestStart() {
-String zoneName = "ZONE_" + TABLE_NAME.toUpperCase();
+/** Gap in future to request a data. */
+private static final int FUTURE_GAP = 700;
 
+@BeforeEach
+public void beforeEach() {
 sql(IgniteStringFormatter.format("CREATE ZONE IF NOT EXISTS {} WITH 
REPLICAS={}, PARTITIONS={};",
-zoneName, nodes(), 10));
+ZONE_NAME, nodes(), 10));
 sql(IgniteStringFormatter.format("CREATE TABLE {}(id INT PRIMARY KEY, 
val VARCHAR) WITH PRIMARY_ZONE='{}'",
-TABLE_NAME, zoneName));
+TABLE_NAME, ZONE_NAME));
 
 Ignite ignite = CLUSTER_NODES.get(0);
 
@@ -75,23 +77,11 @@ public class ItReadOnlyTransactionTest extends 
ClusterPerClassIntegrationTest {
 assertEquals(100, checkData(null, id -> "str " + id));
 }
 
-/**
- * Check rows in the table {@link ItReadOnlyTransactionTest#TABLE_NAME}.
- *
- * @param tx Transaction. The parameter might be {@code null} for implicit 
transaction.
- * @param valueMapper Function to map a primary key to a column.
- * @return Count of rows in the table.
- */
-private static int checkData(Transaction tx, Function 
valueMapper) {
-List> rows = sql(tx, "SELECT id, val FROM " + TABLE_NAME 
+ " ORDER BY id");
-
-for (List row : rows) {
-var id = (Integer) row.get(0);
+@AfterEach
+public void afterEach() {
+sql(IgniteStringFormatter.format("DROP TABLE {}", TABLE_NAME));
 
-assertEquals(valueMapper.apply(id), row.get(1));
-}
-
-return rows.size();
+sql(IgniteStringFormatter.format("DROP ZONE {}", ZONE_NAME));
 }
 
 @Test
@@ -139,14 +129,6 @@ public class ItReadOnlyTransactionTest extends 
ClusterPerClassIntegrationTest {
 }
 
 assertEquals(100 + nodes(), checkData(null, id -> id < 100 ? ("str " + 
id) : ("new str " + id)));
-
-Ignite ignite = CLUSTER_NODES.get(0);
-
-ignite.transactions().runInTransaction(tx -> {
-for (int i = 100; i < 100 + nodes(); i++) {
-sql(tx, "DELETE FROM " + TABLE_NAME + " WHERE id = ?", i);
-}
-});
 }
 
 @Test
@@ -188,14 +170,6 @@ public class ItReadOnlyTransactionTest extends 
ClusterPerClassIntegrationTest {
 }
 
 assertEquals(100 - nodes(), checkData(null, id -> "str " + id));
-
-Ignite ignite = CLUSTER_NODES.get(0);
-
-ignite.transactions().runInTransaction(tx -> {
-for (int i = 0; i < nodes(); i++) {
-sql(tx, "INSERT INTO " + TABLE_NAME + " VALUES (?, ?)", i, 
"str " + i);
-}
-});
 }
 
 private static Row createRow(SchemaDescript

[ignite-3] branch main updated: IGNITE-19534 Fix error code duplication in the error message (#2107)

2023-06-01 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 29f34fa292 IGNITE-19534 Fix error code duplication in the error 
message (#2107)
29f34fa292 is described below

commit 29f34fa292b76baa60bd6f3805d5ca9bea6b8e34
Author: Slava Koptilin 
AuthorDate: Thu Jun 1 12:32:47 2023 +0300

IGNITE-19534 Fix error code duplication in the error message (#2107)

Co-authored-by: Pavel Tupitsyn 
---
 .../apache/ignite/lang/IgniteCheckedException.java | 17 --
 .../org/apache/ignite/lang/IgniteException.java| 18 --
 .../apache/ignite/lang/IgniteExceptionTest.java| 71 +++---
 .../client/handler/ItClientHandlerMetricsTest.java |  2 +-
 .../handler/ClientInboundMessageHandler.java   |  5 ++
 .../java/org/apache/ignite/lang/ErrorGroup.java|  3 +-
 .../lang/IgniteInternalCheckedException.java   | 19 +++---
 .../ignite/lang/IgniteInternalException.java   | 17 --
 .../org/apache/ignite/lang/ErrorGroupTest.java |  5 +-
 .../cpp/tests/client-test/compute_test.cpp |  9 +--
 .../dotnet/Apache.Ignite.Tests/Sql/SqlTests.cs | 21 +++
 .../dotnet/Apache.Ignite/Internal/Table/Tables.cs  |  1 -
 .../apache/ignite/internal/sqllogic/Statement.java |  9 ++-
 .../internal/sql/engine/message/ErrorMessage.java  |  2 +
 14 files changed, 143 insertions(+), 56 deletions(-)

diff --git 
a/modules/api/src/main/java/org/apache/ignite/lang/IgniteCheckedException.java 
b/modules/api/src/main/java/org/apache/ignite/lang/IgniteCheckedException.java
index 1066afc6b0..30c5521511 100755
--- 
a/modules/api/src/main/java/org/apache/ignite/lang/IgniteCheckedException.java
+++ 
b/modules/api/src/main/java/org/apache/ignite/lang/IgniteCheckedException.java
@@ -20,7 +20,6 @@ package org.apache.ignite.lang;
 import static org.apache.ignite.lang.ErrorGroup.ERR_PREFIX;
 import static org.apache.ignite.lang.ErrorGroup.errorGroupByCode;
 import static org.apache.ignite.lang.ErrorGroup.errorMessage;
-import static org.apache.ignite.lang.ErrorGroup.errorMessageFromCause;
 import static org.apache.ignite.lang.ErrorGroup.extractErrorCode;
 import static org.apache.ignite.lang.ErrorGroup.extractGroupCode;
 
@@ -66,8 +65,6 @@ public class IgniteCheckedException extends Exception {
  * @param code Full error code.
  */
 public IgniteCheckedException(UUID traceId, int code) {
-super(errorMessage(traceId, code, null));
-
 this.traceId = traceId;
 this.groupName = errorGroupByCode((extractGroupCode(code))).name();
 this.code = code;
@@ -91,7 +88,7 @@ public class IgniteCheckedException extends Exception {
  * @param message Detailed message.
  */
 public IgniteCheckedException(UUID traceId, int code, String message) {
-super(errorMessage(traceId, code, message));
+super(message);
 
 this.traceId = traceId;
 this.groupName = errorGroupByCode((extractGroupCode(code))).name();
@@ -116,7 +113,7 @@ public class IgniteCheckedException extends Exception {
  * @param cause Optional nested exception (can be {@code null}).
  */
 public IgniteCheckedException(UUID traceId, int code, Throwable cause) {
-super(errorMessageFromCause(traceId, code, cause), cause);
+super((cause != null) ? cause.getLocalizedMessage() : null, cause);
 
 this.traceId = traceId;
 this.groupName = errorGroupByCode((extractGroupCode(code))).name();
@@ -143,7 +140,7 @@ public class IgniteCheckedException extends Exception {
  * @param cause Optional nested exception (can be {@code null}).
  */
 public IgniteCheckedException(UUID traceId, int code, String message, 
Throwable cause) {
-super(errorMessage(traceId, code, message), cause);
+super(message, cause);
 
 this.traceId = traceId;
 this.groupName = errorGroupByCode((extractGroupCode(code))).name();
@@ -211,4 +208,12 @@ public class IgniteCheckedException extends Exception {
 public UUID traceId() {
 return traceId;
 }
+
+/** {@inheritDoc} */
+@Override
+public String toString() {
+String s = getClass().getName();
+String message = errorMessage(traceId, groupName, code, 
getLocalizedMessage());
+return (message != null) ? (s + ": " + message) : s;
+}
 }
diff --git 
a/modules/api/src/main/java/org/apache/ignite/lang/IgniteException.java 
b/modules/api/src/main/java/org/apache/ignite/lang/IgniteException.java
index 3c8bc331b3..d9262b909d 100644
--- a/modules/api/src/main/java/org/apache/ignite/lang/IgniteException.java
+++ b/modules/api/src/main/java/org/apache/ignite/lang/IgniteException.java
@@ -20,7 +20,6 @@ package org.apache.ignite.lang;
 import static org.apache.ignite.lang.ErrorGroup.ERR_PREFIX;
 imp

[ignite] branch master updated: IGNITE-19473 Change schema name from IGNITE to SYS (#10736)

2023-05-25 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 12d0ce6d779 IGNITE-19473 Change schema name from IGNITE to SYS (#10736)
12d0ce6d779 is described below

commit 12d0ce6d779d721cecbaed6f2d6c8dbb25a6c2f6
Author: IgGusev 
AuthorDate: Thu May 25 17:48:04 2023 +0400

IGNITE-19473 Change schema name from IGNITE to SYS (#10736)
---
 .../java/src/main/java/org/apache/ignite/snippets/JavaThinClient.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/JavaThinClient.java
 
b/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/JavaThinClient.java
index 8a9c2fdc642..b4979acd03d 100644
--- 
a/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/JavaThinClient.java
+++ 
b/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/JavaThinClient.java
@@ -331,12 +331,12 @@ public class JavaThinClient {
 try (IgniteClient igniteClient = Ignition.startClient(cfg)) {
 
 // getting the id of the first node
-UUID nodeId = (UUID) igniteClient.query(new SqlFieldsQuery("SELECT 
* from NODES").setSchema("IGNITE"))
+UUID nodeId = (UUID) igniteClient.query(new SqlFieldsQuery("SELECT 
* from NODES").setSchema("SYS"))
 .getAll().iterator().next().get(0);
 
 double cpu_load = (Double) igniteClient
 .query(new SqlFieldsQuery("select CUR_CPU_LOAD * 100 from 
NODE_METRICS where NODE_ID = ? ")
-.setSchema("IGNITE").setArgs(nodeId.toString()))
+.setSchema("SYS").setArgs(nodeId.toString()))
 .getAll().iterator().next().get(0);
 
 System.out.println("node's cpu load = " + cpu_load);



[ignite-3] branch main updated: IGNITE-19533 Renamed UNKNOWN_ERR error code to INTERNAL_ERR. Removed UNEXPECTED_ERR error code. (#2097)

2023-05-24 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 69073325b9 IGNITE-19533 Renamed UNKNOWN_ERR error code to 
INTERNAL_ERR. Removed UNEXPECTED_ERR error code. (#2097)
69073325b9 is described below

commit 69073325b905238f33e7b1b4a0f4c3160246597f
Author: Slava Koptilin 
AuthorDate: Wed May 24 18:35:24 2023 +0300

IGNITE-19533 Renamed UNKNOWN_ERR error code to INTERNAL_ERR. Removed 
UNEXPECTED_ERR error code. (#2097)
---
 docs/_docs/handling-exceptions.adoc|  6 +-
 .../org/apache/ignite/lang/IgniteException.java| 14 ++---
 .../internal/catalog/CatalogServiceImpl.java   |  2 +-
 .../internal/catalog/storage/UpdateLogImpl.java|  2 +-
 .../ignite/client/handler/ItClientHandlerTest.java |  6 +-
 .../handler/ClientInboundMessageHandler.java   |  4 +-
 .../internal/client/table/ClientKeyValueView.java  |  6 +-
 .../client/table/ClientRecordSerializer.java   | 10 ++--
 .../ignite/internal/client/table/ClientTable.java  |  4 +-
 .../internal/client/tx/ClientTransaction.java  |  4 +-
 .../java/org/apache/ignite/lang/ErrorGroups.java   | 68 +++---
 .../lang/IgniteInternalCheckedException.java   | 12 ++--
 .../ignite/lang/IgniteInternalException.java   | 10 ++--
 .../org/apache/ignite/lang/ErrorGroupTest.java |  8 +--
 .../apache/ignite/internal/index/IndexManager.java |  2 +-
 .../raft/client/TopologyAwareRaftGroupService.java |  2 +-
 .../handler/IgniteExceptionHandlerTest.java| 12 ++--
 .../apache/ignite/internal/rest/RestComponent.java |  4 +-
 .../authentication/NodeOnlyEndpointsFilter.java|  2 +-
 .../runner/app/client/ItThinClientComputeTest.java |  6 +-
 .../internal/component/RestAddressReporter.java|  4 +-
 .../ignite/internal/schema/NativeTypeSpec.java |  2 +-
 .../ignite/internal/sql/api/SessionImpl.java   |  4 +-
 .../sql/engine/exec/ExchangeServiceImpl.java   |  8 +--
 .../internal/sql/engine/exec/ExecutionContext.java |  6 +-
 .../sql/engine/exec/ExecutionServiceImpl.java  |  4 +-
 .../ignite/internal/sql/engine/exec/rel/Inbox.java |  4 +-
 .../internal/sql/engine/exec/rel/Outbox.java   |  6 +-
 .../internal/sql/engine/exec/rel/RootNode.java |  4 +-
 .../internal/sql/engine/trait/TraitUtils.java  |  2 +-
 .../sql/engine/exec/ExecutionServiceImplTest.java  |  4 +-
 .../distributed/storage/InternalTableImpl.java |  4 +-
 32 files changed, 105 insertions(+), 131 deletions(-)

diff --git a/docs/_docs/handling-exceptions.adoc 
b/docs/_docs/handling-exceptions.adoc
index 0ce9d421cb..f3924a4b6c 100644
--- a/docs/_docs/handling-exceptions.adoc
+++ b/docs/_docs/handling-exceptions.adoc
@@ -26,9 +26,9 @@ When the exception happens, Apache Ignite 3 provides a UUID 
of the specific exce
 [cols="20%,80%", width="100%"]
 |===
 |Exception |Description
-|`IGN-CMN-1`|Unexpected error occurred.
-|`IGN-CMN-2`|Operation was stopped because node is stopping.
-|`IGN-CMN-3`|Required component was not started.
+|`IGN-CMN-1`|Operation was stopped because node is stopping.
+|`IGN-CMN-2`|Required component was not started.
+|`IGN-CMN-65535`|Internal error.
 |===
 
 == Table Exceptions
diff --git 
a/modules/api/src/main/java/org/apache/ignite/lang/IgniteException.java 
b/modules/api/src/main/java/org/apache/ignite/lang/IgniteException.java
index cae19502f1..3c8bc331b3 100644
--- a/modules/api/src/main/java/org/apache/ignite/lang/IgniteException.java
+++ b/modules/api/src/main/java/org/apache/ignite/lang/IgniteException.java
@@ -23,7 +23,7 @@ import static org.apache.ignite.lang.ErrorGroup.errorMessage;
 import static org.apache.ignite.lang.ErrorGroup.errorMessageFromCause;
 import static org.apache.ignite.lang.ErrorGroup.extractErrorCode;
 import static org.apache.ignite.lang.ErrorGroup.extractGroupCode;
-import static org.apache.ignite.lang.ErrorGroups.Common.UNKNOWN_ERR;
+import static org.apache.ignite.lang.ErrorGroups.Common.INTERNAL_ERR;
 
 import java.lang.reflect.Constructor;
 import java.util.Objects;
@@ -60,7 +60,7 @@ public class IgniteException extends RuntimeException {
  */
 @Deprecated
 public IgniteException() {
-this(UNKNOWN_ERR);
+this(INTERNAL_ERR);
 }
 
 /**
@@ -70,7 +70,7 @@ public class IgniteException extends RuntimeException {
  */
 @Deprecated
 public IgniteException(String msg) {
-this(UNKNOWN_ERR, msg);
+this(INTERNAL_ERR, msg);
 }
 
 /**
@@ -80,7 +80,7 @@ public class IgniteException extends RuntimeException {
  */
 @Deprecated
 public IgniteException(Throwable cause) {
-this(UNKNOWN_ERR, cause);
+this(INTERNAL_ERR, cause);
 }
 
 /**
@@ -91,7 +91,7 @@ public class IgniteException extends RuntimeException {
  */
 @Deprecated
 public IgniteException(S

[ignite-3] branch main updated: IGNITE-17883 Removed not implemented 'invoke' functionality (#2090)

2023-05-23 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 0c68cbe3f0 IGNITE-17883 Removed not implemented 'invoke' functionality 
(#2090)
0c68cbe3f0 is described below

commit 0c68cbe3f016e508bd9d53ce5320c88acba1acff
Author: Slava Koptilin 
AuthorDate: Tue May 23 10:17:53 2023 +0300

IGNITE-17883 Removed not implemented 'invoke' functionality (#2090)
---
 .../org/apache/ignite/table/InvocationContext.java | 70 --
 .../org/apache/ignite/table/InvokeProcessor.java   | 47 ---
 .../ignite/table/InvokeProcessorException.java | 38 
 .../java/org/apache/ignite/table/KeyValueView.java | 65 
 .../java/org/apache/ignite/table/RecordView.java   | 48 ---
 .../client/table/ClientKeyValueBinaryView.java | 46 --
 .../internal/client/table/ClientKeyValueView.java  | 46 --
 .../client/table/ClientRecordBinaryView.java   | 39 
 .../internal/client/table/ClientRecordView.java| 39 
 .../internal/table/KeyValueBinaryViewImpl.java | 46 --
 .../ignite/internal/table/KeyValueViewImpl.java| 46 --
 .../internal/table/RecordBinaryViewImpl.java   | 43 -
 .../ignite/internal/table/RecordViewImpl.java  | 39 
 13 files changed, 612 deletions(-)

diff --git 
a/modules/api/src/main/java/org/apache/ignite/table/InvocationContext.java 
b/modules/api/src/main/java/org/apache/ignite/table/InvocationContext.java
deleted file mode 100644
index dfd1743905..00
--- a/modules/api/src/main/java/org/apache/ignite/table/InvocationContext.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.table;
-
-/**
- * Invocation context provides access for the invoke operation's parameters, a 
method to set a new value for the key.
- *
- * InvokeProcessor executes atomically under lock, which makes triggering 
'live-schema' upgrade impossible within the 
- * invoke operation. Any attempt to update the row leading to schema change 
results in {@link InvokeProcessorException}.
- *
- * New value MUST be compliant with the current schema version.
- *
- * @param  Target object type.
- * @param  Value object type.
- * @see InvokeProcessor
- */
-public interface InvocationContext {
-/**
- * Returns user-provided arguments for the invoke operation.
- *
- * @return Agruments for invocation processor.
- */
-Object[] args();
-
-/**
- * Returns a user-provided object for the invoke call to run the invoke 
processor against a specified row.
- *
- * Depending on the Table view the invoke operation is called on, the 
returned value is either a value object,
- * a record object, or a tuple with value fields set.
- *
- * @return Object the target row is associated with.
- */
-K key();
-
-/**
- * Returns the current value object for the target row.
- *
- * Depending on the Table view the invoke operation is called on, the 
returning value is either a value object, 
- * a record object, a tuple with value fields set, or {@code null} for 
non-existent row.
- *
- * @return Current value of the target row or {@code null} if the value 
associated with the key does not exist.
- */
-V value();
-
-/**
- * Sets a new value object for the target row.
- *
- * Depending on the Table view the invoke operation is called on, a new 
value can be either a value object,
- * a record object, a tuple with value fields set, or {@code null} for 
removal.
- *
- * @param val Value object to set.
- * @throws InvokeProcessorException if new value is not compliant with the 
current schema.
- */
-void value(V val);
-}
diff --git 
a/modules/api/src/main/java/org/apache/ignite/table/InvokeProcessor.java 
b/modules/api/src/main/java/org/apache/ignite/table/InvokeProcessor.java
deleted file mode 100644
index

[ignite-3] branch main updated (b9259f516f -> f6a8dd1b70)

2023-05-23 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from b9259f516f IGNITE-19472 Make fsync flag configurable in RAFT (#2096)
 add f6a8dd1b70 IGNITE-19523 Unmuted 
TxAbstractTest.testRollbackUpgradedLock (#2087)

No new revisions were added by this update.

Summary of changes:
 .../java/org/apache/ignite/internal/table/TxAbstractTest.java  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)



[ignite-3] branch main updated: IGNITE-19183 Fixed LogicalNode.toString method (#2086)

2023-05-18 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 220b6a442e IGNITE-19183 Fixed LogicalNode.toString method (#2086)
220b6a442e is described below

commit 220b6a442e4703fb78a8940faf62b8676180ae50
Author: Slava Koptilin 
AuthorDate: Thu May 18 17:07:07 2023 +0300

IGNITE-19183 Fixed LogicalNode.toString method (#2086)
---
 .../cluster/management/topology/api/LogicalNode.java| 13 -
 .../org/apache/ignite/internal/hlc/HybridTimestamp.java |  2 +-
 .../ignite/internal/placementdriver/leases/Lease.java   |  9 ++---
 3 files changed, 11 insertions(+), 13 deletions(-)

diff --git 
a/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/api/LogicalNode.java
 
b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/api/LogicalNode.java
index b7ee05adf6..ce808d4a50 100644
--- 
a/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/api/LogicalNode.java
+++ 
b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/api/LogicalNode.java
@@ -19,6 +19,8 @@ package 
org.apache.ignite.internal.cluster.management.topology.api;
 
 import java.util.Collections;
 import java.util.Map;
+import org.apache.ignite.internal.tostring.IgniteToStringInclude;
+import org.apache.ignite.internal.tostring.S;
 import org.apache.ignite.network.ClusterNode;
 import org.apache.ignite.network.NetworkAddress;
 
@@ -27,6 +29,7 @@ import org.apache.ignite.network.NetworkAddress;
  */
 public class LogicalNode extends ClusterNode {
 /** Node's attributes. */
+@IgniteToStringInclude
 private final Map nodeAttributes;
 
 /**
@@ -78,9 +81,9 @@ public class LogicalNode extends ClusterNode {
 return nodeAttributes;
 }
 
-// TODO: S.toString for inherited classes do not work properly 
https://issues.apache.org/jira/browse/IGNITE-19183
-//@Override
-//public String toString() {
-//return S.toString(LogicalNode.class, this);
-//}
+/** {@inheritDoc} */
+@Override
+public String toString() {
+return S.toString(LogicalNode.class, this, super.toString());
+}
 }
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/hlc/HybridTimestamp.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/hlc/HybridTimestamp.java
index 72900366d6..5cdcebdcd5 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/hlc/HybridTimestamp.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/hlc/HybridTimestamp.java
@@ -225,7 +225,7 @@ public final class HybridTimestamp implements 
Comparable, Seria
 
 @Override
 public String toString() {
-return S.toString(HybridTimestamp.class, this);
+return S.toString(HybridTimestamp.class, this, "physical", 
getPhysical(), "logical", getLogical());
 }
 
 /**
diff --git 
a/modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/leases/Lease.java
 
b/modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/leases/Lease.java
index 4f7404d0e4..dc72c0e522 100644
--- 
a/modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/leases/Lease.java
+++ 
b/modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/leases/Lease.java
@@ -24,6 +24,7 @@ import static 
org.apache.ignite.internal.hlc.HybridTimestamp.hybridTimestamp;
 import java.nio.ByteBuffer;
 import java.nio.charset.StandardCharsets;
 import org.apache.ignite.internal.hlc.HybridTimestamp;
+import org.apache.ignite.internal.tostring.S;
 
 /**
  * A lease representation in memory.
@@ -226,12 +227,6 @@ public class Lease {
 
 @Override
 public String toString() {
-return "Lease{"
-+ "leaseholder=" + leaseholder
-+ ", accepted=" + accepted
-+ ", startTime=" + startTime
-+ ", expirationTime=" + expirationTime
-+ ", prolongable=" + prolongable
-+ '}';
+return S.toString(Lease.class, this);
 }
 }



[ignite-3] branch main updated: IGNITE-19525 Muted DeploymentManagementControllerTest.testDeploySuccessful test (#2088)

2023-05-18 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 be4f6a8877 IGNITE-19525 Muted 
DeploymentManagementControllerTest.testDeploySuccessful test (#2088)
be4f6a8877 is described below

commit be4f6a8877b956d57e931b6b1ecdc38efec7058a
Author: Mikhail 
AuthorDate: Thu May 18 17:05:53 2023 +0300

IGNITE-19525 Muted DeploymentManagementControllerTest.testDeploySuccessful 
test (#2088)
---
 .../internal/rest/deployment/DeploymentManagementControllerTest.java| 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/deployment/DeploymentManagementControllerTest.java
 
b/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/deployment/DeploymentManagementControllerTest.java
index 6086ae92ed..09023aed57 100644
--- 
a/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/deployment/DeploymentManagementControllerTest.java
+++ 
b/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/deployment/DeploymentManagementControllerTest.java
@@ -54,6 +54,7 @@ import 
org.apache.ignite.internal.rest.api.deployment.UnitStatus;
 import org.apache.ignite.internal.testframework.IntegrationTestBase;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.TestInfo;
 
@@ -94,6 +95,7 @@ public class DeploymentManagementControllerTest extends 
IntegrationTestBase {
 }
 
 @Test
+@Disabled("IGNITE-19526")
 public void testDeploySuccessful() {
 String id = "testId";
 String version = "1.1.1";



[ignite] branch master updated: IGNITE-19115 Fixed handling cache messages for recreated cache (#10618)

2023-04-14 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 910b7d58837 IGNITE-19115 Fixed handling cache messages for recreated 
cache (#10618)
910b7d58837 is described below

commit 910b7d5883711eb31224d03860f92e18470880b9
Author: Slava Koptilin 
AuthorDate: Fri Apr 14 11:29:55 2023 +0300

IGNITE-19115 Fixed handling cache messages for recreated cache (#10618)
---
 .../processors/cache/GridCacheAdapter.java |   2 +-
 .../processors/cache/GridCacheIoManager.java   | 125 --
 .../processors/cache/GridCacheMessage.java |   5 +-
 .../cache/GridCachePartitionExchangeManager.java   |   6 +-
 .../processors/cache/GridCacheProcessor.java   |   6 +
 .../cache/distributed/dht/GridDhtCache.java|   2 -
 .../cache/distributed/dht/GridDhtCacheAdapter.java |   8 +-
 .../dht/GridDhtTransactionalCacheAdapter.java  | 117 ++
 .../distributed/dht/atomic/GridDhtAtomicCache.java |  74 ++--
 .../dht/colocated/GridDhtColocatedCache.java   |  44 ++-
 .../distributed/near/GridNearAtomicCache.java  |  16 +-
 .../near/GridNearTransactionalCache.java   |  30 +-
 .../query/GridCacheDistributedQueryManager.java|  34 +-
 .../cache/query/GridCacheQueryRequest.java |   6 +-
 .../continuous/CacheContinuousQueryManager.java|  17 +-
 .../cache/transactions/IgniteTxEntry.java  |  33 +-
 .../cache/transactions/IgniteTxHandler.java|  48 +--
 .../cluster/GridClusterStateProcessor.java |   2 +-
 .../distributed/dht/IgniteCacheRecreateTest.java   | 421 +
 .../communication/GridCacheMessageSelfTest.java|   6 +-
 .../testsuites/IgniteCacheRestartTestSuite2.java   |   3 +
 21 files changed, 742 insertions(+), 263 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 9a5e378ced9..55cd09b4e94 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -646,7 +646,7 @@ public abstract class GridCacheAdapter implements 
IgniteInternalCache c = null;
 
 if (msgIdx >= 0) {
-Map idxClsHandlers0 = 
msgHandlers.idxClsHandlers;
+Map idxClsHandlers0 = 
msgHandlers.idxClsHandlers;
 
-IgniteBiInClosure[] cacheClsHandlers = 
idxClsHandlers0.get(cacheMsg.handlerId());
+IndexedClassHandler cacheClsHandlers = 
idxClsHandlers0.get(cacheMsg.handlerId());
 
-if (cacheClsHandlers != null)
-c = cacheClsHandlers[msgIdx];
+if (cacheClsHandlers != null &&
+(NONE.equals(msgTopVer) || 
!msgTopVer.before(cacheClsHandlers.startTopVer)))
+c = cacheClsHandlers.hndls[msgIdx];
 }
 
-if (c == null)
-c = msgHandlers.clsHandlers.get(new 
ListenerKey(cacheMsg.handlerId(), cacheMsg.getClass()));
+if (c == null) {
+RegularClassHandler rHnd = msgHandlers.clsHandlers.get(
+new ListenerKey(cacheMsg.handlerId(), 
cacheMsg.getClass()));
+
+if (rHnd != null && (NONE.equals(msgTopVer) || 
!msgTopVer.before(rHnd.startTopVer)))
+c = rHnd.hnd;
+}
 
 if (c == null) {
 if (processMissedHandler(nodeId, cacheMsg))
@@ -365,10 +378,10 @@ public class GridCacheIoManager extends 
GridCacheSharedManagerAdapter {
 
 msg0.append(nl()).append("Registered listeners:");
 
-Map idxClsHandlers0 = 
msgHandlers.idxClsHandlers;
+Map idxClsHandlers0 = 
msgHandlers.idxClsHandlers;
 
-for (Map.Entry e : 
idxClsHandlers0.entrySet())
-
msg0.append(nl()).append(e.getKey()).append("=").append(Arrays.toString(e.getValue()));
+for (Map.Entry e : 
idxClsHandlers0.entrySet())
+
msg0.append(nl()).append(e.getKey()).append("=").append(Arrays.toString(e.getValue().hndls));
 
 if (cctx.kernalContext().isStopping()) {
 if (log.isDebugEnabled())
@@ -1402,12 +1415,30 @@ public class GridCacheIoManager extends 
GridCacheSharedManagerAdapter {
  */
 public  void addCacheHandler(
 int hndId,
+AffinityTopologyVersion startTopVer,
 Class type,
 IgniteBiInClosure c
 ) {
 assert !type.isAssignableFrom(GridCacheGroupIdMessage.class) : type;
 
-addHandler(hndId, type, c, cacheHandlers);
+addH

[ignite-3] branch main updated (f6e5179214 -> cfcdc11fb4)

2023-04-13 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

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


from f6e5179214 IGNITE-19099 Java client: Add basic authentication support 
(#1935)
 add cfcdc11fb4 IGNITE-18954 add the ability to filter node's attributes 
(#1932)

No new revisions were added by this update.

Summary of changes:
 modules/distribution-zones/build.gradle|   4 +-
 .../distributionzones/DistributionZoneManager.java |   6 +
 .../distributionzones/DistributionZonesUtil.java   |  47 ++
 .../DistributionZoneConfigurationSchema.java   |   3 +-
 .../DistributionZoneFiltersTest.java   | 183 +
 5 files changed, 240 insertions(+), 3 deletions(-)
 create mode 100644 
modules/distribution-zones/src/test/java/org/apache/ignite/internal/distributionzones/DistributionZoneFiltersTest.java



[ignite-3] branch main updated: IGNITE-15087 Removed outdated TODO

2023-04-13 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 eaeb43db00 IGNITE-15087 Removed outdated TODO
eaeb43db00 is described below

commit eaeb43db00a03a3325c211ab64d83c3ec603341c
Author: Slava Koptilin 
AuthorDate: Thu Apr 13 10:37:53 2023 +0300

IGNITE-15087 Removed outdated TODO
---
 modules/transactions/README.md | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/transactions/README.md b/modules/transactions/README.md
index 58c0ed6a55..558b3c4778 100644
--- a/modules/transactions/README.md
+++ b/modules/transactions/README.md
@@ -190,16 +190,14 @@ The locking rules are same as for get/put operations.
 Then values are removed from indexes on step 2, they are written as tombstones 
to avoid read inconsistency and should be 
 cleaned up after tx finish.
 
-TODO IGNITE-15087: tx example flow with enabled index(es)
-
 # Failover handling
 Failover protocol is similar to Ignite 2 with a main difference: until tx is 
sure it can commit or rollback, it holds
 its locks. This means in the case of split-brain, some keys will be locked 
until split-brain situation is resolved and
 tx recovery protocol will converge. Consult a 2PC paper for details when it's 
possible, for example [3](#f3)
 
-## Leaserholder fail
+## Leaseholder fail
 If a tx is not started to COMMIT, the coordinator reverts a transaction on 
remaining leaseholders.
-Then a new leasholder is elected, it checks for its pending transactions and 
asks a coordinator if it's possible to commit.
+Then a new leaseholder is elected, it checks for its pending transactions and 
asks a coordinator if it's possible to commit.
 
 ## Coordinator fail
 Broadcast recovery (various strategies are possible: via gossip or dedicated 
node) is necessary (because we don't have 



[ignite-3] branch main updated: IGNITE-17924 Fixed TODO link

2023-04-13 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 e3a6b7ac29 IGNITE-17924 Fixed TODO link
e3a6b7ac29 is described below

commit e3a6b7ac2975fdc97db99d4e9976e332dd4e9129
Author: Slava Koptilin 
AuthorDate: Thu Apr 13 10:31:08 2023 +0300

IGNITE-17924 Fixed TODO link
---
 .../main/java/org/apache/ignite/internal/baseline/BaselineManager.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/modules/baseline/src/main/java/org/apache/ignite/internal/baseline/BaselineManager.java
 
b/modules/baseline/src/main/java/org/apache/ignite/internal/baseline/BaselineManager.java
index c12263d19e..6410bde415 100644
--- 
a/modules/baseline/src/main/java/org/apache/ignite/internal/baseline/BaselineManager.java
+++ 
b/modules/baseline/src/main/java/org/apache/ignite/internal/baseline/BaselineManager.java
@@ -28,7 +28,7 @@ import org.apache.ignite.network.ClusterService;
  * Baseline manager is responsible for handling baseline related logic.
  */
 // TODO: IGNITE-14586 Remove @SuppressWarnings when implementation provided.
-// TODO: https://issues.apache.org/jira/browse/IGNITE-17924 Adapt concept of 
baseline topology IEP-4.
+// TODO: https://issues.apache.org/jira/browse/IGNITE-18624
 @SuppressWarnings({"FieldCanBeLocal", "unused"})
 public class BaselineManager implements IgniteComponent {
 /** Configuration manager in order to handle and listen baseline specific 
configuration. */



  1   2   3   4   5   6   >