XA模式下的全局可串行性|Global serializability in XA mode #7657
chuzhe-as-a-dev
started this conversation in
Ideas
Replies: 1 comment
-
|
Hi @chuzhe-as-a-dev, Apologies for the late reply. Thank you for your interest in the Seata community, and congratulations on such an excellent design and the significant impact it’s already had. May I invite you to Seata’s DingTalk developer group so we can continue the discussion more easily? If you’re willing, please send your DingTalk ID to my email at I’d also encourage you to submit a PR so the wider community can review and collaborate on your changes. If you can find time to share more details about your implementation with us, I would be very grateful. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
大家好,我是上海交通大学的数据库研究人员,我们最近在数据库顶会VLDB 2025上发表了一篇论文(论文、PPT),高效地实现了跨DB全局可串行性(Global Serializability)的隔离保障,并基于Seata的XA模式构建并开源了原型实现。如果社区对这一特性感兴趣的话,欢迎将其集成,我也会提供力所能及的帮助!
全局可串行性是跨DB事务下最强的隔离级别,能够保障跨节点工作流的正确性,减轻应用开发负担。而XA模式下,就算将每个DB的隔离级别都单独设置为可串行化(Serializable),也不能保证跨DB的全局可串行性,事务并发执行仍可导致应用错误(详见论文图1或PPT中例子)。
我们针对不同数据库类别,在XA prepare时的额外执行检查/协调操作(绝大部分情况下,只增加一次数据库写)来保证全局可串行性,并在论文中严格证明了算法的正确性。我们的实现十分轻量级,含空行、注释在内约修改了600行,相对学术界先前的全局可串行性方案最高提高了11倍吞吐性能,和Seata的原本XA模式性能几乎一致。
Hello everyone, I am a database researcher from Shanghai Jiao Tong University. We recently published a paper at the top-tier database conference VLDB 2025 (Paper, Slides), which efficiently guarantees global serializability for cross-database transactions. We have built and open-sourced a prototype implementation based on Seata's XA mode. If the community is interested in this feature, we would be delighted to see it integrated, and I am happy to provide any assistance I can!
Global serializability is the strongest isolation level for cross-database transactions, ensuring the correctness of cross-node workflows and reducing the burden on developers. However, under the XA mode, even setting each participating database to the Serializable isolation level cannot guarantee global serializability, and concurrency anomalies can still occur (for details, please refer to Figure 1 in our paper or the examples in the slides).
To guarantee global serializability, we perform additional check/coordination operations during the XA prepare phase, tailored for different types of databases (in most cases, this adds only a single database write), and we have formally proven the correctness of the algorithm in our paper. Our implementation is very lightweight, with only about 600 lines of code modified (including blank lines and comments). It achieves up to 11x higher throughput compared to previous academic solutions for global serializability, and its performance is nearly identical to Seata's original XA mode.
Beta Was this translation helpful? Give feedback.
All reactions