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

vpyatkov 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 e9df1de177 IGNITE-21798 Add properties to configure number of RAFT 
threads (#3432)
e9df1de177 is described below

commit e9df1de17764aae042551920ae2644cbdb33f293
Author: Vladislav Pyatkov <[email protected]>
AuthorDate: Wed Mar 20 13:01:21 2024 +0300

    IGNITE-21798 Add properties to configure number of RAFT threads (#3432)
---
 .../configuration/RaftConfigurationSchema.java     | 18 ++++++++++
 .../apache/ignite/raft/jraft/core/ItNodeTest.java  |  1 +
 .../raft/server/ItJraftCounterServerTest.java      | 15 +++++++--
 .../java/org/apache/ignite/internal/raft/Loza.java |  3 ++
 .../internal/raft/server/impl/JraftServerImpl.java | 10 ++++--
 .../org/apache/ignite/raft/jraft/JRaftUtils.java   |  1 +
 .../apache/ignite/raft/jraft/core/NodeImpl.java    | 12 ++++---
 .../raft/jraft/disruptor/StripedDisruptor.java     | 14 +++++---
 .../ignite/raft/jraft/option/NodeOptions.java      | 38 +++++++++++++++++++++-
 .../ignite/disruptor/StripedDisruptorTest.java     |  2 ++
 .../ignite/raft/jraft/core/FSMCallerTest.java      |  9 ++---
 .../raft/jraft/core/ReadOnlyServiceTest.java       | 13 ++++----
 .../raft/jraft/storage/impl/LogManagerTest.java    | 15 +++++----
 .../ItRaftCommandLeftInLogUntilRestartTest.java    |  1 +
 14 files changed, 120 insertions(+), 32 deletions(-)

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 148b12d622..ff888b4425 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
@@ -65,4 +65,22 @@ public class RaftConfigurationSchema {
      */
     @Value(hasDefault = true)
     public boolean fsync = true;
+
+    /**
+     * Amount of Disruptors that will handle the RAFT server.
+     */
+    @Value(hasDefault = true)
+    public int stripes = Runtime.getRuntime().availableProcessors() * 2;
+
+    /**
+     * Amount of log manager Disruptors stripes.
+     */
+    @Value(hasDefault = true)
+    public int logStripesCount = Runtime.getRuntime().availableProcessors() * 
2;
+
+    /**
+     * Set true to use the non-blocking strategy in the log manager.
+     */
+    @Value(hasDefault = true)
+    public boolean logYieldStrategy = false;
 }
diff --git 
a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/jraft/core/ItNodeTest.java
 
b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/jraft/core/ItNodeTest.java
index dafcb0db68..85939b4104 100644
--- 
a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/jraft/core/ItNodeTest.java
+++ 
b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/jraft/core/ItNodeTest.java
@@ -3832,6 +3832,7 @@ public class ItNodeTest extends BaseIgniteAbstractTest {
      */
     private RaftGroupService createService(String groupId, TestPeer peer, 
NodeOptions nodeOptions, Collection<TestPeer> peers) {
         nodeOptions.setStripes(1);
+        nodeOptions.setLogStripesCount(1);
 
         List<NetworkAddress> addressList = peers.stream()
             .map(p -> new NetworkAddress(TestUtils.getLocalAddress(), 
p.getPort()))
diff --git 
a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/ItJraftCounterServerTest.java
 
b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/ItJraftCounterServerTest.java
index b2db156a24..e2d9c197ae 100644
--- 
a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/ItJraftCounterServerTest.java
+++ 
b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/server/ItJraftCounterServerTest.java
@@ -67,7 +67,6 @@ import org.apache.ignite.internal.util.IgniteUtils;
 import org.apache.ignite.raft.jraft.core.NodeImpl;
 import org.apache.ignite.raft.jraft.core.StateMachineAdapter;
 import org.apache.ignite.raft.jraft.entity.RaftOutter.SnapshotMeta;
-import org.apache.ignite.raft.jraft.option.NodeOptions;
 import org.apache.ignite.raft.jraft.rpc.impl.RaftException;
 import org.apache.ignite.raft.jraft.util.ExecutorServiceHelper;
 import org.apache.ignite.raft.messages.TestRaftMessagesFactory;
@@ -92,6 +91,12 @@ class ItJraftCounterServerTest extends JraftAbstractTest {
      */
     private static final TestReplicationGroupId COUNTER_GROUP_1 = new 
TestReplicationGroupId("counter1");
 
+    /** Amount of stripes for disruptors that are used by JRAFT. */
+    private static final int RAFT_STRIPES = 3;
+
+    /** Amount of stripes for disruptors that are used by the log service for 
JRAFT. */
+    private static final int RAFT_LOG_STRIPES = 1;
+
     /**
      * Listener factory.
      */
@@ -135,7 +140,11 @@ class ItJraftCounterServerTest extends JraftAbstractTest {
             var nodeId = new RaftNodeId(new 
TestReplicationGroupId("test_raft_group"), 
initialMembersConf.peer(localNodeName));
 
             raftServer.startRaftNode(nodeId, initialMembersConf, 
listenerFactory.get(), groupOptions(raftServer));
-        }, opts -> {});
+        }, opts -> {
+            opts.setStripes(RAFT_STRIPES);
+            opts.setLogStripesCount(RAFT_LOG_STRIPES);
+            opts.setLogYieldStrategy(true);
+        });
 
         Set<Thread> threads = getAllDisruptorCurrentThreads();
 
@@ -143,7 +152,7 @@ class ItJraftCounterServerTest extends JraftAbstractTest {
 
         Set<String> threadNamesBefore = 
threads.stream().map(Thread::getName).collect(toSet());
 
-        assertEquals(NodeOptions.DEFAULT_STRIPES * 4/* services */, 
threadsBefore, "Started thread names: " + threadNamesBefore);
+        assertEquals(RAFT_STRIPES * 3/* services */ + RAFT_LOG_STRIPES, 
threadsBefore, "Started thread names: " + threadNamesBefore);
 
         servers.forEach(srv -> {
             String localNodeName = 
srv.clusterService().topologyService().localMember().name();
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 1b40539566..5ceaed2349 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
@@ -178,6 +178,9 @@ public class Loza implements RaftManager {
         RaftView raftConfig = raftConfiguration.value();
 
         
opts.setRpcInstallSnapshotTimeout(raftConfig.rpcInstallSnapshotTimeout());
+        opts.setStripes(raftConfig.stripes());
+        opts.setLogStripesCount(raftConfig.logStripesCount());
+        opts.setLogYieldStrategy(raftConfig.logYieldStrategy());
 
         opts.getRaftOptions().setSync(raftConfig.fsync());
 
diff --git 
a/modules/raft/src/main/java/org/apache/ignite/internal/raft/server/impl/JraftServerImpl.java
 
b/modules/raft/src/main/java/org/apache/ignite/internal/raft/server/impl/JraftServerImpl.java
index de696e2f1a..040a82156e 100644
--- 
a/modules/raft/src/main/java/org/apache/ignite/internal/raft/server/impl/JraftServerImpl.java
+++ 
b/modules/raft/src/main/java/org/apache/ignite/internal/raft/server/impl/JraftServerImpl.java
@@ -299,6 +299,7 @@ public class JraftServerImpl implements RaftServer {
                     opts.getRaftOptions().getDisruptorBufferSize(),
                     ApplyTask::new,
                     opts.getStripes(),
+                    false,
                     false
             ));
         }
@@ -310,6 +311,7 @@ public class JraftServerImpl implements RaftServer {
                     opts.getRaftOptions().getDisruptorBufferSize(),
                     LogEntryAndClosure::new,
                     opts.getStripes(),
+                    false,
                     false
             ));
         }
@@ -321,6 +323,7 @@ public class JraftServerImpl implements RaftServer {
                     opts.getRaftOptions().getDisruptorBufferSize(),
                     ReadIndexEvent::new,
                     opts.getStripes(),
+                    false,
                     false
             ));
         }
@@ -331,11 +334,12 @@ public class JraftServerImpl implements RaftServer {
                     "JRaft-LogManager-Disruptor",
                     opts.getRaftOptions().getDisruptorBufferSize(),
                     StableClosureEvent::new,
-                    opts.getStripes(),
-                    true
+                    opts.getLogStripesCount(),
+                    true,
+                    opts.isLogYieldStrategy()
             ));
 
-            opts.setLogStripes(IntStream.range(0, 
opts.getStripes()).mapToObj(i -> new Stripe()).collect(toList()));
+            opts.setLogStripes(IntStream.range(0, 
opts.getLogStripesCount()).mapToObj(i -> new Stripe()).collect(toList()));
         }
 
         logStorageFactory.start();
diff --git 
a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/JRaftUtils.java 
b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/JRaftUtils.java
index 2660d44e7b..74de8e2dcd 100644
--- a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/JRaftUtils.java
+++ b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/JRaftUtils.java
@@ -63,6 +63,7 @@ public final class JRaftUtils {
 
         if (nodeOpts != null) {
             nodeOpts.setStripes(1);
+            nodeOpts.setLogStripesCount(1);
         }
 
         final boolean ret = node.bootstrap(opts);
diff --git 
a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/NodeImpl.java 
b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/NodeImpl.java
index 19449526ed..985f10e27d 100644
--- a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/NodeImpl.java
+++ b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/NodeImpl.java
@@ -49,7 +49,6 @@ import 
org.apache.ignite.internal.raft.storage.impl.RocksDbSharedLogStorage;
 import org.apache.ignite.internal.raft.storage.impl.StripeAwareLogManager;
 import 
org.apache.ignite.internal.raft.storage.impl.StripeAwareLogManager.Stripe;
 import org.apache.ignite.internal.thread.IgniteThreadFactory;
-import org.apache.ignite.internal.thread.NamedThreadFactory;
 import org.apache.ignite.raft.jraft.Closure;
 import org.apache.ignite.raft.jraft.FSMCaller;
 import org.apache.ignite.raft.jraft.JRaftServiceFactory;
@@ -1247,6 +1246,7 @@ public class NodeImpl implements Node, RaftServerService {
                 opts.getRaftOptions().getDisruptorBufferSize(),
                 () -> new FSMCallerImpl.ApplyTask(),
                 opts.getStripes(),
+                false,
                 false
             ));
         } else if (ownFsmCallerExecutorDisruptorConfig != null) {
@@ -1256,6 +1256,7 @@ public class NodeImpl implements Node, RaftServerService {
                 opts.getRaftOptions().getDisruptorBufferSize(),
                 () -> new FSMCallerImpl.ApplyTask(),
                 ownFsmCallerExecutorDisruptorConfig.getStripes(),
+                false,
                 false
             ));
         }
@@ -1267,6 +1268,7 @@ public class NodeImpl implements Node, RaftServerService {
                 opts.getRaftOptions().getDisruptorBufferSize(),
                 () -> new NodeImpl.LogEntryAndClosure(),
                 opts.getStripes(),
+                false,
                 false
             ));
         }
@@ -1278,6 +1280,7 @@ public class NodeImpl implements Node, RaftServerService {
                 opts.getRaftOptions().getDisruptorBufferSize(),
                 () -> new ReadOnlyServiceImpl.ReadIndexEvent(),
                 opts.getStripes(),
+                false,
                 false
             ));
         }
@@ -1288,11 +1291,12 @@ public class NodeImpl implements Node, 
RaftServerService {
                 "JRaft-LogManager-Disruptor",
                 opts.getRaftOptions().getDisruptorBufferSize(),
                 () -> new LogManagerImpl.StableClosureEvent(),
-                opts.getStripes(),
-                logStorage instanceof RocksDbSharedLogStorage
+                opts.getLogStripesCount(),
+                logStorage instanceof RocksDbSharedLogStorage,
+                opts.isLogYieldStrategy()
             ));
 
-            opts.setLogStripes(IntStream.range(0, 
opts.getStripes()).mapToObj(i -> new Stripe()).collect(toList()));
+            opts.setLogStripes(IntStream.range(0, 
opts.getLogStripesCount()).mapToObj(i -> new Stripe()).collect(toList()));
         }
     }
 
diff --git 
a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/disruptor/StripedDisruptor.java
 
b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/disruptor/StripedDisruptor.java
index 23b3ada3d8..875c309b70 100644
--- 
a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/disruptor/StripedDisruptor.java
+++ 
b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/disruptor/StripedDisruptor.java
@@ -23,6 +23,7 @@ import com.lmax.disruptor.EventFactory;
 import com.lmax.disruptor.EventHandler;
 import com.lmax.disruptor.ExceptionHandler;
 import com.lmax.disruptor.RingBuffer;
+import com.lmax.disruptor.YieldingWaitStrategy;
 import com.lmax.disruptor.dsl.Disruptor;
 import com.lmax.disruptor.dsl.ProducerType;
 import java.util.ArrayList;
@@ -78,6 +79,7 @@ public class StripedDisruptor<T extends NodeIdAware> {
      * @param stripes Amount of stripes.
      * @param supportsBatches If {@code false}, this stripe will always pass 
{@code true} into
      *      {@link EventHandler#onEvent(Object, long, boolean)}. Otherwise, 
the data will be provided with batches.
+     * @param useYieldStrategy If {@code true}, the yield strategy is to be 
used, otherwise the blocking strategy.
      */
     public StripedDisruptor(
             String nodeName,
@@ -85,7 +87,8 @@ public class StripedDisruptor<T extends NodeIdAware> {
             int bufferSize,
             EventFactory<T> eventFactory,
             int stripes,
-            boolean supportsBatches
+            boolean supportsBatches,
+            boolean useYieldStrategy
     ) {
         this(
                 nodeName,
@@ -94,7 +97,8 @@ public class StripedDisruptor<T extends NodeIdAware> {
                 bufferSize,
                 eventFactory,
                 stripes,
-                supportsBatches
+                supportsBatches,
+                useYieldStrategy
         );
     }
 
@@ -107,6 +111,7 @@ public class StripedDisruptor<T extends NodeIdAware> {
      * @param stripes Amount of stripes.
      * @param supportsBatches If {@code false}, this stripe will always pass 
{@code true} into
      *      {@link EventHandler#onEvent(Object, long, boolean)}. Otherwise, 
the data will be provided with batches.
+     * @param useYieldStrategy If {@code true}, the yield strategy is to be 
used, otherwise the blocking strategy.
      */
     public StripedDisruptor(
             String nodeName,
@@ -115,7 +120,8 @@ public class StripedDisruptor<T extends NodeIdAware> {
             int bufferSize,
             EventFactory<T> eventFactory,
             int stripes,
-            boolean supportsBatches
+            boolean supportsBatches,
+            boolean useYieldStrategy
     ) {
         disruptors = new Disruptor[stripes];
         queues = new RingBuffer[stripes];
@@ -133,7 +139,7 @@ public class StripedDisruptor<T extends NodeIdAware> {
                 .setEventFactory(eventFactory)
                 .setThreadFactory(threadFactorySupplier.apply(nodeName, 
stripeName))
                 .setProducerType(ProducerType.MULTI)
-                .setWaitStrategy(new BlockingWaitStrategy())
+                .setWaitStrategy(useYieldStrategy ? new YieldingWaitStrategy() 
: new BlockingWaitStrategy())
                 .build();
 
             eventHandlers.add(new StripeEntryHandler());
diff --git 
a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/option/NodeOptions.java
 
b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/option/NodeOptions.java
index 785cd06189..140d1f39dd 100644
--- 
a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/option/NodeOptions.java
+++ 
b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/option/NodeOptions.java
@@ -20,6 +20,7 @@ import java.util.List;
 import java.util.concurrent.ExecutorService;
 import org.apache.ignite.internal.hlc.HybridClockImpl;
 import org.apache.ignite.internal.hlc.HybridClock;
+import org.apache.ignite.internal.lang.IgniteSystemProperties;
 import org.apache.ignite.internal.raft.JraftGroupEventsListener;
 import org.apache.ignite.internal.raft.Marshaller;
 import 
org.apache.ignite.internal.raft.storage.impl.StripeAwareLogManager.Stripe;
@@ -48,7 +49,7 @@ import org.apache.ignite.raft.jraft.util.timer.Timer;
  */
 public class NodeOptions extends RpcOptions implements Copiable<NodeOptions> {
     /** This value is used by default to determine the count of stripes in the 
striped queue. */
-    public static final int DEFAULT_STRIPES = Utils.cpus() * 2;
+    private static final int DEFAULT_STRIPES = Utils.cpus() * 2;
 
     // A follower would become a candidate if it doesn't receive any message
     // from the leader in |election_timeout_ms| milliseconds
@@ -243,6 +244,16 @@ public class NodeOptions extends RpcOptions implements 
Copiable<NodeOptions> {
      */
     private int stripes = DEFAULT_STRIPES;
 
+    /**
+     * Amount of log manager Disruptors stripes.
+     */
+    private int logStripesCount = DEFAULT_STRIPES;
+
+    /**
+     * Set true to use the non-blocking strategy in the log manager.
+     */
+    private boolean logYieldStrategy;
+
     /** */
     private boolean sharedPools = false;
 
@@ -274,6 +285,28 @@ public class NodeOptions extends RpcOptions implements 
Copiable<NodeOptions> {
         this.stripes = stripes;
     }
 
+    /**
+     * @return Log stripes count.
+     */
+    public int getLogStripesCount() {
+        return logStripesCount;
+    }
+
+    /**
+     * @param logStripesCount Log stripes.
+     */
+    public void setLogStripesCount(int logStripesCount) {
+        this.logStripesCount = logStripesCount;
+    }
+
+    public boolean isLogYieldStrategy() {
+        return logYieldStrategy;
+    }
+
+    public void setLogYieldStrategy(boolean logYieldStrategy) {
+        this.logYieldStrategy = logYieldStrategy;
+    }
+
     /**
      * Returns {@code true} if shared pools mode is in use.
      *
@@ -664,6 +697,9 @@ public class NodeOptions extends RpcOptions implements 
Copiable<NodeOptions> {
         
nodeOptions.setElectionTimeoutStrategy(this.getElectionTimeoutStrategy());
         nodeOptions.setClock(this.getClock());
         nodeOptions.setCommandsMarshaller(this.getCommandsMarshaller());
+        nodeOptions.setStripes(this.getStripes());
+        nodeOptions.setLogStripesCount(this.getLogStripesCount());
+        nodeOptions.setLogYieldStrategy(this.isLogYieldStrategy());
 
         return nodeOptions;
     }
diff --git 
a/modules/raft/src/test/java/org/apache/ignite/disruptor/StripedDisruptorTest.java
 
b/modules/raft/src/test/java/org/apache/ignite/disruptor/StripedDisruptorTest.java
index f8c6c06a08..b46e310ef4 100644
--- 
a/modules/raft/src/test/java/org/apache/ignite/disruptor/StripedDisruptorTest.java
+++ 
b/modules/raft/src/test/java/org/apache/ignite/disruptor/StripedDisruptorTest.java
@@ -48,6 +48,7 @@ public class StripedDisruptorTest extends IgniteAbstractTest {
                 16384,
                 NodeIdAwareTestObj::new,
                 1,
+                false,
                 false);
 
         var nodeId1 = new NodeId("grp1", new PeerId("foo"));
@@ -98,6 +99,7 @@ public class StripedDisruptorTest extends IgniteAbstractTest {
                 16384,
                 NodeIdAwareTestObj::new,
                 5,
+                false,
                 false);
 
         GroupAwareTestObjHandler handler = new GroupAwareTestObjHandler();
diff --git 
a/modules/raft/src/test/java/org/apache/ignite/raft/jraft/core/FSMCallerTest.java
 
b/modules/raft/src/test/java/org/apache/ignite/raft/jraft/core/FSMCallerTest.java
index b301a38f6d..671b5bd0a9 100644
--- 
a/modules/raft/src/test/java/org/apache/ignite/raft/jraft/core/FSMCallerTest.java
+++ 
b/modules/raft/src/test/java/org/apache/ignite/raft/jraft/core/FSMCallerTest.java
@@ -16,6 +16,10 @@
  */
 package org.apache.ignite.raft.jraft.core;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutorService;
 import org.apache.ignite.internal.hlc.HybridTimestamp;
@@ -57,10 +61,6 @@ import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.junit.jupiter.MockitoExtension;
 
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
 @ExtendWith(MockitoExtension.class)
 public class FSMCallerTest extends BaseIgniteAbstractTest {
     private FSMCallerImpl fsmCaller;
@@ -102,6 +102,7 @@ public class FSMCallerTest extends BaseIgniteAbstractTest {
             1024,
             () -> new FSMCallerImpl.ApplyTask(),
             1,
+            false,
             false));
         assertTrue(this.fsmCaller.init(opts));
     }
diff --git 
a/modules/raft/src/test/java/org/apache/ignite/raft/jraft/core/ReadOnlyServiceTest.java
 
b/modules/raft/src/test/java/org/apache/ignite/raft/jraft/core/ReadOnlyServiceTest.java
index b47b0a1940..b5f84b829a 100644
--- 
a/modules/raft/src/test/java/org/apache/ignite/raft/jraft/core/ReadOnlyServiceTest.java
+++ 
b/modules/raft/src/test/java/org/apache/ignite/raft/jraft/core/ReadOnlyServiceTest.java
@@ -16,6 +16,12 @@
  */
 package org.apache.ignite.raft.jraft.core;
 
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -53,12 +59,6 @@ import org.mockito.junit.jupiter.MockitoExtension;
 import org.mockito.junit.jupiter.MockitoSettings;
 import org.mockito.quality.Strictness;
 
-import static org.junit.jupiter.api.Assertions.assertArrayEquals;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
 @ExtendWith(MockitoExtension.class)
 @MockitoSettings(strictness = Strictness.LENIENT)
 public class ReadOnlyServiceTest extends BaseIgniteAbstractTest {
@@ -92,6 +92,7 @@ public class ReadOnlyServiceTest extends 
BaseIgniteAbstractTest {
             1024,
             () -> new ReadOnlyServiceImpl.ReadIndexEvent(),
             1,
+            false,
             false));
         NodeOptions nodeOptions = new NodeOptions();
         ExecutorService executor = JRaftUtils.createExecutor("test-executor", 
Utils.cpus());
diff --git 
a/modules/raft/src/test/java/org/apache/ignite/raft/jraft/storage/impl/LogManagerTest.java
 
b/modules/raft/src/test/java/org/apache/ignite/raft/jraft/storage/impl/LogManagerTest.java
index e263cb1cec..d2661b7d0f 100644
--- 
a/modules/raft/src/test/java/org/apache/ignite/raft/jraft/storage/impl/LogManagerTest.java
+++ 
b/modules/raft/src/test/java/org/apache/ignite/raft/jraft/storage/impl/LogManagerTest.java
@@ -16,6 +16,13 @@
  */
 package org.apache.ignite.raft.jraft.storage.impl;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotSame;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertSame;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.CountDownLatch;
@@ -52,13 +59,6 @@ import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.junit.jupiter.MockitoExtension;
 
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertNotSame;
-import static org.junit.jupiter.api.Assertions.assertNull;
-import static org.junit.jupiter.api.Assertions.assertSame;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
 @ExtendWith(MockitoExtension.class)
 public class LogManagerTest extends BaseStorageTest {
     private LogManagerImpl logManager;
@@ -105,6 +105,7 @@ public class LogManagerTest extends BaseStorageTest {
             1024,
             () -> new LogManagerImpl.StableClosureEvent(),
             1,
+            false,
             false));
         assertTrue(this.logManager.init(opts));
     }
diff --git 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItRaftCommandLeftInLogUntilRestartTest.java
 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItRaftCommandLeftInLogUntilRestartTest.java
index e34f97c70e..620b143eeb 100644
--- 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItRaftCommandLeftInLogUntilRestartTest.java
+++ 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItRaftCommandLeftInLogUntilRestartTest.java
@@ -248,6 +248,7 @@ public class ItRaftCommandLeftInLogUntilRestartTest extends 
ClusterPerClassInteg
                 64,
                 () -> new ApplyTask(),
                 1,
+                false,
                 false
         ) {
             @Override

Reply via email to