Skip to content

Commit

Permalink
version check
Browse files Browse the repository at this point in the history
  • Loading branch information
Bughue committed Jul 25, 2024
1 parent 4d9bb86 commit 8eab8d4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
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

0 comments on commit 8eab8d4

Please sign in to comment.