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

ben-manes / caffeine / 1716
100%

Build:
DEFAULT BRANCH: master
Ran 23 Apr 2016 06:44PM UTC
Jobs 1
Files 65
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
1716

push

travis-ci

ben-manes
Refresh as a non-blocking write (fixes #56, fixes #69)

Previously refresh was implemented as a computation performed on the
executor. Like all writes it allowed concurrent reads, but blocked
other writes like updating, invalidating, or evicting. This provided
strong consistency at the cost of lock granularity (hash bin) and
potentially wasting a thread in an asynchronous cache. This simple
model was also shown to be broken, as per the deadlock reported.

A refresh is now performed without blocking and better matches Guava's.
The newly loaded entry is dropped if the mapping now points to a
different value. Like Guava, if the entry disappears (e.g. eviction)
the loaded value is inserted. Usage through refreshAfterWrite is
preferred and it will try to avoid redundant in-flight loads. Unlike
Guava a LoadingCache#refresh() cannot detect and ignore redundant
loads. It may be possible to strengthen the implementation, but
explicit refreshes are rare. Similar to Guava, the approach is not ABA
safe but best effort and does what users would likely prefer. For
stricter reload behavior, users should perform a Map#compute instead.

Load testing uncovered a weighted eviction bug with a cache heavily
dominated by zero-weight entries (e.g. incomplete futures). The main
space eviction would find no victims and needed to fallback to scan
the admission window.

Thanks to everyone who helped in the discussions to wrap my head how
to properly implement this.

5304 of 5613 relevant lines covered (94.49%)

0.94 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1716.1 (TERM=dumb) 23 Apr 2016 06:44PM UTC 0
94.49
Travis Job 1716.1
Source Files on build 1716
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1716
  • 5d092dd9 on github
  • Prev Build on master (#1711)
  • Next Build on master (#1719)
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