This is an automated email from the ASF dual-hosted git repository.
jianbin pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/incubator-seata.git
The following commit(s) were added to refs/heads/2.x by this push:
new a1aba35946 feature: support `EpollEventLoopGroup` in client (#7171)
a1aba35946 is described below
commit a1aba35946390b25644819548154af117698b0fe
Author: Yongjun Hong <[email protected]>
AuthorDate: Wed Feb 19 19:02:14 2025 +0900
feature: support `EpollEventLoopGroup` in client (#7171)
---
changes/en-us/2.x.md | 1 +
changes/zh-cn/2.x.md | 1 +
.../apache/seata/core/rpc/netty/NettyClientBootstrap.java | 13 ++++++++++---
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/changes/en-us/2.x.md b/changes/en-us/2.x.md
index c9d01ae10c..2e8e699f30 100644
--- a/changes/en-us/2.x.md
+++ b/changes/en-us/2.x.md
@@ -10,6 +10,7 @@ Add changes here for all PR submitted to the 2.x branch.
- [[#7069](https://github.com/apache/incubator-seata/pull/7069)] Raft cluster
mode supports address translation
- [[#7038](https://github.com/apache/incubator-seata/pull/7038)] support fury
serializer
- [[#7133](https://github.com/apache/incubator-seata/pull/7133)] Implement
scheduled handling for end status transaction
+- [[#7171](https://github.com/apache/incubator-seata/pull/7171)] support
EpollEventLoopGroup in client
### bugfix:
diff --git a/changes/zh-cn/2.x.md b/changes/zh-cn/2.x.md
index 8c399000ca..f661d8c167 100644
--- a/changes/zh-cn/2.x.md
+++ b/changes/zh-cn/2.x.md
@@ -10,6 +10,7 @@
- [[#7069](https://github.com/apache/incubator-seata/pull/7069)] Raft集群模式支持地址转换
- [[#7038](https://github.com/apache/incubator-seata/pull/7038)] 支持Fury序列化器
- [[#7133](https://github.com/apache/incubator-seata/pull/7133)]
实现对残留的end状态事务定时处理
+- [[#7171](https://github.com/apache/incubator-seata/pull/7171)] 客户端支持
EpollEventLoopGroup
### bugfix:
diff --git
a/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientBootstrap.java
b/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientBootstrap.java
index 990b244954..1c1bb748d5 100644
---
a/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientBootstrap.java
+++
b/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientBootstrap.java
@@ -28,6 +28,7 @@ import io.netty.channel.ChannelOption;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.epoll.EpollChannelOption;
+import io.netty.channel.epoll.EpollEventLoopGroup;
import io.netty.channel.epoll.EpollMode;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
@@ -80,9 +81,15 @@ public class NettyClientBootstrap implements
RemotingBootstrap {
this.nettyClientConfig = nettyClientConfig;
int selectorThreadSizeThreadSize =
this.nettyClientConfig.getClientSelectorThreadSize();
this.transactionRole = transactionRole;
- this.eventLoopGroupWorker = new
NioEventLoopGroup(selectorThreadSizeThreadSize,
- new
NamedThreadFactory(getThreadPrefix(this.nettyClientConfig.getClientSelectorThreadPrefix()),
- selectorThreadSizeThreadSize));
+ if (NettyServerConfig.enableEpoll()) {
+ this.eventLoopGroupWorker = new
EpollEventLoopGroup(selectorThreadSizeThreadSize,
+ new
NamedThreadFactory(getThreadPrefix(this.nettyClientConfig.getClientSelectorThreadPrefix()),
+ selectorThreadSizeThreadSize));
+ } else {
+ this.eventLoopGroupWorker = new
NioEventLoopGroup(selectorThreadSizeThreadSize,
+ new
NamedThreadFactory(getThreadPrefix(this.nettyClientConfig.getClientSelectorThreadPrefix()),
+ selectorThreadSizeThreadSize));
+ }
this.defaultEventExecutorGroup = eventExecutorGroup;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]