Backend & systems·Transactions and isolation
you run the same range query twice in one transaction and the second time there is a new row matching it.
Phantom read
New rows appearing in a range that a repeated query covers, because another transaction inserted them. It is distinct from a non-repeatable read: nothing you already saw changed, the set grew. It is exactly the anomaly that breaks "check nothing exists, then insert", which is why unique constraints are a better answer than a SELECT.