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

ben-manes / caffeine / 1967
94%
master: 100%

Build:
Build:
LAST BUILD BRANCH: v3.dev
DEFAULT BRANCH: master
Ran 18 Feb 2017 11:33PM UTC
Jobs 1
Files 66
Run time 3s
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

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

Jobs
ID Job ID Ran Files Coverage
1 1967.1 (TERM=dumb) 18 Feb 2017 11:33PM UTC 0
93.72
Travis Job 1967.1
Source Files on build 1967
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1967
  • 83b47d19 on github
  • Prev Build on solr (#1965)
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