Skip to content

Commit

Permalink
optimize: asynchronous tasks handle global transactions in parallel (#…
Browse files Browse the repository at this point in the history
…4400)

* asynchronous tasks handle global transactions in parallel
  • Loading branch information
funky-eyes authored Feb 24, 2022
1 parent d4b265f commit 4622746
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
5 changes: 2 additions & 3 deletions changes/1.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,10 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [[#4305](https://github.com/seata/seata/pull/4305)] 优化tc端全局锁获取失败时的日志打印
- [[#4336](https://github.com/seata/seata/pull/4336)] 添加AT模式不支持的SQL语句异常提示
- [[#4359](https://github.com/seata/seata/pull/4359)] 支持配置元数据读取环境变量
- [[#4353](https://github.com/seata/seata/pull/4353)]`seata-all.jar` 瘦身。
- [[#4353](https://github.com/seata/seata/pull/4353)]`seata-all.jar` 瘦身
- [[#4400](https://github.com/seata/seata/pull/4400)] 异步二阶段任务支持并行处理提升效率
- [[#4391](https://github.com/seata/seata/pull/4391)] commit/rollback 重试超时事件




### test:

Expand Down
4 changes: 1 addition & 3 deletions changes/en-us/1.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,9 @@
- [[#4336](https://github.com/seata/seata/pull/4336)] add SQL exception prompt not supported by AT mode
- [[#4359](https://github.com/seata/seata/pull/4359)] support configuration metadata read from environment variables
- [[#4353](https://github.com/seata/seata/pull/4353)] Slimming down for the `seata-all.jar`
- [[#4400](https://github.com/seata/seata/pull/4400)] asynchronous tasks handle global transactions in parallel
- [[#4391](https://github.com/seata/seata/pull/4391)] commit/rollback retry timeout event




### test:


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public static boolean isTimeoutGlobalStatus(GlobalStatus status) {
* @since 1.5.0
*/
public static void forEach(Collection<GlobalSession> sessions, GlobalSessionHandler handler) {
for (GlobalSession globalSession : sessions) {
sessions.parallelStream().forEach(globalSession -> {
try {
MDC.put(RootContext.MDC_KEY_XID, globalSession.getXid());
handler.handle(globalSession);
Expand All @@ -235,7 +235,7 @@ public static void forEach(Collection<GlobalSession> sessions, GlobalSessionHand
} finally {
MDC.remove(RootContext.MDC_KEY_XID);
}
}
});
}

/**
Expand Down

0 comments on commit 4622746

Please sign in to comment.