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

ben-manes / caffeine / 2380
100%

Build:
DEFAULT BRANCH: master
Ran 19 Jun 2019 06:58PM UTC
Jobs 1
Files 74
Run time 26s
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
2380

push

travis-ci

ben-manes
Make add/update race more benign

This is pretty hard to hit and isn't harmful, but caught when scanning
code and verified manually. Unfortunately there is no way to write an
explicit test case, only using the debugger works.

Imagine a weighted cache where the weight is the value.

T0. Add (A, 1) to hash table
T1. Update to (A, 20) in hash table, enqueue UpdateTask(A, (20-1))
T2. Adder (T0) enqueues AddTask(A, 1) to write buffer
T3. Both add/update operations complete, maintenance is scheduled
T4. Update task runs, sets PolicyWeight to 19
T5. Add task runs, sets PolicyWeight to 1

However, note that Node PolicyWeight and Weight are different
fields, and the weights are usually handled as deltas. Thus even
though the Node's policyWeight is wrong, the impact is very small
due to how other logic handles things.

To hit this problem you need two writers for the same key, with
different values, on a weighted cache to be thrashing it. If the
adder is context switched out before adding to the buffer, then
the inconsistency leaks.

1 of 1 new or added line in 1 file covered. (100.0%)

5976 of 6376 relevant lines covered (93.73%)

0.94 hits per line

Jobs
ID Job ID Ran Files Coverage
2 2380.2 (GROUP=tests) 19 Jun 2019 06:58PM UTC 0
93.73
Travis Job 2380.2
Source Files on build 2380
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2380
  • c6264dad on github
  • Prev Build on master (#2378)
  • Next Build on master (#2381)
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