1
0

更新 Java_3-5.md

This commit is contained in:
8ga 2025-09-11 11:26:08 +08:00
parent 1e1af097be
commit 6491aa4c78

View File

@ -101,4 +101,14 @@
<p style="color: green">
一样的思路定义一个固定的消息体消息体包含用户ID在服务之间透传。
</p>
### 问题5
<p style="color: red"> 如何在多线程之间实现事务同步?不涉及跨数据源和服务,不需要借助分布式事务。</p>
> 引导假设一个请求中有大量的写入sql互相不耦合。将其拆成多个小事务使用多线程执行为其提速但是其中1个发生异常则全部回滚。
<p style="color: green">
</p>