调用中止后 MSDTC 和 Oracle 事务锁定?
我在使用 MSDTC 和 Oracle 时遇到问题。 这是一个 .net 应用程序,我使用 TransactionScope 类来控制事务。
问题是,有时,如果事务回滚(在没有调用scope.Complete的情况下调用了scope.Dispose),它会长时间处于“Aborting”状态,而不会释放锁定的记录。 即使事务处于“Aborting”状态,当调用 Dispose 来中止事务时,它会立即返回,因此线程不会被卡住。
有谁知道什么会导致事务像这样运行并在调用中止后保持锁定?
谢谢
I’m running into problems using MSDTC and Oracle. It’s a .net application and I’m using the TransactionScope class to control the transactions.
The problem is that, sometimes, if the transaction is rolled back (scope.Dispose is called without having called scope.Complete), it stays in “Aborting” state for a long time, not releasing the locked records. Even though the transactions stays in “Aborting” state, when Dispose is called to abort the transaction, it returns immediately, so the thread doesn’t get stuck.
Does anyone know what could cause the transaction to behave like this and keep the locks after abort has been called?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 Microsoft Data Provider for Oracle 时,存在与分布式事务的使用相关的已知问题。
如果您正在使用它,请尝试切换到 ODP.NET 提供商,这应该可以解决您的交易问题。
There are known issues around the use of distributed transactions when using the Microsoft Data Provider for Oracle.
If you are using it, try switching to the ODP.NET provider, which should fix your transaction problems.