This is an automated email from the ASF dual-hosted git repository.
jianbin pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/incubator-seata.git
The following commit(s) were added to refs/heads/2.x by this push:
new 9087cbc90a optimize: serializer type meaning (#7722)
9087cbc90a is described below
commit 9087cbc90ab035af81faa372b458de3594baf7f1
Author: jsbxyyx <[email protected]>
AuthorDate: Thu Oct 23 13:38:03 2025 +0800
optimize: serializer type meaning (#7722)
---
changes/en-us/2.x.md | 3 +-
changes/zh-cn/2.x.md | 3 +-
.../seata/core/serializer/SerializerType.java | 40 +++++++---------------
3 files changed, 16 insertions(+), 30 deletions(-)
diff --git a/changes/en-us/2.x.md b/changes/en-us/2.x.md
index 69194e5613..6562739656 100644
--- a/changes/en-us/2.x.md
+++ b/changes/en-us/2.x.md
@@ -66,7 +66,7 @@ Add changes here for all PR submitted to the 2.x branch.
- [[#7673](https://github.com/apache/incubator-seata/pull/7673)] bump
@babel/runtime from ^7.26.10 to ^7.27.0
- [[#7689](https://github.com/apache/incubator-seata/pull/7689)] optimize
source release
- [[#7711](https://github.com/apache/incubator-seata/pull/7711)] add fastjson
support for serialization and deserialization of PostgreSQL array types
-
+- [[#7722](https://github.com/apache/incubator-seata/pull/7722)] optimize
serializer type meaning
@@ -131,6 +131,7 @@ Thanks to these contributors for their code commits. Please
report an unintended
- [dsomehan](https://github.com/dsomehan)
- [LegendPei](https://github.com/LegendPei)
- [lokidundun](https://github.com/lokidundun)
+- [jsbxyyx](https://github.com/jsbxyyx)
Also, we receive many valuable issues, questions and advices from our
community. Thanks for you all.
diff --git a/changes/zh-cn/2.x.md b/changes/zh-cn/2.x.md
index c409d29287..f2e76beb19 100644
--- a/changes/zh-cn/2.x.md
+++ b/changes/zh-cn/2.x.md
@@ -65,7 +65,7 @@
- [[#7673](https://github.com/apache/incubator-seata/pull/7673)] 升级
@babel/runtime ^7.26.10 到 ^7.27.0
- [[#7689](https://github.com/apache/incubator-seata/pull/7689)] 优化 source
release
- [[#7711](https://github.com/apache/incubator-seata/pull/7711)] 添加 fastjson 对
PostgreSQL 数组类型的序列化和反序列化的支持
-
+- [[#7722](https://github.com/apache/incubator-seata/pull/7722)] 优化
SerializerType 枚举含义
### security:
@@ -128,6 +128,7 @@
- [dsomehan](https://github.com/dsomehan)
- [LegendPei](https://github.com/LegendPei)
- [lokidundun](https://github.com/lokidundun)
+- [jsbxyyx](https://github.com/jsbxyyx)
同时,我们收到了社区反馈的很多有价值的issue和建议,非常感谢大家。
diff --git
a/core/src/main/java/org/apache/seata/core/serializer/SerializerType.java
b/core/src/main/java/org/apache/seata/core/serializer/SerializerType.java
index 99b40d801b..243cc11911 100644
--- a/core/src/main/java/org/apache/seata/core/serializer/SerializerType.java
+++ b/core/src/main/java/org/apache/seata/core/serializer/SerializerType.java
@@ -18,72 +18,56 @@ package org.apache.seata.core.serializer;
/**
* The enum serialize type.
- *
+ * <p>
+ * <b>NOTE: Adding a new serializer type must be non-repeating and within byte
range<b/>
+ * </p>
*/
public enum SerializerType {
/**
* The seata.
- * <p>
- * Math.pow(2, 0)
*/
- SEATA((byte) 0x1),
+ SEATA((byte) 1),
/**
* The protobuf, 'org.apache.seata:seata-serializer-protobuf' dependency
must be referenced manually.
- * <p>
- * Math.pow(2, 1)
*/
- PROTOBUF((byte) 0x2),
+ PROTOBUF((byte) 2),
/**
* The kryo.
- * <p>
- * Math.pow(2, 2)
*/
- KRYO((byte) 0x4),
+ KRYO((byte) 4),
/**
* The fst but it's been removed.
- * <p>
- * Math.pow(2, 3)
*/
- FST((byte) 0x8),
+ FST((byte) 8),
/**
* The hessian.
- * <p>
- * Math.pow(2, 4)
*/
- HESSIAN((byte) 0x16),
+ HESSIAN((byte) 22),
/**
* The jackson.
- * <p>
- * Math.pow(2, 5)
*/
- JACKSON((byte) 0x32),
+ JACKSON((byte) 50),
/**
* The fastjson2.
- * <p>
- * Math.pow(2, 6)
*/
- FASTJSON2((byte) 0x64),
+ FASTJSON2((byte) 100),
/**
* The grpc
- * <p>
- * Math.pow(2, 7)
*/
- GRPC((byte) 0x128),
+ GRPC((byte) 40),
/**
* The fury.
- * <p>
- * Math.pow(2, 8)
*/
- FURY((byte) 0x256);
+ FURY((byte) 86);
private final byte code;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]