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

TriggerMail / lazylru / 185 / 185
86%
master: 98%

Build:
Build:
LAST BUILD BRANCH: (HEAD detached at 69bb3b2)
DEFAULT BRANCH: master
Ran 23 Jul 2024 08:18PM UTC
Files 8
Run time 0s
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

23 Jul 2024 08:13PM UTC coverage: 97.94%. Remained the same
185

push

buildkite

web-flow
always taking at least a read lock on shouldBubble (#33)

Previously, we were making a dirty read in `Get` when calling `shouldBubble` to see if we should bubble the item up. This creates a race condition with the write path. In cases where it was determined we should bubble up, we would take an exclusive lock, then check again. *Technically*, this is a race condition because we did make that dirty read, though we atoned for our sins with that second read.

Do we care? Well, maybe. The second read should make the action safe enough, but it does trip the race detector. There is no way to tell the race detector that this one is OK, so leaving this race condition in the code means that consumers of the library can't use the race detector for their own code. That's not an acceptable trade-off.

To avoid that, we can take a read lock before checking `shouldBubble`. If the answer is "no," we can just exit the function. If yes, we're going to have to take the exclusive lock anyway, so take the lock, check again, and bubble or not as appropriate. The impact of this lock is <0.5% when the cache is under 75% full and approximately 3% when the cache is over 3% full. That 3% represents only a few nanoseconds, so it's not as bad as it looks at first glance.

618 of 631 relevant lines covered (97.94%)

449.57 hits per line

Source Files on job generic - 185
  • Tree
  • List 0
  • Changed 5
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 185
  • 174b0bf7 on github
  • Prev Job for on (HEAD detached at 174b0bf) master (#182)
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