• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ben-manes / caffeine
94%
master: 100%

Build:
Build:
LAST BUILD BRANCH: v3.dev
DEFAULT BRANCH: master
Repo Added 15 Dec 2014 11:20PM UTC
Files 78
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH solr
branch: solr
CHANGE BRANCH
x
Reset
  • solr
  • 05a040c2478341bab8a58a02b3dc1fe14d626d72
  • 2.5.6
  • Gil
  • adaptive
  • async-loader
  • ben/issue30
  • ben/spacing
  • buffer
  • cache2k
  • clockpro
  • codeql
  • dependabot/github_actions/JetBrains/qodana-action-2023.1.4
  • dependabot/github_actions/JetBrains/qodana-action-61b94e7e3a716dcb9e2030cfd79cd46149d56c26
  • dependabot/github_actions/codecov/codecov-action-3.1.3
  • dependabot/github_actions/github/codeql-action-2.3.4
  • dependabot/gradle/com.gradle.common-custom-user-data-gradle-plugin-1.9
  • dependabot/gradle/com.gradle.enterprise-3.14
  • dependabot/gradle/de.thetaphi-forbiddenapis-3.6
  • dependabot/gradle/pmd-7.0.0-rc4
  • expiring_map
  • expiry
  • gil
  • gilga
  • gradient
  • guava
  • jctools
  • juherr
  • master
  • memory
  • orm
  • penalties
  • testng
  • tmp
  • travis
  • v1.0
  • v1.0.1
  • v1.1.0
  • v1.2.0
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.3.3
  • v2.0.0
  • v2.0.1
  • v2.0.2
  • v2.0.3
  • v2.1.0
  • v2.2.0
  • v2.2.2
  • v2.2.4
  • v2.3.2
  • v2.3.4
  • v2.5.2
  • v2.5.3
  • v2.5.4
  • v2.5.5
  • v2.6.1
  • v2.7.0
  • v2.8.0
  • v2.8.1
  • v2.8.2
  • v2.8.3
  • v2.8.4
  • v2.8.5
  • v2.dev
  • v3.0.5
  • v3.0.6
  • v3.1.0
  • v3.1.1
  • v3.1.2
  • v3.1.4
  • v3.1.5
  • v3.1.6
  • v3.1.7
  • v3.1.8
  • v3.dev

pending completion
1967

push

travis-ci

ben-manes
Fix stale notification when eviction raced with an update
[SOLR-10141](https://issues.apache.org/jira/browse/SOLR-10141) (thanks Yonik!)

As an optimization, an update is allowed to bypass the hash map and
synchronize on the read entry directly. In this block it checks
liveliness, performs the mutation, and notifies the writer. This avoids
more expensive computations through the map.

Previously, an eviction was performed in a computation to remove the
entry and notify the writer, or resurrect. Inside the computation the
entry was not synchronized on and that was done only after it was
removed from the table. The removal listener was notified with the
value initially read at the start of this method.

This allowed an update to modify the value while (or after) the entry
was being removed from the hash table. This led to notifying the writer
and removal listener with the stale value. Because the writer must
be called exclusively with the mutation, this computation must use
a synchronized guard. Otherwise we might have preferred to re-read
the value when notifying the listener. This adds a slight penalty on
eviction (usually async) while allowing `put` to still be fast (but
may block a little more often).

`putSlow` was removed as it is no longer needed. It was a computation-
based write that was safe from this issue. But it was only used when the
new weight was zero, as that update race would cause an incorrect
eviction. Now that the primary path is safe from this race, it is
unnecessary.

5344 of 5702 relevant lines covered (93.72%)

0.94 hits per line

Relevant lines Covered
Build:
Build:
5702 RELEVANT LINES 5344 COVERED LINES
0.94 HITS PER LINE
Source Files on solr
Detailed source file information is not available for this build.

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
1967 solr Fix stale notification when eviction raced with an update [SOLR-10141](https://issues.apache.org/jira/browse/SOLR-10141) (thanks Yonik!) As an optimization, an update is allowed to bypass the hash map and synchronize on the read entry directly. I... push 18 Feb 2017 11:33PM UTC ben-manes travis-ci pending completion  
1965 solr Fix stale notification when eviction raced with an update [SOLR-10141](https://issues.apache.org/jira/browse/SOLR-10141) (thanks Yonik!) As an optimization, an update is allowed to bypass the hash map and synchronize on the read entry directly. I... push 18 Feb 2017 06:37AM UTC ben-manes travis-ci pending completion  
1961 solr Fix stale notification when eviction raced with an update SOLR-10141 (thanks Yonik!) As an optimization, an update is allowed to bypass the hash map and synchronize on the read entry directly. In this block it checks liveliness, perform the mutat... push 18 Feb 2017 06:24AM UTC ben-manes travis-ci pending completion  
See All Builds (4310)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc