Tag

putIfAbsent

1 views collected around this technical thread.

macrozheng
macrozheng
Nov 27, 2024 · Backend Development

How a Tiny HashMap Bug Triggered a Massive Memory Leak in a High‑Traffic Microservice

A senior architect introduced a high‑concurrency monitoring feature that used a ConcurrentHashMap without proper equals/hashCode implementations, leading to duplicate keys, race conditions, and severe memory leaks, which were later resolved by correcting the key class and applying atomic map operations.

ConcurrentHashMapHashCodeJava
0 likes · 8 min read
How a Tiny HashMap Bug Triggered a Massive Memory Leak in a High‑Traffic Microservice