Stopping Concurrent Double Bookings - PostgreSQL EXCLUDE Constraints
Overlapping bookings for one room arrive together. A PostgreSQL EXCLUDE constraint accepts only one. How to declare it, and how it works.
4 posts

Overlapping bookings for one room arrive together. A PostgreSQL EXCLUDE constraint accepts only one. How to declare it, and how it works.

Grouping 10,000+ notifications makes chunk jobs finish out of order. waiting-children keeps one group and one send; invariants check the five races closed.

How the JVM monitor behind synchronized works, what ReentrantLock adds, and a producer-consumer fix. Then lock striping on per-user keys to raise throughput.

1,000 people request 100 items at once. How a single UPDATE gives one to exactly 100 of them, instead of the locks usually proposed for a first-come event.