Skip to content

Commit

Permalink
Merge branch '2.x' into dev-2024-undolog-del
Browse files Browse the repository at this point in the history
  • Loading branch information
Bughue authored Feb 20, 2025
2 parents 3e616e5 + a1aba35 commit 331afa7
Show file tree
Hide file tree
Showing 84 changed files with 3,769 additions and 1,034 deletions.
10 changes: 10 additions & 0 deletions all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,16 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
21 changes: 19 additions & 2 deletions changes/en-us/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Add changes here for all PR submitted to the 2.x branch.
- [[#7037](https://github.com/apache/incubator-seata/pull/7037)] support fury undolog parser
- [[#7069](https://github.com/apache/incubator-seata/pull/7069)] Raft cluster mode supports address translation
- [[#7038](https://github.com/apache/incubator-seata/pull/7038)] support fury serializer
- [[#7133](https://github.com/apache/incubator-seata/pull/7133)] Implement scheduled handling for end status transaction
- [[#7171](https://github.com/apache/incubator-seata/pull/7171)] support EpollEventLoopGroup in client

### bugfix:

Expand All @@ -18,7 +20,8 @@ Add changes here for all PR submitted to the 2.x branch.
- [[#7107](https://github.com/apache/incubator-seata/pull/7107)] fix the issue of failing to parse annotations in TCC mode when the business object is a proxy object.
- [[#7124](https://github.com/apache/incubator-seata/pull/7124)] bugfix: GlobalTransactionScanner.afterPropertiesSet need do scanner check
- [[#7135](https://github.com/apache/incubator-seata/pull/7135)] treating a unique index conflict during rollback as a dirty write

- [[#7150](https://github.com/apache/incubator-seata/pull/7150)] The time difference between the raft node and the follower node cannot synchronize data
- [[#7102](https://github.com/apache/incubator-seata/pull/7150)] bugfix: modify XA mode pre commit transaction from commit phase to before close phase

### optimize:

Expand All @@ -27,18 +30,31 @@ Add changes here for all PR submitted to the 2.x branch.
- [[#7075](https://github.com/apache/incubator-seata/pull/7075)] fast fail when channel is null
- [[#7089](https://github.com/apache/incubator-seata/pull/7089)] support instance registration to the registry center
- [[#7093](https://github.com/apache/incubator-seata/pull/7093)] add a test workflow for JDK 21
- [[#7130](https://github.com/apache/incubator-seata/pull/7130)] Expose some keepalive-related configuration for Druid, Hikari, and DBCP
- [[#7131](https://github.com/apache/incubator-seata/pull/7131)] Remove org.codehaus.jackson dependency
- [[#7134](https://github.com/apache/incubator-seata/pull/7134)] upgrade tomcat-embed to 9.0.98
- [[#7138](https://github.com/apache/incubator-seata/pull/7138)] Remove org.eclipse.jetty dependency
- [[#7139](https://github.com/apache/incubator-seata/pull/7139)] upgrade xstream to 1.4.21
- [[#7141](https://github.com/apache/incubator-seata/pull/7141)] remove unused dependencies
- [[#7142](https://github.com/apache/incubator-seata/pull/7142)] upgrade commons-compress to 1.27.1
- [[#7149](https://github.com/apache/incubator-seata/pull/7149)] Fix abnormal character display issues in ./distribution/NOTICE.md
- [[#7170](https://github.com/apache/incubator-seata/pull/7170)] Optimize seata client I/O processing by adjusting thread count


### security:
- [[#6069](https://github.com/apache/incubator-seata/pull/6069)] Upgrade Guava dependencies to fix security vulnerabilities
- [[#6145](https://github.com/apache/incubator-seata/pull/6145)] upgrade jettison to 1.5.4
- [[#6144](https://github.com/apache/incubator-seata/pull/6144)] upgrade nacos client to 1.4.6
- [[#6147](https://github.com/apache/incubator-seata/pull/6147)] upgrade kafka-clients to 3.6.1
- [[#6338](https://github.com/apache/incubator-seata/pull/6338)] upgrade jackson version

- [[#PR_NO](https://github.com/apache/incubator-seata/pull/PR_NO)] upgrade XXX

### test:

- [[#7092](https://github.com/apache/incubator-seata/pull/7092)] fix the issue of NacosMockTest failing to run
- [[#7098](https://github.com/apache/incubator-seata/pull/7098)] Add unit tests for the `seata-common` module
- [[#7160](https://github.com/apache/incubator-seata/pull/7160)] Refactored tests in `LowerCaseLinkHashMapTest` to use parameterized unit testing
- [[#7167](https://github.com/apache/incubator-seata/pull/7167)] Refactored tests in `DurationUtilTest` to simplify and use parameterized unit testing

### refactor:

Expand All @@ -61,5 +77,6 @@ Thanks to these contributors for their code commits. Please report an unintended
- [wxrqforever](https://github.com/wxrqforever)
- [xingfudeshi](https://github.com/xingfudeshi)
- [YongGoose](https://github.com/YongGoose)
- [Monilnarang](https://github.com/Monilnarang)

Also, we receive many valuable issues, questions and advices from our community. Thanks for you all.
20 changes: 19 additions & 1 deletion changes/zh-cn/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
- [[#7037](https://github.com/apache/incubator-seata/pull/7037)] 支持UndoLog的fury序列化方式
- [[#7069](https://github.com/apache/incubator-seata/pull/7069)] Raft集群模式支持地址转换
- [[#7038](https://github.com/apache/incubator-seata/pull/7038)] 支持Fury序列化器
- [[#7133](https://github.com/apache/incubator-seata/pull/7133)] 实现对残留的end状态事务定时处理
- [[#7171](https://github.com/apache/incubator-seata/pull/7171)] 客户端支持 EpollEventLoopGroup

### bugfix:

Expand All @@ -18,6 +20,8 @@
- [[#7107](https://github.com/apache/incubator-seata/pull/7107)] 修复tcc模式下,当业务对象为代理对象时,解析注解失败问题。
- [[#7124](https://github.com/apache/incubator-seata/pull/7124)] GlobalTransactionScanner.afterPropertiesSet方法需要做扫描检查
- [[#7135](https://github.com/apache/incubator-seata/pull/7135)] 回滚时遇到唯一索引冲突视为脏写
- [[#7150](https://github.com/apache/incubator-seata/pull/7150)] raft节点之前时间差,follower节点无法同步数据
- [[#7102](https://github.com/apache/incubator-seata/pull/7150)] 将XA模式预提交事务从提交阶段修改为关闭前阶段

### optimize:

Expand All @@ -26,18 +30,31 @@
- [[#7075](https://github.com/apache/incubator-seata/pull/7075)] 当channel为空时,快速失败,以便于减少不必要的等待
- [[#7089](https://github.com/apache/incubator-seata/pull/7089)] 新增instance注册到注册中心的接口
- [[#7093](https://github.com/apache/incubator-seata/pull/7093)] 增加jdk21的工作流测试
- [[#7130](https://github.com/apache/incubator-seata/pull/7130)] 暴漏一些关于Druid, Hikari, 和DBCP的保活配置项
- [[#7131](https://github.com/apache/incubator-seata/pull/7131)] 移除 org.codehaus.jackson 依赖
- [[#7134](https://github.com/apache/incubator-seata/pull/7134)] 升级 tomcat-embed 至 9.0.98 版本
- [[#7138](https://github.com/apache/incubator-seata/pull/7138)] 移除 org.eclipse.jetty 依赖
- [[#7139](https://github.com/apache/incubator-seata/pull/7139)] 升级 xstream 至 1.4.21 版本
- [[#7141](https://github.com/apache/incubator-seata/pull/7141)] 去除未使用的依赖
- [[#7142](https://github.com/apache/incubator-seata/pull/7142)] 升级 commons-compress 至 1.27.1 版本
- [[#7149](https://github.com/apache/incubator-seata/pull/7149)] 修复./distribution/NOTICE.md文件中的异常字符串显示问题
- [[#7170](https://github.com/apache/incubator-seata/pull/7170)] 通过调整线程数优化 Seata 客户端 I/O 处理


### security:
- [[#6069](https://github.com/apache/incubator-seata/pull/6069)] 升级Guava依赖版本,修复安全漏洞
- [[#6144](https://github.com/apache/incubator-seata/pull/6144)] 升级Nacos依赖版本至1.4.6
- [[#6145](https://github.com/apache/incubator-seata/pull/6145)] 升级 jettison依赖版本至1.5.4
- [[#6147](https://github.com/apache/incubator-seata/pull/6147)] 升级 kafka-clients依赖至3.6.1
- [[#6338](https://github.com/apache/incubator-seata/pull/6338)] 升级 jackson 依赖版本

- [[#PR_NO](https://github.com/apache/incubator-seata/pull/PR_NO)] 升级XXX

### test:

- [[#7092](https://github.com/apache/incubator-seata/pull/7092)] 修复NacosMockTest测试方法并行导致测试结果被干扰失败的问题
- [[#7098](https://github.com/apache/incubator-seata/pull/7098)] 增加 `seata-common` 模块的测试用例
- [[#7160](https://github.com/apache/incubator-seata/pull/7160)] 在 LowerCaseLinkHashMapTest 中重构测试,以使用参数化单元测试
- [[#7167](https://github.com/apache/incubator-seata/pull/7167)] 重构了 DurationUtilTest 中的测试,以简化并使用参数化单元测试

### refactor:

Expand All @@ -60,5 +77,6 @@
- [wxrqforever](https://github.com/wxrqforever)
- [xingfudeshi](https://github.com/xingfudeshi)
- [YongGoose](https://github.com/YongGoose)
- [Monilnarang](https://github.com/Monilnarang)

同时,我们收到了社区反馈的很多有价值的issue和建议,非常感谢大家。
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,21 @@ public interface ConfigurationKeys {
*/
String STORE_DB_PREFIX = "store.db.";

/**
* The constant STORE_DB_DRUID_PREFIX.
*/
String STORE_DB_DRUID_PREFIX = "store.db.druid.";

/**
* The constant STORE_DB_HIKARI_PREFIX.
*/
String STORE_DB_HIKARI_PREFIX = "store.db.hikari.";

/**
* The constant STORE_DB_DBCP_PREFIX.
*/
String STORE_DB_DBCP_PREFIX = "store.db.dbcp.";

/**
* The constant STORE_REDIS_PREFIX.
*/
Expand Down Expand Up @@ -349,11 +364,77 @@ public interface ConfigurationKeys {
*/
String STORE_DB_LOG_QUERY_LIMIT = STORE_DB_PREFIX + "queryLimit";

/**
* The constant STORE_DB_DRUID_TIME_BETWEEN_EVICTION_RUNS_MILLIS.
*/
String STORE_DB_DRUID_TIME_BETWEEN_EVICTION_RUNS_MILLIS = STORE_DB_DRUID_PREFIX + "timeBetweenEvictionRunsMillis";

/**
* The constant STORE_DB_DRUID_MIN_EVICTABLE_TIME_MILLIS.
*/
String STORE_DB_DRUID_MIN_EVICTABLE_TIME_MILLIS = STORE_DB_DRUID_PREFIX + "minEvictableIdleTimeMillis";

/**
* The constant STORE_DB_DRUID_TEST_WHILE_IDLE.
*/
String STORE_DB_DRUID_TEST_WHILE_IDLE = STORE_DB_DRUID_PREFIX + "testWhileIdle";

/**
* The constant STORE_DB_DRUID_TEST_ON_BORROW.
*/
String STORE_DB_DRUID_TEST_ON_BORROW = STORE_DB_DRUID_PREFIX + "testOnBorrow";

/**
* The constant STORE_DB_DRUID_KEEP_ALIVE.
*/
String STORE_DB_DRUID_KEEP_ALIVE = STORE_DB_DRUID_PREFIX + "keepAlive";

/**
* The constant STORE_DB_HIKARI_IDLE_TIMEOUT.
*/
String STORE_DB_HIKARI_IDLE_TIMEOUT = STORE_DB_HIKARI_PREFIX + "idleTimeout";

/**
* The constant STORE_DB_HIKARI_KEEPALIVE_TIME.
*/
String STORE_DB_HIKARI_KEEPALIVE_TIME = STORE_DB_HIKARI_PREFIX + "keepaliveTime";

/**
* The constant STORE_DB_HIKARI_MAX_LIFE_TIME.
*/
String STORE_DB_HIKARI_MAX_LIFE_TIME = STORE_DB_HIKARI_PREFIX + "maxLifetime";

/**
* The constant STORE_DB_HIKARI_VALIDATION_TIMEOUT.
*/
String STORE_DB_HIKARI_VALIDATION_TIMEOUT = STORE_DB_HIKARI_PREFIX + "validationTimeout";

/**
* The constant STORE_DB_DBCP_TIME_BETWEEN_EVICTION_RUNS_MILLIS.
*/
String STORE_DB_DBCP_TIME_BETWEEN_EVICTION_RUNS_MILLIS = STORE_DB_DBCP_PREFIX + "timeBetweenEvictionRunsMillis";

/**
* The constant STORE_DB_DBCP_MIN_EVICTABLE_TIME_MILLIS.
*/
String STORE_DB_DBCP_MIN_EVICTABLE_TIME_MILLIS = STORE_DB_DBCP_PREFIX + "minEvictableIdleTimeMillis";

/**
* The constant STORE_DB_DBCP_TEST_WHILE_IDLE.
*/
String STORE_DB_DBCP_TEST_WHILE_IDLE = STORE_DB_DBCP_PREFIX + "testWhileIdle";

/**
* The constant STORE_DB_DBCP_TEST_ON_BORROW.
*/
String STORE_DB_DBCP_TEST_ON_BORROW = STORE_DB_DBCP_PREFIX + "testOnBorrow";

/**
* The constant LOCK_DB_TABLE.
*/
String LOCK_DB_TABLE = STORE_DB_PREFIX + "lockTable";


/**
* The constant SERVER_RPC_PORT.
*/
Expand Down Expand Up @@ -394,6 +475,11 @@ public interface ConfigurationKeys {
*/
String ROLLBACKING_RETRY_PERIOD = RECOVERY_PREFIX + "rollbackingRetryPeriod";

/**
* The constant END_STATUS_RETRY_PERIOD.
*/
String END_STATUS_RETRY_PERIOD = RECOVERY_PREFIX + "endstatusRetryPeriod";

/**
* The constant TIMEOUT_RETRY_PERIOD.
*/
Expand Down Expand Up @@ -518,6 +604,11 @@ public interface ConfigurationKeys {
*/
String RETRY_DEAD_THRESHOLD = SERVER_PREFIX + "retryDeadThreshold";

/**
* the constant END_STATE_RETRY_DEAD_THRESHOLD
*/
String END_STATE_RETRY_DEAD_THRESHOLD = SERVER_PREFIX + "endStateRetryDeadThreshold";

/**
* the constant DISTRIBUTED_LOCK_EXPIRE_TIME
*/
Expand Down
4 changes: 4 additions & 0 deletions common/src/main/java/org/apache/seata/common/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ public interface Constants {
*/
String ROLLBACKING = "Rollbacking";

/**
* The constant END
*/
String END = "END";
/**
* The constant AUTO_COMMIT
*/
Expand Down
29 changes: 27 additions & 2 deletions common/src/main/java/org/apache/seata/common/DefaultValues.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public interface DefaultValues {
/**
* The constant DEFAULT_SELECTOR_THREAD_SIZE.
*/
int DEFAULT_SELECTOR_THREAD_SIZE = 1;
int DEFAULT_SELECTOR_THREAD_SIZE = -1;
/**
* The constant DEFAULT_BOSS_THREAD_SIZE.
*/
Expand Down Expand Up @@ -310,6 +310,11 @@ public interface DefaultValues {
*/
int DEFAULT_RETRY_DEAD_THRESHOLD = 2 * 60 * 1000 + 10 * 1000;

/**
* the constant DEFAULT_END_STATE_RETRY_DEAD_THRESHOLD
*/
int DEFAULT_END_STATE_RETRY_DEAD_THRESHOLD = 10 * 1000;

/**
* the constant TM_INTERCEPTOR_ORDER
*/
Expand Down Expand Up @@ -397,6 +402,11 @@ public interface DefaultValues {
*/
int DEFAULT_ROLLBACKING_RETRY_PERIOD = 1000;

/**
* the constant DEFAULT_END_STATUS_RETRY_PERIOD
*/
int DEFAULT_END_STATUS_RETRY_PERIOD = 30 * 1000;

/**
* the constant DEFAULT_TIMEOUT_RETRY_PERIOD
*/
Expand Down Expand Up @@ -497,12 +507,27 @@ public interface DefaultValues {
*/
int DEFAULT_ROCKET_MQ_MSG_TIMEOUT = 60 * 1000;

long DEFAULT_DB_DRUID_TIME_BETWEEN_EVICTION_RUNS_MILLIS = 120000;
long DEFAULT_DB_DRUID_MIN_EVICTABLE_TIME_MILLIS = 300000;
boolean DEFAULT_DB_DRUID_TEST_WHILE_IDLE = true;
boolean DEFAULT_DB_DRUID_TEST_ON_BORROW = false;
boolean DEFAULT_DB_DRUID_KEEP_ALIVE = false;

long DEFAULT_DB_HIKARI_IDLE_TIMEOUT = 600000L;
long DEFAULT_DB_HIKARI_KEEPALIVE_TIME = 120000L;
long DEFAULT_DB_HIKARI_MAX_LIFE_TIME = 1800000L;
long DEFAULT_DB_HIKARI_VALIDATION_TIMEOUT = 5000L;

long DEFAULT_DB_DBCP_TIME_BETWEEN_EVICTION_RUNS_MILLIS = 120000;
long DEFAULT_DB_DBCP_MIN_EVICTABLE_TIME_MILLIS = 300000;
boolean DEFAULT_DB_DBCP_TEST_WHILE_IDLE = true;
boolean DEFAULT_DB_DBCP_TEST_ON_BORROW = false;

/**
* The constant DEFAULT_RATE_LIMIT_ENABLE.
*/
boolean DEFAULT_RATE_LIMIT_ENABLE = false;


/**
* The constant DEFAULT_RAFT_SSL_ENABLED.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public class Result<T> implements Serializable {

public static final String SUCCESS_CODE = "200";
public static final String SUCCESS_MSG = "success";
public static final String FAIL_CODE = "500";


private String code = SUCCESS_CODE;
private String message = SUCCESS_MSG;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,18 @@ public static <T> SingleResult<T> failure(Code errorCode) {
return new SingleResult(errorCode.getCode(), errorCode.getMsg());
}

public static <T> SingleResult<T> failure(String msg) {
return new SingleResult<>(FAIL_CODE, msg);
}

public static <T> SingleResult<T> success(T data) {
return new SingleResult<>(SUCCESS_CODE, SUCCESS_MSG,data);
}

public static <T> SingleResult<T> success() {
return new SingleResult<>(SUCCESS_CODE, SUCCESS_MSG, null);
}

public T getData() {
return data;
}
Expand Down
Loading

0 comments on commit 331afa7

Please sign in to comment.