logoalt Hacker News

soontimestoday at 2:55 AM1 replyview on HN

Can you clarify why this involves no locking? There can still be 2 actors fighting for the same row.


Replies

isignaltoday at 3:18 AM

Two concurrent deductions of inventory do contend but only during the actual DB update. That is just normal DB locking for SQL isolation levels. The blog refers to explicit locking by the app, which is where skip locked comes in.

show 1 reply