【求助】tcc模式使用fence表情况下如何对上游重试做幂等? #7892
-
|
以下单为例,上游重试导致注册了两个事务,应该如何实现两个事务之间的幂等? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
|
They don't conflict. Seata TCC's fence mechanism is designed to address idempotency in the second phase and prevent dangling transactions in the first phase. It serves a distinct purpose from the idempotency requirements you need to implement for your service's first-phase invocations, with no overlap between the two. |
Beta Was this translation helpful? Give feedback.
-
|
请问您有没有更好的解决这个问题的方案呀?我们现在自己维护了一张全局事务状态幂等表的性能太差了,因为事务的任何阶段都需要对这张表加锁判断状态,甚至不同的resources之间都需要进行锁竞争。 |
Beta Was this translation helpful? Give feedback.
-
|
非常感谢,我明白了,你是对的。
|
Beta Was this translation helpful? Give feedback.
They don't conflict. Seata TCC's fence mechanism is designed to address idempotency in the second phase and prevent dangling transactions in the first phase. It serves a distinct purpose from the idempotency requirements you need to implement for your service's first-phase invocations, with no overlap between the two.