nhibernate / nhibernate-core

NHibernate Object Relational Mapper
https://nhibernate.info
GNU Lesser General Public License v2.1
2.13k stars 927 forks source link

Implement LockMode.UpgradeSkipLocked #2005

Open beppler opened 5 years ago

beppler commented 5 years ago

Hibernate has an additional lock mode called UPGRADE_SKIPLOCKED described as:

The lock acquisition request skips the already locked rows. It uses a SELECT …​ FOR UPDATE SKIP LOCKED in Oracle and PostgreSQL 9.5, or SELECT …​ with (rowlock, updlock, readpast) in SQL Server.

This kind of lock is very usefull quen there are many consumers for a table that is used as a queue.

Documentation for Hibernate version 5

Documentation for Hibernate version 4

beppler commented 5 years ago

First implemented on Hibernate here