FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
CA 36 – Isolation (ACID)
NewsMachine Learning

CA 36 – Isolation (ACID)

via Dev.toMohammed Azim J2h ago

This one was about Isolation, basically what happens when two people try to use the same account at the same time. I used two sessions (like opening two terminals). First I checked data: SELECT * FROM accounts; Alice -> 1000 Bob -> 500 Now in Session 1: BEGIN; UPDATE accounts SET balance = balance - 800 WHERE name = 'Alice'; I did not commit yet. Now in Session 2, I tried: SELECT * FROM accounts WHERE name = 'Alice'; It still shows 1000, not 200. So uncommitted change is not visible → no dirty read. Then in Session 2 I tried to update: UPDATE accounts SET balance = balance - 300 WHERE name = 'Alice'; This got stuck (waiting). Because Session 1 is still holding the lock. Then I commit in Session 1: COMMIT; Now Session 2 continues and updates based on new value. So final balance becomes: 1000 - 800 - 300 = -100 (but this fails due to CHECK constraint) So transaction fails and rollback happens. Then I tried changing isolation level: SET TRANSACTION ISOLATION LEVEL READ COMMITTED; Default

Continue reading on Dev.to

Opens in a new tab

Read Full Article
0 views

Related Articles

Amazon Spring Sale live blog 2026: Breaking discounts on Apple, Dyson, and more
News

Amazon Spring Sale live blog 2026: Breaking discounts on Apple, Dyson, and more

ZDNet • 34m ago

News

My Engineering Story

Medium Programming • 49m ago

News

Watch Bloomberg Europe Live

Medium Programming • 52m ago

We Autoscaled to 100 Pods — Then Ran Out of IP Addresses
News

We Autoscaled to 100 Pods — Then Ran Out of IP Addresses

Medium Programming • 1h ago

Pints meet prop bets: Polymarket’s “Situation Room” pop-up bar in DC
News

Pints meet prop bets: Polymarket’s “Situation Room” pop-up bar in DC

Ars Technica • 1h ago

Discover More Articles