Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLR-15555 #2572

Merged
merged 4 commits into from
Sep 14, 2021
Merged

SOLR-15555 #2572

merged 4 commits into from
Sep 14, 2021

Conversation

madrob
Copy link
Contributor

@madrob madrob commented Sep 14, 2021

Create a new cache mode for CaffeineCache where we can optionally use an
async cache instead of the synchronous implementation. This is useful
for cases (esp FilterQuery) where many identical requests come in near
the same time and they would otherwise race to fill the same cache slot.

CaffeineCache computeIfAbsent now accepts an IOFunction instead of
the non-throwing java.util.Function interface.

This required an update to CaffeineCache 2.9, which updates putIfAbsent
with an optimistic get.

Also incidentally fixes a rare bug where cache ramBytesUsed would be
incorrectly reported under heavy cache contention/eviction loads.

Based on c942c7242c2fb9f45b21675f5895835412ecaf7a

Create a new cache mode for CaffeineCache where we can optionally use an
async cache instead of the synchronous implementation. This is useful
for cases (esp FilterQuery) where many identical requests come in near
the same time and they would otherwise race to fill the same cache slot.

CaffeineCache computeIfAbsent now accepts an IOFunction instead of
the non-throwing java.util.Function interface.

This required an update to CaffeineCache 2.9, which updates putIfAbsent
with an optimistic get.

Also incidentally fixes a rare bug where cache ramBytesUsed would be
incorrectly reported under heavy cache contention/eviction loads.
Copy link
Contributor

@thelabdude thelabdude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran all the tests under solr/core and all passed. Looks good @madrob

@madrob madrob merged commit ac5df22 into apache:branch_8x Sep 14, 2021
madrob added a commit that referenced this pull request Sep 14, 2021
Create a new cache mode for CaffeineCache where we can optionally use an
async cache instead of the synchronous implementation. This is useful
for cases (esp FilterQuery) where many identical requests come in near
the same time and they would otherwise race to fill the same cache slot.

CaffeineCache computeIfAbsent now accepts an IOFunction instead of
the non-throwing java.util.Function interface.

This required an update to CaffeineCache 2.9, which updates putIfAbsent
with an optimistic get.

Also incidentally fixes a rare bug where cache ramBytesUsed would be
incorrectly reported under heavy cache contention/eviction loads.

Makes Async Caches the default.
magibney pushed a commit to fullstorydev/lucene-solr that referenced this pull request Jul 27, 2022
Create a new cache mode for CaffeineCache where we can optionally use an
async cache instead of the synchronous implementation. This is useful
for cases (esp FilterQuery) where many identical requests come in near
the same time and they would otherwise race to fill the same cache slot.

CaffeineCache computeIfAbsent now accepts an IOFunction instead of
the non-throwing java.util.Function interface.

This required an update to CaffeineCache 2.9, which updates putIfAbsent
with an optimistic get.

Also incidentally fixes a rare bug where cache ramBytesUsed would be
incorrectly reported under heavy cache contention/eviction loads.

Makes Async Caches the default.

(cherry picked from commit ac5df22)
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.

2 participants