Suppose I have a process that is updating a record and encounters a record lock, preventing it from continuing. I assume the process normally blocks (as opposed to failing and requiring the application to implement its own retry logic).
Assuming this is so, how exactly does this block/lock get released? I see two general alternatives: (1) the driver polls SQL Server every N milliseconds; (2) SQL Server signals the driver when the lock is released.
I’m sure there is some variability between drivers and configuration, etc., I’m looking for a general idea.
Neither. The driver is not involved in the blocking process- the internal SQL Server thread (or fiber) that is executing the query is what gets blocked, and there are likely multiple mechanisms involved (some spin waiting, some polling, some blocking, etc). The driver is just waiting for results.