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

ben-manes / caffeine / #2529
100%

Build:
DEFAULT BRANCH: master
Ran 07 Dec 2020 05:55AM UTC
Jobs 1
Files 77
Run time 7s
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
#2529

push

other

ben-manes
Fix write-time optimization for variable expiration (fixes #478)

A high write rate to the same key can overwhelm the write buffer as it
may not drop entries and has a maximum capacity. When full this causes
backpressure to allow for the mainance task to catch up. A write only
needs to be recorded in this buffer when a major event occurs, such as
the entry's size changed or expiration time differs.

To improve throughput for expireAfterWrite a tolerance of 1s is used
to allow for skipping the write buffer and recording into the read
buffer instead. This improves throughput by 5x in a same key write
benchmark.

This optimization was not updated to take into account variable
expiration, where the expire time may change based on the calculation
determined by configured Expiry. This would cause the entry to not be
reordered in the TimerWheel, possibly delaying the automic removal
indefinitely. Now when the variable time differs by +/- 1s then the
write-time reordering is required.

Co-authored-by: Christopher Ng <facboy@gmail.com>

6221 of 6684 relevant lines covered (93.07%)

0.93 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #2529.1 07 Dec 2020 05:55AM UTC 0
93.07
Source Files on build #2529
Detailed source file information is not available for this build.
  • Back to Repo
  • e6bb02f4 on github
  • Prev Build on master
  • Next Build on master
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