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

apache / bookkeeper / 29
72%

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

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

Jobs
ID Job ID Ran Files Coverage
1 29.1 22 Mar 2018 01:54PM UTC 0
72.47
Source Files on build 29
Detailed source file information is not available for this build.
  • Back to Repo
  • Jenkins Build #29
  • 1496ebf8 on github
  • Prev Build on master (#28)
  • Next Build on master (#30)
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