Isolation level for reading a row only once
Hi,
I need to select the first row from a table where a column value is equal to
false
and also modify it to true
. This means, if many request come at the same time (they do), no 2 SELECT statements should get the same row.
I am sure a distributed lock would solve the problem, but I was wondering if a transaction isolation level would be enough.
Would Serializable
isolation level be ideal for this use case?3 Replies