(ignite-3) branch main updated: IGNITE-21902 Add an option to configure log storage path (#3605)
This is an automated email from the ASF dual-hosted git repository. ibessonov 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 79d5bc824d IGNITE-21902 Add an option to configure log storage path (#3605) 79d5bc824d is described below commit 79d5bc824d001f97f09e9b06ec9f5a5a094fb15e Author: Phillippko AuthorDate: Mon Apr 15 19:02:28 2024 +0400 IGNITE-21902 Add an option to configure log storage path (#3605) --- .../server/raft/ItMetaStorageRaftGroupTest.java| 24 - .../configuration/RaftConfigurationSchema.java | 4 + .../ignite/raft/server/ItJraftHlcServerTest.java | 12 +-- .../raft/server/ItJraftServerLogPathTest.java | 113 + .../raft/server/ItSimpleCounterServerTest.java | 7 +- .../ignite/raft/server/JraftAbstractTest.java | 17 +--- .../ignite/raft/server/RaftServerAbstractTest.java | 34 +++ .../java/org/apache/ignite/internal/raft/Loza.java | 2 +- .../internal/raft/server/impl/JraftServerImpl.java | 41 ++-- .../storage/impl/DefaultLogStorageFactory.java | 21 ++-- .../raft/storage/logit/LogitLogStorageFactory.java | 17 ++-- .../ignite/raft/jraft/option/NodeOptions.java | 1 - .../jraft/storage/impl/LogStorageBenchmark.java| 2 +- .../jraft/storage/logit/LogitLogStorageTest.java | 3 +- .../service/ItAbstractListenerSnapshotTest.java| 2 +- .../AbstractTopologyAwareGroupServiceTest.java | 1 + 16 files changed, 233 insertions(+), 68 deletions(-) diff --git a/modules/metastorage/src/integrationTest/java/org/apache/ignite/internal/metastorage/server/raft/ItMetaStorageRaftGroupTest.java b/modules/metastorage/src/integrationTest/java/org/apache/ignite/internal/metastorage/server/raft/ItMetaStorageRaftGroupTest.java index fc29e48c7f..e3e6907dbc 100644 --- a/modules/metastorage/src/integrationTest/java/org/apache/ignite/internal/metastorage/server/raft/ItMetaStorageRaftGroupTest.java +++ b/modules/metastorage/src/integrationTest/java/org/apache/ignite/internal/metastorage/server/raft/ItMetaStorageRaftGroupTest.java @@ -365,11 +365,29 @@ public class ItMetaStorageRaftGroupTest extends IgniteAbstractTest { List.of(new UserReplicatorStateListener(replicatorStartedCounter, replicatorStoppedCounter))); opt3.setCommandsMarshaller(commandsMarshaller); -metaStorageRaftSrv1 = new JraftServerImpl(cluster.get(0), workDir.resolve("node1"), opt1, new RaftGroupEventsClientListener()); +metaStorageRaftSrv1 = new JraftServerImpl( +cluster.get(0), +workDir.resolve("node1"), +raftConfiguration, +opt1, +new RaftGroupEventsClientListener() +); -metaStorageRaftSrv2 = new JraftServerImpl(cluster.get(1), workDir.resolve("node2"), opt2, new RaftGroupEventsClientListener()); +metaStorageRaftSrv2 = new JraftServerImpl( +cluster.get(1), +workDir.resolve("node2"), +raftConfiguration, +opt2, +new RaftGroupEventsClientListener() +); -metaStorageRaftSrv3 = new JraftServerImpl(cluster.get(2), workDir.resolve("node3"), opt3, new RaftGroupEventsClientListener()); +metaStorageRaftSrv3 = new JraftServerImpl( +cluster.get(2), +workDir.resolve("node3"), +raftConfiguration, +opt3, +new RaftGroupEventsClientListener() +); metaStorageRaftSrv1.start(); diff --git a/modules/raft-api/src/main/java/org/apache/ignite/internal/raft/configuration/RaftConfigurationSchema.java b/modules/raft-api/src/main/java/org/apache/ignite/internal/raft/configuration/RaftConfigurationSchema.java index ff888b4425..b31714a049 100644 --- a/modules/raft-api/src/main/java/org/apache/ignite/internal/raft/configuration/RaftConfigurationSchema.java +++ b/modules/raft-api/src/main/java/org/apache/ignite/internal/raft/configuration/RaftConfigurationSchema.java @@ -83,4 +83,8 @@ public class RaftConfigurationSchema { */ @Value(hasDefault = true) public boolean logYieldStrategy = false; + +/** Directory where log is stored. By default "log" subfolder of data storage path is used. */ +@Value(hasDefault = true) +public String logPath = ""; } diff --git a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/ItJraftHlcServerTest.java b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/ItJraftHlcServerTest.java index 5c70787eb7..8ff1d94fdc 100644 --- a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/ItJraftHlcServerTest.java +++ b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/ItJraftHlcServerTest.java @@ -47,7 +47,6 @@ import org.apache.ignite.network.NetworkAddress; import
(ignite-3) branch main updated (ea454d40b4 -> 1bee9be9f8)
This is an automated email from the ASF dual-hosted git repository. ppa pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/ignite-3.git from ea454d40b4 IGNITE-22045 Fix ItComputeApiThreadingTest (#3607) add 1bee9be9f8 IGNITE-21976 Sql. Amend TREE keyword to SORTED for CREATE INDEX syntax (#3601) No new revisions were added by this update. Summary of changes: docs/_docs/sql-reference/ddl.adoc| 4 ++-- .../src/main/java/org/apache/ignite/catalog/IndexType.java | 2 +- .../internal/catalog/sql/CreateFromAnnotationsTest.java | 6 +++--- .../internal/catalog/sql/CreateFromDefinitionTest.java | 6 +++--- .../apache/ignite/internal/catalog/sql/CreateTableTest.java | 8 .../apache/ignite/internal/catalog/sql/QueryPartTest.java| 12 ++-- .../internal/cli/commands/sql/help/IgniteSqlCommand.java | 2 +- .../internal/placementdriver/ItPrimaryReplicaChoiceTest.java | 2 +- .../internal/benchmark/SqlPartitionPruningBenchmark.java | 2 +- .../org/apache/ignite/internal/table/ItTableScanTest.java| 2 +- .../ignite/internal/sql/engine/ItIndexesSystemViewTest.java | 2 +- .../sql/engine/datatypes/tests/BaseIndexDataTypeTest.java| 2 +- modules/sql-engine/src/main/codegen/config.fmpp | 2 -- modules/sql-engine/src/main/codegen/includes/parserImpls.ftl | 6 +++--- .../sql/engine/prepare/ddl/DdlSqlToCommandConverter.java | 4 ++-- .../ignite/internal/sql/engine/sql/IgniteSqlCreateIndex.java | 2 +- .../ignite/internal/sql/engine/sql/IgniteSqlIndexType.java | 6 +++--- .../ignite/internal/sql/engine/sql/SqlDdlParserTest.java | 10 +- 18 files changed, 39 insertions(+), 41 deletions(-)
(ignite-3) branch main updated: IGNITE-22045 Fix ItComputeApiThreadingTest (#3607)
This is an automated email from the ASF dual-hosted git repository. sanpwc 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 ea454d40b4 IGNITE-22045 Fix ItComputeApiThreadingTest (#3607) ea454d40b4 is described below commit ea454d40b4ea150a357228aae5edc53308a1eb52 Author: Roman Puchkovskiy AuthorDate: Mon Apr 15 19:11:10 2024 +0400 IGNITE-22045 Fix ItComputeApiThreadingTest (#3607) --- .../threading/ItComputeApiThreadingTest.java | 2 +- .../internal/network/NettyWorkersRegistrar.java| 31 ++ .../ignite/internal/replicator/ReplicaManager.java | 4 +-- .../runner/app/ItIgniteNodeRestartTest.java| 3 ++- .../org/apache/ignite/internal/app/IgniteImpl.java | 3 ++- 5 files changed, 33 insertions(+), 10 deletions(-) diff --git a/modules/compute/src/integrationTest/java/org/apache/ignite/internal/compute/threading/ItComputeApiThreadingTest.java b/modules/compute/src/integrationTest/java/org/apache/ignite/internal/compute/threading/ItComputeApiThreadingTest.java index 287db4381d..1d8ac1d95c 100644 --- a/modules/compute/src/integrationTest/java/org/apache/ignite/internal/compute/threading/ItComputeApiThreadingTest.java +++ b/modules/compute/src/integrationTest/java/org/apache/ignite/internal/compute/threading/ItComputeApiThreadingTest.java @@ -99,7 +99,7 @@ class ItComputeApiThreadingTest extends ClusterPerClassIntegrationTest { CompletableFuture completerFuture = operation.executeOn(compute) .thenApply(unused -> currentThread()); -assertThat(completerFuture, willBe(anIgniteThread())); +assertThat(completerFuture, willBe(either(is(currentThread())).or(anIgniteThread(; } private static IgniteCompute computeForInternalUse() { diff --git a/modules/network/src/main/java/org/apache/ignite/internal/network/NettyWorkersRegistrar.java b/modules/network/src/main/java/org/apache/ignite/internal/network/NettyWorkersRegistrar.java index d164cbd74a..d9246f24cc 100644 --- a/modules/network/src/main/java/org/apache/ignite/internal/network/NettyWorkersRegistrar.java +++ b/modules/network/src/main/java/org/apache/ignite/internal/network/NettyWorkersRegistrar.java @@ -29,6 +29,11 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.Future; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; +import org.apache.ignite.internal.failure.FailureContext; +import org.apache.ignite.internal.failure.FailureProcessor; +import org.apache.ignite.internal.failure.FailureType; +import org.apache.ignite.internal.logger.IgniteLogger; +import org.apache.ignite.internal.logger.Loggers; import org.apache.ignite.internal.manager.IgniteComponent; import org.apache.ignite.internal.worker.CriticalWorker; import org.apache.ignite.internal.worker.CriticalWorkerRegistry; @@ -39,6 +44,8 @@ import org.jetbrains.annotations.Nullable; * This component is responsible for registering Netty workers with the {@link CriticalWorkerRegistry} and for updating their heartbeats. */ public class NettyWorkersRegistrar implements IgniteComponent { +private static final IgniteLogger LOG = Loggers.forClass(NettyWorkersRegistrar.class); + /* * It seems impossible to instrument tasks executed by Netty event loops, so the strategy we use is to * send 'heartbeat' tasks to each of the event loops periodically; these tasks just update the heartbeat timestamp @@ -54,6 +61,8 @@ public class NettyWorkersRegistrar implements IgniteComponent { private final CriticalWorkersConfiguration criticalWorkersConfiguration; +private final FailureProcessor failureProcessor; + private volatile List workers; @Nullable @@ -66,17 +75,20 @@ public class NettyWorkersRegistrar implements IgniteComponent { * blocked. * @param scheduler Used to schedule periodic tasks. * @param bootstrapFactory Used to obtain Netty workers. + * @param failureProcessor Used to process failures. */ public NettyWorkersRegistrar( CriticalWorkerRegistry criticalWorkerRegistry, ScheduledExecutorService scheduler, NettyBootstrapFactory bootstrapFactory, -CriticalWorkersConfiguration criticalWorkersConfiguration +CriticalWorkersConfiguration criticalWorkersConfiguration, +FailureProcessor failureProcessor ) { this.criticalWorkerRegistry = criticalWorkerRegistry; this.scheduler = scheduler; this.bootstrapFactory = bootstrapFactory; this.criticalWorkersConfiguration = criticalWorkersConfiguration; +this.failureProcessor = failureProcessor; } @Override @@ -109,12 +121,21 @@ public class NettyWorkersRegistrar implements IgniteComponent { } private void sendHearbeats() {
(ignite-3) branch main updated (770030b063 -> a7545f3bea)
This is an automated email from the ASF dual-hosted git repository. jooger pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/ignite-3.git from 770030b063 IGNITE-22038 Make idle safe time sending more robust (#3602) add a7545f3bea IGNITE-22022: Support of JSON object with nested object creation (#3592) No new revisions were added by this update. Summary of changes: .../internal/sql/engine/ItSqlOperatorsTest.java| 39 -- .../sql/function/json/test_json.test | 16 +++-- .../internal/sql/engine/externalize/RelJson.java | 5 ++- .../sql/engine/prepare/IgniteSqlValidator.java | 9 +++-- .../sql/engine/sql/fun/IgniteSqlOperatorTable.java | 1 + .../internal/sql/engine/util/IgniteResource.java | 3 ++ 6 files changed, 64 insertions(+), 9 deletions(-)
(ignite) branch master updated: IGNITE-21770 Extend logging for the AbstractFileIO#fully() method (#11294)
This is an automated email from the ASF dual-hosted git repository. timoninmaxim pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/master by this push: new af869206090 IGNITE-21770 Extend logging for the AbstractFileIO#fully() method (#11294) af869206090 is described below commit af869206090a36ff456d6d336fbd88906a2764c4 Author: oleg-vlsk <153691984+oleg-v...@users.noreply.github.com> AuthorDate: Mon Apr 15 18:04:28 2024 +1000 IGNITE-21770 Extend logging for the AbstractFileIO#fully() method (#11294) --- .../cache/persistence/file/AbstractFileIO.java | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/AbstractFileIO.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/AbstractFileIO.java index 68bedb04b5d..6b6fb53649e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/AbstractFileIO.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/AbstractFileIO.java @@ -44,6 +44,8 @@ public abstract class AbstractFileIO implements FileIO { * @param operation IO operation. * * @param num Number of bytes to operate. + * + * @return Number of bytes operated. */ private int fully(IOOperation operation, long position, int num, boolean write) throws IOException { if (num > 0) { @@ -62,9 +64,19 @@ public abstract class AbstractFileIO implements FileIO { if (time == 0) time = System.nanoTime(); -else if ((System.nanoTime() - time) >= U.millisToNanos(MAX_IO_TIMEOUT_MS)) -throw new IOException(write && (position + i) == size() ? "Failed to extend file." : -"Probably disk is too busy, please check your device."); +else if ((System.nanoTime() - time) >= U.millisToNanos(MAX_IO_TIMEOUT_MS)) { +String errMsg = " operation unsuccessful, timeout exceeds the maximum IO timeout (" ++ U.millisToNanos(MAX_IO_TIMEOUT_MS) + " ms). "; + +if (write && (position + i) == size()) +errMsg = "Write" + errMsg + "Failed to extend file."; +else { +errMsg = (write ? "Write" : "Read") + errMsg + +"Probably disk is too busy, please check your device."; +} + +throw new IOException(errMsg); +} } else return -1;
(ignite) branch master updated: IGNITE-21884 Removal of MvccIO and MvccVersionAware (#11299)
This is an automated email from the ASF dual-hosted git repository. av pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/master by this push: new 1bb2920dda9 IGNITE-21884 Removal of MvccIO and MvccVersionAware (#11299) 1bb2920dda9 is described below commit 1bb2920dda9754eb26aa1caadbbd25740ec2ec70 Author: Ilya Shishkov AuthorDate: Mon Apr 15 15:18:57 2024 +0300 IGNITE-21884 Removal of MvccIO and MvccVersionAware (#11299) --- .../internal/cache/query/index/IndexProcessor.java | 8 +- .../cache/query/index/sorted/IndexRow.java | 30 +-- .../cache/query/index/sorted/IndexRowImpl.java | 20 - .../sorted/defragmentation/DefragIndexFactory.java | 30 --- .../query/index/sorted/inline/InlineIndexTree.java | 68 ++ .../sorted/inline/io/AbstractInlineInnerIO.java| 27 ++ .../sorted/inline/io/AbstractInlineLeafIO.java | 27 ++ .../query/index/sorted/inline/io/InlineIO.java | 2 +- .../cache/query/index/sorted/inline/io/MvccIO.java | 49 -- .../index/sorted/inline/io/MvccInlineInnerIO.java | 50 --- .../index/sorted/inline/io/MvccInlineLeafIO.java | 49 -- .../query/index/sorted/inline/io/MvccInnerIO.java | 53 --- .../query/index/sorted/inline/io/MvccLeafIO.java | 53 --- .../internal/processors/cache/mvcc/MvccUtils.java | 38 .../processors/cache/mvcc/MvccVersionAware.java| 76 .../processors/cache/persistence/CacheDataRow.java | 3 +- .../cache/persistence/CacheDataRowAdapter.java | 44 - .../cache/persistence/CacheSearchRow.java | 3 +- .../cache/persistence/GridCacheOffheapManager.java | 40 - .../cache/persistence/tree/io/DataPageIO.java | 100 +++-- .../cache/persistence/tree/io/PageIO.java | 97 +++- .../internal/processors/cache/tree/SearchRow.java | 25 -- .../persistence/tree/io/PageIOFreeSizeTest.java| 2 +- .../processors/database/CacheFreeListSelfTest.java | 40 - .../processors/query/h2/opt/H2CacheRow.java| 40 - .../internal/processors/query/h2/opt/H2Row.java| 28 +- 26 files changed, 56 insertions(+), 946 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/IndexProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/IndexProcessor.java index 9c1086e0cce..4f14bf8b7e5 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/IndexProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/IndexProcessor.java @@ -42,8 +42,6 @@ import org.apache.ignite.internal.cache.query.index.sorted.inline.io.AbstractInl import org.apache.ignite.internal.cache.query.index.sorted.inline.io.AbstractInlineLeafIO; import org.apache.ignite.internal.cache.query.index.sorted.inline.io.InnerIO; import org.apache.ignite.internal.cache.query.index.sorted.inline.io.LeafIO; -import org.apache.ignite.internal.cache.query.index.sorted.inline.io.MvccInnerIO; -import org.apache.ignite.internal.cache.query.index.sorted.inline.io.MvccLeafIO; import org.apache.ignite.internal.managers.indexing.IndexesRebuildTask; import org.apache.ignite.internal.pagemem.PageIdAllocator; import org.apache.ignite.internal.pagemem.PageMemory; @@ -90,7 +88,7 @@ public class IndexProcessor extends GridProcessorAdapter { * Register inline IOs for sorted indexes. */ public static void registerIO() { -PageIO.registerH2(InnerIO.VERSIONS, LeafIO.VERSIONS, MvccInnerIO.VERSIONS, MvccLeafIO.VERSIONS); +PageIO.registerH2(InnerIO.VERSIONS, LeafIO.VERSIONS); AbstractInlineInnerIO.register(); AbstractInlineLeafIO.register(); @@ -522,8 +520,8 @@ public class IndexProcessor extends GridProcessorAdapter { removeId, metaPageId, reuseList, -AbstractInlineInnerIO.versions(inlineSize, mvccEnabled), -AbstractInlineLeafIO.versions(inlineSize, mvccEnabled), +AbstractInlineInnerIO.versions(inlineSize), +AbstractInlineLeafIO.versions(inlineSize), PageIdAllocator.FLAG_IDX, ctx.failure(), ctx.cache().context().diagnostic().pageLockTracker() diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/IndexRow.java b/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/IndexRow.java index d6c2e51f252..d4f514a03f6 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/IndexRow.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/IndexRow.java @@ -19,18 +19,12 @@ package org.apache.ignite.internal.cache.query.index.sorted; import