GitHub user funky-eyes added a comment to the discussion: 
【求助】tcc模式使用fence表情况下如何对上游重试做幂等?

> 只对try做幂等可能会有数据不一致问题。例如考虑时序:
> 
> 1. t1 时刻,请求开始,注册事务,并且对两个resource执行try 成功,进入到confirm阶段
> 2. t2 时刻, resource1 confirm 成功, resource2 confirm未到达
> 3. t3 时刻,请求重试,重新注册新的事务,重新执行try,但是try因为网络原因失败,进入到cancel阶段
> 4. t4时刻,resource2 cancel成功
>    这种情况下resource1 confirm,resource2 
> cancel,最终不一致。并且因为重试的请求可能是因为网络异常等原因失败,根本没有实际执行try,所以try的幂等没办法解决。
>    我们尝试使用下列方式解决,请问是否可行:
>    发起事务后记录下业务主键和xid的关系,重复请求时拦截请求,或者以第一次请求的xid继续后续流程

If you've already implemented idempotency properly in the Try phase, how could 
an extra branch transaction possibly appear?
By placing the idempotency check on the actual Provider side (rather than the 
Consumer side), the Provider can simply reject any duplicate attempts outright. 
In that case, isn't it impossible to end up with any redundant branch 
transactions?

GitHub link: 
https://github.com/apache/incubator-seata/discussions/7892#discussioncomment-15545439

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to