Orchard CMS中的数据库死锁

时间:2015-03-15 05:44:41

标签: nhibernate orchardcms deadlock orchardcms-1.8

使用Orchard版本1.8.1,我们在并发使用时遇到以下死锁:

1

isolationlevel="read committed (2)" 
lockMode="S" 
lockTimeout="4294967295" 
status="suspended" 

(@p0 int,@p1 bit)
SELECT this_.Id as Id48_2_, this_.Number as Number48_2_, this_.Published as Published48_2_, this_.Latest as Latest48_2_, this_.Data as Data48_2_, this_.ContentItemRecord_id as ContentI6_48_2_, contentite1_.Id as Id47_0_, contentite1_.Data as Data47_0_, contentite1_.ContentType_id as ContentT3_47_0_, contenttyp4_.Id as Id49_1_, contenttyp4_.Name as Name49_1_ 
FROM Orchard_Framework_ContentItemVersionRecord this_ 
inner join Orchard_Framework_ContentItemRecord contentite1_ on this_.ContentItemRecord_id=contentite1_.Id 
left outer join Orchard_Framework_ContentTypeRecord contenttyp4_ on contentite1_.ContentType_id=contenttyp4_.Id 
WHERE contentite1_.Id = @p0 and this_.Latest = @p1

(@p0 nvarchar(max) ,@p1 int,@p2 int)
UPDATE Orchard_Framework_ContentItemRecord 
SET Data = @p0, ContentType_id = @p1 
WHERE Id = @p2

2

lockMode="S" 
lockTimeout="4294967295" 
isolationlevel="read committed (2)" 
status="suspended" 

(@p0 nvarchar(4000),@p1 bit)
SELECT this_.Id as Id48_3_, this_.Number as Number48_3_, this_.Published as Published48_3_, this_.Latest as Latest48_3_, this_.Data as Data48_3_, this_.ContentItemRecord_id as ContentI6_48_3_, autoroutep1_.Id as Id116_0_, autoroutep1_.UseCustomPattern as UseCusto2_116_0_, autoroutep1_.CustomPattern as CustomPa3_116_0_, autoroutep1_.DisplayAlias as DisplayA4_116_0_, autoroutep1_.ContentItemRecord_id as ContentI5_116_0_, contentite4_.Id as Id47_1_, contentite4_.Data as Data47_1_, contentite4_.ContentType_id as ContentT3_47_1_, contenttyp5_.Id as Id49_2_, contenttyp5_.Name as Name49_2_ 
FROM Orchard_Framework_ContentItemVersionRecord this_ 
inner join Orchard_Autoroute_AutoroutePartRecord autoroutep1_ on this_.Id=autoroutep1_.Id 
left outer join Orchard_Framework_ContentItemRecord contentite4_ on this_.ContentItemRecord_id=contentite4_.Id 
left outer join Orchard_Framework_ContentTypeRecord contenttyp5_ on contentite4_.ContentType_id=contenttyp5_.Id 
WHERE (autoroutep1_.DisplayAlias is no    </inputbuf>

(@p0 nvarchar(4000),@p1 bit)
SELECT this_.Id as Id48_3_, this_.Number as Number48_3_, this_.Published as Published48_3_, this_.Latest as Latest48_3_, this_.Data as Data48_3_, this_.ContentItemRecord_id as ContentI6_48_3_, autoroutep1_.Id as Id116_0_, autoroutep1_.UseCustomPattern as UseCusto2_116_0_, autoroutep1_.CustomPattern as CustomPa3_116_0_, autoroutep1_.DisplayAlias as DisplayA4_116_0_, autoroutep1_.ContentItemRecord_id as ContentI5_116_0_, contentite4_.Id as Id47_1_, contentite4_.Data as Data47_1_, contentite4_.ContentType_id as ContentT3_47_1_, contenttyp5_.Id as Id49_2_, contenttyp5_.Name as Name49_2_ 
FROM Orchard_Framework_ContentItemVersionRecord this_ 
inner join Orchard_Autoroute_AutoroutePartRecord autoroutep1_ on this_.Id=autoroutep1_.Id 
left outer join Orchard_Framework_ContentItemRecord contentite4_ on this_.ContentItemRecord_id=contentite4_.Id 
left outer join Orchard_Framework_ContentTypeRecord contenttyp5_ on contentite4_.ContentType_id=contenttyp5_.Id 
WHERE (autoroutep1_.DisplayAlias is no

知道如何解决这个问题吗? 可以提供更多日志。 是否可以使用数据库中的更多索引来解决它,或者需要更详细的代码更改?

更新: 尝试使用v1.8.x 1407ff7fcecda0c8d7d7f21edb584d33de8c6dc0进行测试,但问题仍然存在。

0 个答案:

没有答案