Two successful reservations of three units should reduce stock from ten to four. A read-calculate-write operation can instead leave seven: both clients overwrite the row with a value calculated from an earlier read. That mismatch is what this lab checks. The release check is an invariant:
This is a companion discussion topic for the original entry at https://percona.community/blog/2026/10/27/catch-lost-updates-before-release/