seata register the branch when the xa transaction end

e5nqia27  于 2个月前  发布在  其他
关注(0)|答案(3)|浏览(23)

Why you need it?

Is your feature request related to a problem? Please describe in details
本地生成branchid 如果当前rm出现异常,肯定是走rollback,这样减少了一次rpc注册分支的开销,直接rollback即可
而rm正常提交的时候,会走end和prepare,当在end和prepare之间应该进行一次分支注册

How it could be?

A clear and concise description of what you want to happen. You can explain more about input of the feature, and output of it.

Add any other context or screenshots about the feature request here.

u1ehiz5o

u1ehiz5o2#

本地生成的branchId如何保证唯一性呢?我目前想到两种可能:1. 在 RM 侧添加雪花算法;2. 类似 traceId 通过上游调用时传递,并在末尾添加递增数字

erhoui1w

erhoui1w3#

本地生成的branchId如何保证唯一性呢?我目前想到两种可能:1. 在 RM 侧添加雪花算法;2. 类似 traceId 通过上游调用时传递,并在末尾添加递增数字

第一版可以直接用方案一

相关问题