Deadlocking on tempdb.dbo.RG_AllObjects_v4
RandomUser
Posts: 5 Bronze 1
I've got two developers both connected to the same SQL instance and I'm seeing fairly frequent deadlocking from the Redgate connections on tempdb.dbo.RG_AllObjects_v4. Figured I'd check to see if there's a recommendation for this before I start making changes.
Example:
Deadlock victim
<frame procname="tempdb.dbo.RG_WhatsChanged_v4" line="275" stmtstart="24182" stmtend="25836">
Deadlock winner
Example:
Deadlock victim
<frame procname="tempdb.dbo.RG_WhatsChanged_v4" line="275" stmtstart="24182" stmtend="25836">
UPDATE tempdb.dbo.RG_AllObjects_v4
SET EntryDateTime = GETUTCDATE(),
[Matched] = 0,
UserName = NULL,
ObjectName = NewObjects.ObjectName,
SchemaName = NewObjects.SchemaName,
TypeOfAction = 'Modified',
ModifyDate = NewObjects.ModifyDate
FROM tempdb.dbo.RG_AllObjects_v4 CurrentObjects
INNER JOIN #CurrentDatabaseObjects NewObjects
ON CurrentObjects.DatabaseID = NewObjects.DatabaseID
AND CurrentObjects.ObjectID = NewObjects.ObjectID
AND CurrentObjects.ObjectType = NewObjects.ObjectType
WHERE CurrentObjects.ModifyDate < NewObjects.ModifyDate
-- and any child objects that when created or deleted
-- there is no corresponding update to the parent modification date
-- currently only EP, but you wait! </frame>
Deadlock winner
<frame procname="tempdb.dbo.RG_WhatsChanged_v4" line="522" stmtstart="47136" stmtend="48048">
UPDATE Parent
SET UserName = Child.UserName,
[Matched] = 1
FROM tempdb.dbo.RG_AllObjects_v4 Parent
INNER JOIN tempdb.dbo.RG_AllObjects_v4 Child
ON Parent.DatabaseID = Child.DatabaseID
AND Parent.ObjectID = Child.ParentObjectID
WHERE Parent.TypeOfAction IN ('Modified', 'Deleted')
AND Parent.[Matched] = 0 AND Child.[Matched] = 1
-- and sometimes it is the other way around. </frame>
Comments
Obviously, with Source Control not polling for changes, the developers need to manually check more frequently so they know what's been modified by others.