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 a510fa48765 IGNITE-22129 Partition, CMG and metastorage should not 
share threads (#7119)
a510fa48765 is described below

commit a510fa48765a43fd32920e32848da0abd66afcee
Author: Vladislav Pyatkov <[email protected]>
AuthorDate: Wed Dec 24 16:20:27 2025 +0300

    IGNITE-22129 Partition, CMG and metastorage should not share threads (#7119)
    
    Co-authored-by: Mirza Aliev <[email protected]>
---
 .../apache/ignite/raft/jraft/core/NodeImpl.java    | 32 ++++++++++++++++------
 1 file changed, 23 insertions(+), 9 deletions(-)

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 2df29468667..f03a85b2649 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
@@ -1376,20 +1376,34 @@ public class NodeImpl implements Node, 
RaftServerService {
             ));
         }
 
-        if (opts.getLogManagerDisruptor() == null) {
-            opts.setLogManagerDisruptor(new StripedDisruptor<>(
+        if (opts.isSystemGroup()) {
+            opts.setLogManagerDisruptor(StripedDisruptor.createSerialDisruptor(
                 opts.getServerName(),
-                "JRaft-LogManager-Disruptor",
+                "JRaft-LogManager-Disruptor-" + groupId,
                 (stripeName, logger) -> 
IgniteThreadFactory.create(opts.getServerName(), stripeName, true, logger),
                 opts.getRaftOptions().getDisruptorBufferSize(),
                 () -> new LogManagerImpl.StableClosureEvent(),
-                opts.getLogStripesCount(),
-                logStorage instanceof RocksDbSharedLogStorage,
-                opts.isLogYieldStrategy(),
-                
opts.getRaftMetrics().disruptorMetrics("raft.logmanager.disruptor")
+                false,
+                null
             ));
 
-            opts.setLogStripes(IntStream.range(0, 
opts.getLogStripesCount()).mapToObj(i -> new Stripe()).collect(toList()));
+            opts.setLogStripes(IntStream.range(0, 1).mapToObj(i -> new 
Stripe()).collect(toList()));
+        } else {
+            if (opts.getLogManagerDisruptor() == null) {
+                opts.setLogManagerDisruptor(new StripedDisruptor<>(
+                    opts.getServerName(),
+                    "JRaft-LogManager-Disruptor",
+                    (stripeName, logger) -> 
IgniteThreadFactory.create(opts.getServerName(), stripeName, true, logger),
+                    opts.getRaftOptions().getDisruptorBufferSize(),
+                    () -> new LogManagerImpl.StableClosureEvent(),
+                    opts.getLogStripesCount(),
+                    logStorage instanceof RocksDbSharedLogStorage,
+                    opts.isLogYieldStrategy(),
+                    
opts.getRaftMetrics().disruptorMetrics("raft.logmanager.disruptor")
+                ));
+
+                opts.setLogStripes(IntStream.range(0, 
opts.getLogStripesCount()).mapToObj(i -> new Stripe()).collect(toList()));
+            }
         }
     }
 
@@ -3526,7 +3540,7 @@ public class NodeImpl implements Node, RaftServerService {
         if (opts.getReadOnlyServiceDisruptor() != null && 
!opts.isSharedPools()) {
             opts.getReadOnlyServiceDisruptor().shutdown();
         }
-        if (opts.getLogManagerDisruptor() != null && !opts.isSharedPools()) {
+        if (opts.getLogManagerDisruptor() != null && (!opts.isSharedPools() || 
opts.isSystemGroup())) {
             opts.getLogManagerDisruptor().shutdown();
         }
     }

Reply via email to