markAsRemoved() transitions a node to the removed state and decrements the current size, but it did not check whether the node had already been removed. The eviction path and an explicit removal can process the same node in sequence: when a write drain runs a queued AddTask whose eviction polls a node that a concurrent remove(K) has already taken out of the cache, the eviction decrements the size, and the queued RemovalTask for the same node decrements it again. The sibling transition markForRemoval() guards against invalid transitions; this one did not. Each extra decrement makes currentSize permanently smaller than the number of cached entries, so eviction stops triggering and the cache exceeds its capacity for good, silently. A bounded two-thread stress run accumulates the drift reliably: before the change the cache stabilized far above its capacity in 20 out of 20 runs. markAsRemoved() now returns without decrementing when the entry is already in the removed state, mirroring the guard in markForRemoval(). The removed state is terminal, so each node is counted down exactly once. The new test races explicit removals against eviction and then verifies that the cache converges back to its capacity; it also asserts that the racing thread ran and terminated cleanly. Closes gh-37268 Signed-off-by: junhyeong9812 <pickjog@gmail.com>
Spring Framework

This is the home of the Spring Framework: the foundation for all Spring projects. Collectively the Spring Framework and the family of Spring projects are often referred to simply as "Spring".
Spring provides everything required beyond the Java programming language for creating enterprise applications for a wide range of scenarios and architectures. Please read the Overview section of the reference documentation for a more complete introduction.
Code of Conduct
This project is governed by the Spring Code of Conduct. By participating, you are expected to uphold this code of conduct. Please report unacceptable behavior to spring-code-of-conduct@spring.io.
Access to Binaries
For access to artifacts or a distribution zip, see the Spring Framework Artifacts wiki page.
Documentation
The Spring Framework maintains reference documentation (published and source), GitHub wiki pages, and an API reference. There are also guides and tutorials across Spring projects.
Micro-Benchmarks
See the Micro-Benchmarks wiki page.
Build from Source
See the Build from Source wiki page and the CONTRIBUTING.md file.
Continuous Integration Builds
CI builds are defined with GitHub Actions workflows.
Stay in Touch
Follow @SpringCentral, @SpringFramework, and its team members on 𝕏. In-depth articles can be found at The Spring Blog, and releases are announced via our releases feed.
License
The Spring Framework is released under version 2.0 of the Apache License.