Skip to content

optimize : remove sdk version checking #6700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/en-us/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Add changes here for all PR submitted to the 2.x branch.
- [[#6654](https://github.com/apache/incubator-seata/pull/6654)] add Namingserver package module
- [[#6667](https://github.com/apache/incubator-seata/pull/6667)] optimize Namingserver log output
- [[#6687](https://github.com/apache/incubator-seata/pull/6687)] delete static code built on the frontend
- [[#6700](https://github.com/apache/incubator-seata/pull/6700)] remove sdk version checking

### refactor:

Expand Down
1 change: 1 addition & 0 deletions changes/zh-cn/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- [[#6654](https://github.com/apache/incubator-seata/pull/6654)] 增加Namingserver打包功能
- [[#6667](https://github.com/apache/incubator-seata/pull/6667)] 优化Namingserver日志输出
- [[#6687](https://github.com/apache/incubator-seata/pull/6687)] 删除前端构建的静态代码
- [[#6700](https://github.com/apache/incubator-seata/pull/6700)] 去掉sdk版本检查

### refactor:

Expand Down
14 changes: 0 additions & 14 deletions core/src/main/java/org/apache/seata/core/protocol/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,6 @@ public static String getChannelVersion(Channel c) {
return VERSION_MAP.get(NetUtil.toStringAddress(c.remoteAddress()));
}

/**
* Check version string.
*
* @param version the version
* @throws IncompatibleVersionException the incompatible version exception
*/
public static void checkVersion(String version) throws IncompatibleVersionException {
long current = convertVersion(CURRENT);
long clientVersion = convertVersion(version);
if (current < clientVersion) {
throw new IncompatibleVersionException("incompatible client version:" + version);
}
}

/**
* Determine whether the client version is greater than or equal to version 1.5.0
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import org.apache.seata.core.protocol.IncompatibleVersionException;
import org.apache.seata.core.protocol.RegisterRMRequest;
import org.apache.seata.core.protocol.RegisterTMRequest;
import org.apache.seata.core.protocol.Version;
import org.apache.seata.core.rpc.RpcContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -133,7 +132,6 @@ private static RpcContext buildChannelHolder(NettyPoolKey.TransactionRole client
*/
public static void registerTMChannel(RegisterTMRequest request, Channel channel)
throws IncompatibleVersionException {
Version.checkVersion(request.getVersion());
RpcContext rpcContext = buildChannelHolder(NettyPoolKey.TransactionRole.TMROLE, request.getVersion(),
request.getApplicationId(),
request.getTransactionServiceGroup(),
Expand All @@ -155,7 +153,6 @@ public static void registerTMChannel(RegisterTMRequest request, Channel channel)
*/
public static void registerRMChannel(RegisterRMRequest resourceManagerRequest, Channel channel)
throws IncompatibleVersionException {
Version.checkVersion(resourceManagerRequest.getVersion());
Set<String> dbkeySet = dbKeytoSet(resourceManagerRequest.getResourceIds());
RpcContext rpcContext;
if (!IDENTIFIED_CHANNELS.containsKey(channel)) {
Expand Down
Loading