Skip to content

Conversation

@copybara-service
Copy link
Contributor

Roll back the change that made LocalCache avoid synchronized.

The LocalCache change led to false reports of recursion during refresh.

This CL keeps the new tests from the LocalCache change, which already would have passed before the CL. Ideally we would additionally include tests that demonstrate the refresh problem, but we'll need to see if the contributor can sign a CLA.

This rollback un-fixes #6845. Users of common.cache and virtual threads will likely have to wait until synchronized no longer pins threads. (And at that point, if not earlier, they should migrate to Caffeine :))

RELNOTES=cache: Fixed a bug that could cause false "recursive load" reports during refresh.

…12730).

The `LocalCache` change led to [false reports of recursion during refresh](#6851 (comment)).

This CL keeps the new tests from the `LocalCache` change, which already would have passed before the CL. Ideally we would additionally include [tests that demonstrate the refresh problem](#6851 (comment)), but we'll need to see if the contributor can sign a CLA.

This rollback un-fixes #6845. Users of `common.cache` and virtual threads will likely have to wait until `synchronized` no longer pins threads. (And at that point, if not earlier, they should migrate to [Caffeine](https://github.com/ben-manes/caffeine) :))

RELNOTES=`cache`: Fixed a bug that could cause [false "recursive load" reports during refresh](#6851 (comment)).
PiperOrigin-RevId: 605069776
@copybara-service copybara-service bot closed this pull request by merging all changes into master in 0e1aebf Feb 7, 2024
@copybara-service copybara-service bot deleted the test_605049501 branch February 7, 2024 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

remove synchronized from LocalCache::get(key, loader) to allow for VirtualThread-friendly value-loading

2 participants