File tree Expand file tree Collapse file tree
core/src/main/java/org/apache/seata/core
discovery/seata-discovery-etcd3 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 <groupId >org.apache</groupId >
2525 <artifactId >apache</artifactId >
2626 <version >19</version >
27+ <relativePath />
2728 </parent >
2829 <modelVersion >4.0.0</modelVersion >
2930 <groupId >org.apache.seata</groupId >
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ Add changes here for all PR submitted to the 2.x branch.
3939- [[ #6496 ] ( https://github.com/apache/incubator-seata/pull/6496 )] fix XA did not rollback but close when executing a long-running SQL(or deadlock SQL)
4040- [[ #6493 ] ( https://github.com/apache/incubator-seata/pull/6493 )] fix SQLServer-related SQL error in seata server when using database of SQLServer
4141- [[ #6497 ] ( https://github.com/apache/incubator-seata/pull/6497 )] fix tcc properties class when autoconfigure
42+ - [[ #6554 ] ( https://github.com/apache/incubator-seata/pull/6554 )] fix unfixed serializer
4243
4344### optimize:
4445- [[ #6031 ] ( https://github.com/apache/incubator-seata/pull/6031 )] add a check for the existence of the undolog table
Original file line number Diff line number Diff line change 3939- [[ #6496 ] ( https://github.com/apache/incubator-seata/pull/6496 )] 修复XA执行长时间SQL(或死锁SQL)没有完成回滚就释放连接
4040- [[ #6493 ] ( https://github.com/apache/incubator-seata/pull/6493 )] 修复当使用数据库为SQLServer时seata server的SQL报错
4141- [[ #6497 ] ( https://github.com/apache/incubator-seata/pull/6497 )] 修复自动装配时的seata tcc 配置类
42-
42+ - [[ #6554 ] ( https://github.com/apache/incubator-seata/pull/6554 )] 修复序列化器不固定使用对应配置序列化器的问题
43+ -
4344### optimize:
4445- [[ #6031 ] ( https://github.com/apache/incubator-seata/pull/6031 )] 添加undo_log表的存在性校验
4546- [[ #6089 ] ( https://github.com/apache/incubator-seata/pull/6089 )] 修改RaftServerFactory语义并删除不必要的单例构建
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ public interface ProtocolConstants {
7676 *
7777 * @see SerializerType#SEATA
7878 */
79- byte CONFIGURED_CODEC = SerializerServiceLoader .getSupportedSerializers (). iterator (). next ().getCode ();
79+ byte CONFIGURED_CODEC = SerializerServiceLoader .getDefaultSerializerType ().getCode ();
8080
8181 /**
8282 * Configured compressor by user, default is NONE
Original file line number Diff line number Diff line change 1616 */
1717package org .apache .seata .core .rpc .netty .v1 ;
1818
19+ import java .util .List ;
1920import java .util .Map ;
20- import java .util .Set ;
2121
2222import io .netty .buffer .ByteBuf ;
2323import io .netty .channel .ChannelHandlerContext ;
@@ -64,7 +64,7 @@ public class ProtocolV1Decoder extends LengthFieldBasedFrameDecoder {
6464
6565 private static final Logger LOGGER = LoggerFactory .getLogger (ProtocolV1Decoder .class );
6666
67- private final Set <SerializerType > supportDeSerializerTypes ;
67+ private final List <SerializerType > supportDeSerializerTypes ;
6868
6969
7070 public ProtocolV1Decoder () {
@@ -155,7 +155,7 @@ public Object decodeFrame(ByteBuf frame) {
155155 Serializer serializer = SerializerServiceLoader .load (protocolType );
156156 rpcMessage .setBody (serializer .deserialize (bs ));
157157 } else {
158- throw new IllegalArgumentException ("SerializerType not match" );
158+ throw new IllegalArgumentException ("SerializerType not match: " + protocolType . name () );
159159 }
160160 }
161161 }
Original file line number Diff line number Diff line change 1616 */
1717package org .apache .seata .core .serializer ;
1818
19+ import java .util .ArrayList ;
1920import java .util .Arrays ;
20- import java .util .HashSet ;
21- import java .util .Set ;
21+ import java .util .List ;
2222import java .util .stream .Collectors ;
2323
2424import org .apache .seata .common .loader .EnhancedServiceLoader ;
@@ -73,8 +73,8 @@ public static Serializer load(SerializerType type) throws EnhancedServiceNotFoun
7373 return EnhancedServiceLoader .load (Serializer .class , type .name ());
7474 }
7575
76- public static Set <SerializerType > getSupportedSerializers () {
77- Set <SerializerType > supportedSerializers = new HashSet <>();
76+ public static List <SerializerType > getSupportedSerializers () {
77+ List <SerializerType > supportedSerializers = new ArrayList <>();
7878 String defaultSupportSerializers = Arrays .stream (DEFAULT_SERIALIZER_TYPE ).map (SerializerType ::name ).collect (Collectors .joining (SPLIT_CHAR ));
7979 String serializerNames = CONFIG .getConfig (ConfigurationKeys .SERIALIZE_FOR_RPC , defaultSupportSerializers );
8080 String [] serializerNameArray = serializerNames .split (SPLIT_CHAR );
@@ -86,6 +86,11 @@ public static Set<SerializerType> getSupportedSerializers() {
8686 LOGGER .warn ("Invalid serializer name: " + serializerName );
8787 }
8888 }
89- return supportedSerializers ;
89+ return supportedSerializers . stream (). distinct (). collect ( Collectors . toList ()) ;
9090 }
91+
92+ public static SerializerType getDefaultSerializerType () {
93+ return getSupportedSerializers ().get (0 );
94+ }
95+
9196}
Original file line number Diff line number Diff line change 559559 <version >${grpc.version} </version >
560560 <scope >test</scope >
561561 </dependency >
562+ <dependency >
563+ <groupId >io.grpc</groupId >
564+ <artifactId >grpc-core</artifactId >
565+ <version >${grpc.version} </version >
566+ </dependency >
567+ <dependency >
568+ <groupId >io.grpc</groupId >
569+ <artifactId >grpc-api</artifactId >
570+ <version >${grpc.version} </version >
571+ </dependency >
562572 <dependency >
563573 <groupId >io.grpc</groupId >
564574 <artifactId >grpc-netty</artifactId >
Original file line number Diff line number Diff line change 3939 <groupId >io.etcd</groupId >
4040 <artifactId >jetcd-core</artifactId >
4141 </dependency >
42+ <dependency >
43+ <groupId >io.grpc</groupId >
44+ <artifactId >grpc-api</artifactId >
45+ <scope >provided</scope >
46+ </dependency >
4247 <dependency >
4348 <groupId >com.google.guava</groupId >
4449 <artifactId >guava</artifactId >
Original file line number Diff line number Diff line change 6060 <artifactId >grpc-stub</artifactId >
6161 <scope >provided</scope >
6262 </dependency >
63-
63+ <dependency >
64+ <groupId >io.grpc</groupId >
65+ <artifactId >grpc-core</artifactId >
66+ <scope >provided</scope >
67+ </dependency >
6468 <dependency >
6569 <groupId >io.grpc</groupId >
6670 <artifactId >grpc-testing</artifactId >
You can’t perform that action at this time.
0 commit comments