我创建了使用EntityFramework连接到Firebird服务器的简单WinForms应用程序。数据库只包含一个包含4个字段的表(Id,FirstName,LastName,Email)。 当我并行运行不同的查询以更新不同的字段时,我遇到了异常消息“无等待事务时锁定冲突”。 是EF特定的行为还是我需要调整firebird服务器以进行使用字段级锁定?
答案 0 :(得分:0)
You get this error if you are updating the same row in multiple transactions at the same time. There is no such thing as field level locking in Firebird, as the row as a whole is versioned.
The only solutions available to you are: don't do this, update all fields in a single query, add a retry mechanism, or don't fire updates of different fields in parallel.