Repository navigation
SOLR-18583: [branch_9x] Fix TestCaffeineCache and TestThinCache testSimple failures with Caffein 3.3.0 - #5207
Merged
iamsanjay merged 1 commit intoOct 23, 2026
Conversation
TestCaffeineCache.testSimple and TestThinCache.testSimple asserted that key 1 is evicted after 101 puts into a cache of size 100. Which entry is evicted is up to Caffeine's eviction policy, not insertion order, and it changed in Caffeine 3.3.0: both tests now fail on every branch_9x run. Assert that exactly one entry was evicted instead, and drop the get(1) lookup from the cumulative lookup count. TestThinCache also warms the second cache into the shared backing cache while it is still full. On Caffeine 3.3.0 the warmed entries lose to the existing ones and are evicted, so enlarge the backing before warming (the same change as SOLR-18506 / apache#5029).
Contributor
|
Backports should either have the same commit first line (wasn't true here due to different PR reference) and/or have the cherry-pick reference that should be there when |
Contributor
Author
|
This one isn't a backport actually: it's a branch_9x-only fix. Only branch_9x has Caffeine 3.3.0, so main/10x aren't affected and there's no main commit to reference (the main PR #5205 was closed). |
Contributor
|
Oh sorry I was confused. I'm surprised we wouldn't do this on main as well since we'll get to this version of Caffeine eventually. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Solr-Test-9x has been continuously failing since #4976 (bump up Caffeine to 3.3.0 from 3.2.4) merged into branch_9x.
https://develocity.apache.org/scans/tests?search.rootProjectNames=solr-root&search.tags=branch_9x&search.timeZoneId=Asia%2FCalcutta&tests.container=org.apache.solr.search.TestCaffeineCache&tests.test=testSimple
https://develocity.apache.org/scans/tests?search.rootProjectNames=solr-root&search.tags=branch_9x&search.timeZoneId=Asia%2FCalcutta&tests.container=org.apache.solr.search.TestThinCache&tests.test=testSimple
main and branch_10x have the same assertion and will fail the same way once they move to Caffeine 3.3.0; see #5205.