Files
java-interview-lab/bookmyshow/output/08-database-strategies.txt
T

10 lines
656 B
Plaintext

32 connections released at once, all holding seat D4 of SH-1, repeated 20 times per strategy (H2 2.5.252)
====================================================================================================
optimistic (SELECT, then UPDATE ... WHERE version = ?): rounds with exactly one winner: 20 of 20
pessimistic (SELECT ... FOR UPDATE, then UPDATE): rounds with exactly one winner: 20 of 20
conditional (one UPDATE ... WHERE state = 'AVAILABLE'): rounds with exactly one winner: 20 of 20
Control, not asserted and timing dependent:
naive (SELECT, then UPDATE with no version or lock): rounds with exactly one winner: 3 of 20