Skip to content

Commit b34cfff

Browse files
authored
optimize : remove sdk version checking (#6700)
1 parent 615d521 commit b34cfff

File tree

4 files changed

+2
-17
lines changed

4 files changed

+2
-17
lines changed

changes/en-us/2.x.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Add changes here for all PR submitted to the 2.x branch.
3131
- [[#6654](https://github.com/apache/incubator-seata/pull/6654)] add Namingserver package module
3232
- [[#6667](https://github.com/apache/incubator-seata/pull/6667)] optimize Namingserver log output
3333
- [[#6687](https://github.com/apache/incubator-seata/pull/6687)] delete static code built on the frontend
34+
- [[#6700](https://github.com/apache/incubator-seata/pull/6700)] remove sdk version checking
3435

3536
### refactor:
3637

changes/zh-cn/2.x.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
- [[#6654](https://github.com/apache/incubator-seata/pull/6654)] 增加Namingserver打包功能
3333
- [[#6667](https://github.com/apache/incubator-seata/pull/6667)] 优化Namingserver日志输出
3434
- [[#6687](https://github.com/apache/incubator-seata/pull/6687)] 删除前端构建的静态代码
35+
- [[#6700](https://github.com/apache/incubator-seata/pull/6700)] 去掉sdk版本检查
3536

3637
### refactor:
3738

core/src/main/java/org/apache/seata/core/protocol/Version.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,6 @@ public static String getChannelVersion(Channel c) {
7979
return VERSION_MAP.get(NetUtil.toStringAddress(c.remoteAddress()));
8080
}
8181

82-
/**
83-
* Check version string.
84-
*
85-
* @param version the version
86-
* @throws IncompatibleVersionException the incompatible version exception
87-
*/
88-
public static void checkVersion(String version) throws IncompatibleVersionException {
89-
long current = convertVersion(CURRENT);
90-
long clientVersion = convertVersion(version);
91-
if (current < clientVersion) {
92-
throw new IncompatibleVersionException("incompatible client version:" + version);
93-
}
94-
}
95-
9682
/**
9783
* Determine whether the client version is greater than or equal to version 1.5.0
9884
*

core/src/main/java/org/apache/seata/core/rpc/netty/ChannelManager.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
import org.apache.seata.core.protocol.IncompatibleVersionException;
3535
import org.apache.seata.core.protocol.RegisterRMRequest;
3636
import org.apache.seata.core.protocol.RegisterTMRequest;
37-
import org.apache.seata.core.protocol.Version;
3837
import org.apache.seata.core.rpc.RpcContext;
3938
import org.slf4j.Logger;
4039
import org.slf4j.LoggerFactory;
@@ -133,7 +132,6 @@ private static RpcContext buildChannelHolder(NettyPoolKey.TransactionRole client
133132
*/
134133
public static void registerTMChannel(RegisterTMRequest request, Channel channel)
135134
throws IncompatibleVersionException {
136-
Version.checkVersion(request.getVersion());
137135
RpcContext rpcContext = buildChannelHolder(NettyPoolKey.TransactionRole.TMROLE, request.getVersion(),
138136
request.getApplicationId(),
139137
request.getTransactionServiceGroup(),
@@ -155,7 +153,6 @@ public static void registerTMChannel(RegisterTMRequest request, Channel channel)
155153
*/
156154
public static void registerRMChannel(RegisterRMRequest resourceManagerRequest, Channel channel)
157155
throws IncompatibleVersionException {
158-
Version.checkVersion(resourceManagerRequest.getVersion());
159156
Set<String> dbkeySet = dbKeytoSet(resourceManagerRequest.getResourceIds());
160157
RpcContext rpcContext;
161158
if (!IDENTIFIED_CHANNELS.containsKey(channel)) {

0 commit comments

Comments
 (0)