Sanjay Dutt created SOLR-18583:
----------------------------------

             Summary: TestCaffeineCache and TestThinCache testSimple fail on 
Caffeine 3.3.0
                 Key: SOLR-18583
                 URL: https://issues.apache.org/jira/browse/SOLR-18583
             Project: Solr
          Issue Type: Bug
          Components: search
    Affects Versions: 9.12
            Reporter: Sanjay Dutt
            Assignee: Sanjay Dutt


Since branch_9x moved to Caffeine 3.3.0 (#4976), TestCaffeineCache.testSimple 
and TestThinCache.testSimple failed on every run, at 
assertNull(lfuCache.get(1)).


Caffeine evicts based on usage, not insertion order. Before 3.3.0, small caches 
forgot early usage at half capacity, so key 1 happened to be evicted. 3.3.0 
(ben-manes/caffeine commit 6f57cf5567) keeps it, so a different entry is 
evicted. In TestThinCache the same change also evicts the warmed entries from 
the full shared backing cache.

Fixed on branch_9x in #5207: assert that one entry is evicted rather than which 
one, and enlarge the backing before warming (same as #5029).

main and branch_10x are still on Caffeine 3.2.4, so they pass today, but they 
need the same change when they move to 3.3.0.

Related: SOLR-18506 / #5029.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to