交易和锁定

扫码查看
本文介绍了交易和锁定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对自动付款系统有一些要求。系统有四台机器设置如下:

1-两台机器有一个集群数据库。

2-两台机器有.net业务逻辑组件将处理

与某些外部组件的支付交易(支付网关)

我的查询是关于业务逻辑内的事务处理

零件。因为这个组件在两台机器上运行,而这些组件的两个实例正在访问相同的事务

表。我需要这两个组件一起工作而不会阻塞。

因此事务隔离级别序列化不适用于这个

型号。


我不清楚如何锁定特定的行

处理通过某种情况。如果我设置一个标志(列)来锁定行,

然后该实例可能会在重置标志之前失败,那么此行

将永远不会被处理。在这种情况下,我希望另一个

实例接管并处理以前由

其他实例锁定的内容。


有没有关于这些组件之间的安排的想法

访问同一张桌子?


非常感谢你的帮助,

Rami AlHasan

I have some requirement for an automated payment system. The system has
four machines setup as follows:
1- Two machines have a clustered database.
2- Two machines have a .net business logic component that will handle
payment transactions with certain external component (Payment Gateway)
My query is regarding transaction handling inside the business logic
component. Because this component is running on two machines and these
two instances of the component are accessing the same transactions
table. I need these two components to work together without blocking.
So transaction isolation level "Serialized" will not work with this
model.

I am not clear about how to lock the specific rows that are being
handled by certain instance. If I set a flag (column) to lock the row,
then that instance may fail before resetting the flag then this row
will never be handled. In such a scenario I would expect the other
instance to take over and handle whatever was locked previously by the
other instance.

Is there any ideas regarding arrangement between such components which
access the same table?

Thanks a lot for the help,
Rami AlHasan

推荐答案





这篇关于交易和锁定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 14:18
查看更多