Skip to content

Commit

Permalink
feat: release v1.3.14 (#1069)
Browse files Browse the repository at this point in the history
* feat: can set rpc-closure-executor's work queue size

* feat: release 1.3.14
  • Loading branch information
fengjiachun authored Jan 29, 2024
1 parent 30f62d0 commit f3abf6a
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 33 deletions.
2 changes: 1 addition & 1 deletion jraft-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>jraft-parent</artifactId>
<groupId>com.alipay.sofa</groupId>
<version>1.3.13</version>
<version>1.3.14</version>
</parent>
<artifactId>jraft-core</artifactId>
<packaging>jar</packaging>
Expand Down
48 changes: 26 additions & 22 deletions jraft-core/src/main/java/com/alipay/sofa/jraft/rpc/RpcUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,40 +38,44 @@
*/
public final class RpcUtils {

private static final Logger LOG = LoggerFactory.getLogger(RpcUtils.class);
private static final Logger LOG = LoggerFactory
.getLogger(RpcUtils.class);

/**
* Default jraft closure executor pool minimum size, CPUs by default.
*/
public static final int MIN_RPC_CLOSURE_EXECUTOR_POOL_SIZE = SystemPropertyUtil.getInt(
"jraft.rpc.closure.threadpool.size.min",
Utils.cpus());
public static final int MIN_RPC_CLOSURE_EXECUTOR_POOL_SIZE = SystemPropertyUtil
.getInt(
"jraft.rpc.closure.threadpool.size.min",
Utils.cpus());

/**
* Default jraft closure executor pool maximum size.
*/
public static final int MAX_RPC_CLOSURE_EXECUTOR_POOL_SIZE = SystemPropertyUtil.getInt(
"jraft.rpc.closure.threadpool.size.max",
Math.max(100, Utils.cpus() * 5));
public static final int MAX_RPC_CLOSURE_EXECUTOR_POOL_SIZE = SystemPropertyUtil
.getInt(
"jraft.rpc.closure.threadpool.size.max",
Math.max(100, Utils.cpus() * 5));

/**
* Global thread pool to run rpc closure.
*/
private static ThreadPoolExecutor RPC_CLOSURE_EXECUTOR = ThreadPoolUtil
.newBuilder()
.poolName("JRAFT_RPC_CLOSURE_EXECUTOR")
.enableMetric(true)
.coreThreads(
MIN_RPC_CLOSURE_EXECUTOR_POOL_SIZE)
.maximumThreads(
MAX_RPC_CLOSURE_EXECUTOR_POOL_SIZE)
.keepAliveSeconds(60L)
.workQueue(new SynchronousQueue<>())
.threadFactory(
new NamedThreadFactory(
"JRaft-Rpc-Closure-Executor-",
true)) //
.build();
private static final ThreadPoolExecutor RPC_CLOSURE_EXECUTOR = ThreadPoolUtil
.newBuilder()
.poolName(
"JRAFT_RPC_CLOSURE_EXECUTOR")
.enableMetric(true)
.coreThreads(
MIN_RPC_CLOSURE_EXECUTOR_POOL_SIZE)
.maximumThreads(
MAX_RPC_CLOSURE_EXECUTOR_POOL_SIZE)
.keepAliveSeconds(60L)
.workQueue(new SynchronousQueue<>())
.threadFactory(
new NamedThreadFactory(
"JRaft-Rpc-Closure-Executor-",
true)) //
.build();

/**
* Run closure with OK status in thread pool.
Expand Down
2 changes: 1 addition & 1 deletion jraft-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>jraft-parent</artifactId>
<groupId>com.alipay.sofa</groupId>
<version>1.3.13</version>
<version>1.3.14</version>
</parent>
<artifactId>jraft-example</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion jraft-extension/bdb-log-storage-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>jraft-extension</artifactId>
<groupId>com.alipay.sofa</groupId>
<version>1.3.13</version>
<version>1.3.14</version>
</parent>
<artifactId>bdb-log-storage-impl</artifactId>
<name>bdb-log-storage-impl ${project.version}</name>
Expand Down
2 changes: 1 addition & 1 deletion jraft-extension/java-log-storage-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>jraft-extension</artifactId>
<groupId>com.alipay.sofa</groupId>
<version>1.3.13</version>
<version>1.3.14</version>
</parent>

<artifactId>java-log-storage-impl</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion jraft-extension/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>jraft-parent</artifactId>
<groupId>com.alipay.sofa</groupId>
<version>1.3.13</version>
<version>1.3.14</version>
</parent>

<artifactId>jraft-extension</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion jraft-extension/rpc-grpc-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>jraft-extension</artifactId>
<groupId>com.alipay.sofa</groupId>
<version>1.3.13</version>
<version>1.3.14</version>
</parent>

<artifactId>rpc-grpc-impl</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion jraft-rheakv/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>jraft-parent</artifactId>
<groupId>com.alipay.sofa</groupId>
<version>1.3.13</version>
<version>1.3.14</version>
</parent>

<artifactId>jraft-rheakv</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion jraft-rheakv/rheakv-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>jraft-rheakv</artifactId>
<groupId>com.alipay.sofa</groupId>
<version>1.3.13</version>
<version>1.3.14</version>
</parent>

<artifactId>jraft-rheakv-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion jraft-rheakv/rheakv-pd/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>jraft-rheakv</artifactId>
<groupId>com.alipay.sofa</groupId>
<version>1.3.13</version>
<version>1.3.14</version>
</parent>

<artifactId>jraft-rheakv-pd</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion jraft-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>jraft-parent</artifactId>
<groupId>com.alipay.sofa</groupId>
<version>1.3.13</version>
<version>1.3.14</version>
</parent>
<artifactId>jraft-test</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.alipay.sofa</groupId>
<artifactId>jraft-parent</artifactId>
<version>1.3.13</version>
<version>1.3.14</version>
<packaging>pom</packaging>

<name>${project.groupId}:${project.artifactId}</name>
Expand Down

0 comments on commit f3abf6a

Please sign in to comment.