Skip to content

Commit

Permalink
升级bolt 至1.6.4 (sofastack#686)
Browse files Browse the repository at this point in the history
Co-authored-by: 邱家榆 <[email protected]>
qiujiayu and 邱家榆 authored Sep 23, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 8fa1a5b commit c72a9b6
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@

import com.alipay.remoting.ConnectionEventType;
import com.alipay.remoting.RejectedExecutionPolicy;
import com.alipay.remoting.config.BoltClientOption;
import com.alipay.remoting.config.switches.GlobalSwitch;
import com.alipay.sofa.jraft.ReplicatorGroup;
import com.alipay.sofa.jraft.error.InvokeTimeoutException;
@@ -52,7 +53,7 @@ public BoltRpcClient(com.alipay.remoting.rpc.RpcClient rpcClient) {

@Override
public boolean init(final RpcOptions opts) {
this.rpcClient.switches().turnOn(GlobalSwitch.CODEC_FLUSH_CONSOLIDATION);
rpcClient.option(BoltClientOption.NETTY_FLUSH_CONSOLIDATION, true);
this.rpcClient.initWriteBufferWaterMark(BoltRaftRpcFactory.CHANNEL_WRITE_BUF_LOW_WATER_MARK,
BoltRaftRpcFactory.CHANNEL_WRITE_BUF_HIGH_WATER_MARK);
this.rpcClient.enableReconnectSwitch();
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@
import com.alipay.remoting.AsyncContext;
import com.alipay.remoting.BizContext;
import com.alipay.remoting.ConnectionEventType;
import com.alipay.remoting.config.BoltClientOption;
import com.alipay.remoting.config.switches.GlobalSwitch;
import com.alipay.remoting.rpc.protocol.AsyncUserProcessor;
import com.alipay.sofa.jraft.rpc.Connection;
@@ -44,7 +45,7 @@ public BoltRpcServer(final com.alipay.remoting.rpc.RpcServer rpcServer) {

@Override
public boolean init(final Void opts) {
this.rpcServer.switches().turnOn(GlobalSwitch.CODEC_FLUSH_CONSOLIDATION);
this.rpcServer.option(BoltClientOption.NETTY_FLUSH_CONSOLIDATION, true);
this.rpcServer.initWriteBufferWaterMark(BoltRaftRpcFactory.CHANNEL_WRITE_BUF_LOW_WATER_MARK,
BoltRaftRpcFactory.CHANNEL_WRITE_BUF_HIGH_WATER_MARK);
this.rpcServer.startup();
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@
<properties>
<affinity.version>3.1.7</affinity.version>
<asm.version>6.0</asm.version>
<bolt.version>1.6.2</bolt.version>
<bolt.version>1.6.4</bolt.version>
<commons.compress.version>1.21</commons.compress.version>
<commons.io.version>2.8.0</commons.io.version>
<commons.lang.version>2.6</commons.lang.version>

0 comments on commit c72a9b6

Please sign in to comment.