This is an automated email from the ASF dual-hosted git repository.

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

commit e8a56f52f2e251c6099f0236ccb7d3a8a9a82e7c
Author: Kirill Tkalenko <[email protected]>
AuthorDate: Mon Nov 17 18:41:19 2025 +0300

    IGNITE-27081 wip
---
 .../java/org/apache/ignite/internal/raft/Loza.java | 23 +++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git 
a/modules/raft/src/main/java/org/apache/ignite/internal/raft/Loza.java 
b/modules/raft/src/main/java/org/apache/ignite/internal/raft/Loza.java
index d0b8e238365..046115cccd4 100644
--- a/modules/raft/src/main/java/org/apache/ignite/internal/raft/Loza.java
+++ b/modules/raft/src/main/java/org/apache/ignite/internal/raft/Loza.java
@@ -30,6 +30,7 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.function.BiConsumer;
 import org.apache.ignite.internal.configuration.SystemLocalConfiguration;
+import org.apache.ignite.internal.configuration.SystemPropertyConfiguration;
 import org.apache.ignite.internal.failure.FailureManager;
 import org.apache.ignite.internal.hlc.HybridClock;
 import org.apache.ignite.internal.lang.IgniteInternalException;
@@ -85,6 +86,9 @@ public class Loza implements RaftManager {
     /** Raft client pool size. Size was taken from jraft's TimeManager. */
     private static final int CLIENT_POOL_SIZE = Math.min(Utils.cpus() * 3, 20);
 
+    /** Name of the system property to configure is {@link 
NodeOptions#getSnapshotIntervalSecs()}. */
+    private static final String RAFT_SNAPSHOT_INTERVAL_SECS_PROPERTY_NAME = 
"raftSnapshotIntervalSecs";
+
     /** Logger. */
     private static final IgniteLogger LOG = Loggers.forClass(Loza.class);
 
@@ -165,12 +169,13 @@ public class Loza implements RaftManager {
         this.raftConfiguration = raftConfiguration;
         this.metricManager = metricManager;
 
-        // TODO: IGNITE-27081 Вот тут надо будет читать системную пропертю
         NodeOptions options = new NodeOptions();
 
         options.setClock(clock);
         options.setCommandsMarshaller(new 
ThreadLocalOptimizedMarshaller(clusterNetSvc.serializationRegistry()));
 
+        setSnapshotIntervalSecs(options, systemLocalConfiguration);
+
         this.opts = options;
 
         double maxInflightOverflowRate = 
raftConfiguration.maxInflightOverflowRate().value();
@@ -706,4 +711,20 @@ public class Loza implements RaftManager {
     public Set<RaftNodeId> localNodes() {
         return raftServer.localNodes();
     }
+
+    private static void setSnapshotIntervalSecs(NodeOptions options, 
SystemLocalConfiguration systemLocalConfiguration) {
+        SystemPropertyConfiguration systemPropertyConfig = 
systemLocalConfiguration
+                .properties()
+                .get(RAFT_SNAPSHOT_INTERVAL_SECS_PROPERTY_NAME);
+
+        if (systemPropertyConfig == null) {
+            return;
+        }
+
+        try {
+            
options.setSnapshotIntervalSecs(Integer.parseInt(systemPropertyConfig.propertyValue().value()));
+        } catch (NumberFormatException e) {
+            LOG.warn("Failed to set NodeOptions.getSnapshotIntervalSecs, 
default value will be used", e);
+        }
+    }
 }

Reply via email to