Y
Hacker News
new
|
ask
|
show
|
jobs
by
Thaxll
480 days ago
This is not a thread safety issue though, this is a transaction problem.
2 comments
masklinn
480 days ago
It’s absolutely a thread safety issue. It’s not a data race, but it’s a race condition and can very much cause unexpected behaviour e.g. out of bounds error even though on its face it has the correct preconditions.
link
hassleblad23
479 days ago
Wrapping these 2 statements in a transaction will not solve this particular issue unless the transactions are run sequentially.
link