什么可以解释3个没有共同行的交易之间的锁/僵局?

发布于 2025-01-25 12:57:33 字数 302 浏览 3 评论 0原文

在3个交易之间,我有一个没有共同行的交易之间的锁(和僵局),我不明白为什么。这就是用户所做的:

  • 在客户端1上,我们进行了383个订单的大量插入;
  • 在客户端2上,我们尝试更新订单A,然后锁定指令删除TBL_MSG,其中ID = 345454541216;
  • 在客户端3上,我们尝试更新订单B,然后锁定指令删除TBL_MSG,其中ID = 345848487778;
  • 客户端1提交交易时,则会释放客户端2和客户端3的锁定,并且客户端2带有错误00060 [交易僵局]客户3崩溃

3客户3?

I have a Lock (and a deadlock) between 3 transactions that have no row in common an I don't understand why. This is what the user does :

  • On client 1 we do a bulk insert of 383 orders;
  • On Client 2 we try to update the order A and we are lock on the instruction DELETE TBL_MSG WHERE ID = 345454541216;
  • On Client 3 we try to update the order B and we are lock on the instruction DELETE TBL_MSG WHERE ID = 345848487778;
  • When Client 1 commit it's transaction then the lock on Client 2 and Client 3 is released and Client 2 crash with the error 00060 [Transaction Deadlock] with Client 3

What can explain this scenario if no row are in common between Client 1/Client 2/Client 3 ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文