Comment by mrkeen

2 days ago

Yep. Your SQL transactions are only consistent to the extent that they stay in the db.

Mashing F5 is a perfect example of stepping outside the bounds of consistency.

If want to update a counter, do you read the number on your frontend, add 2 then send it back to the backend? If someone else does the same, that's a lost write regardless of how "strongly consistent" your db vendor promises to be.

But that's how the article says programmers work. Read, update, write.

If you thought "that's dumb, just send in (+2)", congrats, that's EC thinking!