Java
7 engineering logs on Java. Newest first.
- Virtual threads changed the calculus for blocking I/O and not for CPU work
Why a million virtual threads is genuinely fine for waiting and pointless for computing, which operations still pin a carrier thread, and why pooling virtual threads defeats the entire point.
- Immutability is a concurrency strategy, not a style preference
Why a shared mutable object is a lock you forgot to take, why defensive copying is the tax you pay for not deciding, and why the allocation cost is smaller than the synchronisation it removes.
- Thread pool starvation from nested async calls
Why a task that waits on another task in the same pool deadlocks with no error, why the common ForkJoinPool makes this a shared fate across libraries, and why the fix is separate pools rather than bigger ones.
- Heap looks fine, pod still OOM killed
Why a JVM with a 2GB heap needs considerably more than 2GB of container memory, which native regions grow without appearing on any heap graph, and why the kernel kills you without a Java exception.
- Your p99 is a garbage collector setting
Why a tail latency that no profiler explains is usually a stop the world pause, why allocation rate matters more than heap size, and why a bigger heap can make the tail worse.
- Deadlocks are a lock ordering bug, and lock ordering is a design decision
Why two transactions doing the same thing in a different order will eventually stop forever, why the database picking a victim is the good outcome, and why sorting your identifiers before you touch them removes an entire class of incident.
- Implementing LFU Cache in O(1) Time: A Hands-on Breakdown
LFU evicts the least popular key, not the oldest. The O(1) version needs two hash maps and linked lists per frequency bucket.