# Atomicity is not magic

1 min read
aciddb

image from : https://www.scylladb.com/glossary/acid-database/

CS courses love to say “RDBMS gives you atomicity.”
Yeah, no. That’s the classroom version.

In reality, atomicity is not magic. It’s a fragile outcome created by a bunch of lower-level components doing the right thing at the right time. Miss one, and the whole idea falls apart.

Atomicity only holds because of:

  • write-ahead logging
  • strict write ordering
  • real fsync behavior
  • crash-consistent metadata updates
  • durable page flushing
  • atomic rename semantics
  • predictable disk guarantees

Break any of these and atomicity is gone.
Run a database on fake-POSIX storage like SMB or Azure Files and you’ll see how quickly things go sideways.

RDBMS doesn’t “provide” atomicity.
It depends on the filesystem being honest, consistent, and actually durable.

If the disk lies, atomicity dies.

My avatar

Thanks for reading my blog post! Feel free to check out my other posts or contact me via the social links in the footer.


More Posts

# Bodyshop: Thai Software Job Market Landscape

3 min read

Most people talk about the tech industry in Thailand as if it works like the United States.It does not.The Thai software market is built on a foundation that almost guarantees shallow work, unstable…

Read