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

apache / bookkeeper / 29 / 1
72%
master: 72%

Build:
DEFAULT BRANCH: master
Ran 22 Mar 2018 01:54PM UTC
Files 396
Run time 16s
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

22 Mar 2018 01:54PM UTC coverage: 72.474% (-0.1%) from 72.572%
29.1

push

jenkins

Sijie Guo
Improve write rejection in DbLedgerStorage

This PR contain 2 changes that are much related to each other.

1. Changed DbLedgerStorage write cache read-write lock into a `StampedLock`
   Main reason for using `StampedLock` is that this lock is always taken as a "read" lock, when putting entries in the the cache. It is protecting for the swapping of the write cache when the flush is triggered. Most of the time, we have many threads acquiring the read-lock. `StampedLock` is better in this scenario because there isn't any contention in the optimistic path (just a double volatile read).

2. Have a configurable throttle timing when the write cache is really full.
    If we try to write faster than we can put data in the storage device, eventually both write caches will get full and we have to throttle writes. Added here a setting to configure the amount of time to block the thread (who's calling `Bookie.addEntry()`, it could be IO thread or a addEntryWorker depending on configuration).
   After the timeout, if we still weren't able to flush the write cache and insert the current entry, bookie will reject the write operation, without logging but rather using a counter to keep track of it.

Author: Matteo Merli <mmerli@apache.org>

Reviewers: Sijie Guo <sijie@apache.org>

This closes #1280 from merlimat/db-storage-stamped-lock

23001 of 31737 relevant lines covered (72.47%)

0.72 hits per line

Source Files on job 29.1
  • Tree
  • List 0
  • Changed 44
  • Source Changed 6
  • Coverage Changed 42
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 29
  • 1496ebf8 on github
  • Prev Job for on master (#28.1)
  • Next Job for on master (#30.1)
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