We have a trigger that runs AFTER an insert in a table (Nodes) that creates entries in another table (NodeClosures) that selects entries (6 on average) from the NodeClosures table and inserts them as new rows with a different value in a certain column. The insert operations in the Nodes table occurs one at a time (so no single large batch insert operations, Entity Framework) and the select/insert operation into the NodeClosures table is causing an intent exclusive lock. I'm uncertain if this is due to lock escalation (not sure how as neither insert operations are inserting more than 6 rows). Some additional information, Read Committed Snapshot Isolation is being used as well as Delayed Durability Transactions.
I have included the full trigger for reference (MSSQL 2017):
CREATE TRIGGER [tr_dbNode_insert] ON [dbo].[DbNodes] After INSERT AS BEGIN -- Insert self closure insert into DbNodeClosures (ParentID, ChildID, Depth, AccountID) select Id, Id, 0, AccountID from inserted; -- Insert parent's closures as it's own + 1 insert into DbNodeClosures (ParentID, ChildID, Depth, AccountID) select closures.ParentID, inserted.Id, closures.Depth + 1, inserted.AccountID from inserted join DbNodeClosures as closures on inserted.ParentID = closures.ChildID; END