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

ben-manes / caffeine / 1363
100%

Build:
DEFAULT BRANCH: master
Ran 01 Oct 2015 07:19PM UTC
Jobs 1
Files 69
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
1363

push

travis-ci

ben-manes
Support varying weights with W-TinyLfu

The weight of an entry may change during its lifetime. The previous
approach of using the node's weight worked fine for a single queue
(LRU), but when using multiple queues a race is visible. The entry
being moved from the eden to the main queue, with a concurrent
update to its weight, could result in the wrong size calculation.
When the update is replayed it adjusts the main queue, leaving the
eden queue at some incorrect size. Over time the eden queue may
either shrink or grow beyound the expected boundary (1%) because
of this race.

The solution is to use store the policy's view of the weight in
addition to the node's. This allows the policy to adjust correctly.
However when an entry is removed an update may be pending (out of
order) and the policy's weight cannot be relied upon. Since the
node has been finalized (dead) at that point, we continue to use
the node's weight instead.

This quirk was something we ran into when first experimenting with
LIRS in CLHM. So we knew the solution this time around, since any
cache that moves entries between queues and supports weights will
have a sizing race. The option is either to abandon multiple queues
(considered for CLHM, done by Infinispan) or handle it by maintaining
a policy-oriented view as well.

4342 of 4589 relevant lines covered (94.62%)

0.95 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1363.1 (TERM=dumb) 01 Oct 2015 07:19PM UTC 0
94.62
Travis Job 1363.1
Source Files on build 1363
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1363
  • 6cbb0569 on github
  • Prev Build on master (#1362)
  • Next Build on master (#1364)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc