UmurInan
Concurrency Topic

Concurrency

Most concurrency bugs do not appear in tests. They appear at 3am when two requests happen to overlap in just the wrong way. These posts are about isolation levels, race conditions, async vs parallel, deadlocks, and the discipline of writing code that survives concurrent callers.

Backend

Posted on May 28, 2026

Why Your Distributed Lock Doesn't Lock

Distributed locks don't provide mutual exclusion. Fencing tokens, GC pauses, clock drift, and why the lock you wrote is actually a polite hint at best.

Read more
Backend

Posted on May 13, 2026

Your Spring Bean Is Not What You Think It Is

Spring's default bean scope is singleton. The bugs appear when a service holds mutable state, a scoped bean is misused, or ThreadLocal cleanup is skipped.

Read more
Backend

Posted on May 4, 2026

Your Async Code Is Still Single-Threaded

Async lets one thread do more I/O. It does not let one thread do more CPU. Most async-related performance disappointments come from confusing those two.

Read more
Backend

Posted on May 1, 2026

Two Transactions Walk Into a Lock

Deadlocks are not exotic. They are predictable consequences of lock order. Here are the patterns, the fixes, and the eleven characters that ended one outage.

Read more
Backend

Posted on Apr 21, 2026

Database Isolation Levels Are a Contract, Not a Dial

Isolation levels define which anomalies you tolerate, not how much correctness you get. The SQL standard and what databases implement diverged decades ago.

Read more
Backend

Posted on Apr 12, 2026

Transactions Don't Fix Race Conditions

Wrapping code in a transaction doesn't make concurrent operations safe. Here's what transactions guarantee and what race conditions they let slip through.

Read more
Database

Posted on Apr 10, 2026 intermediate

Optimistic vs Pessimistic Locking in JPA

Two JPA strategies for preventing the lost update problem. @Version for optimistic locking, SELECT FOR UPDATE for pessimistic. Real SQL output, working tests.

Read more