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

vocdoni / vocdoni-node / 6616580774
63%

Build:
DEFAULT BRANCH: main
Ran 23 Oct 2023 05:19PM UTC
Jobs 2
Files 170
Run time 5s
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 Oct 2023 05:05PM UTC coverage: 62.199% (+0.04%) from 62.159%
6616580774

push

github

p4u
db/pebbledb: make WriteTx.Discard safe to call again

The interface always documented that Discard was safe to call
after Commit, and presumably after Discard too, and it's a good idea.
However, the pebbledb implementation lead to a data race,
as explained in the added Discard method comment.

I suspect that this race existed for some time, but it was rather rare.
It seems to have surfaced recently on October 10th with commit
19c6d6851,
which added more Discard calls in the form of:

        v.tx.Discard()
    +   v.store.NoStateWriteTx.Discard()

It turns out that, if NoStateWriteTx is simply a wrapper over
the other tx we were already discarding, this would trigger the race
with relatively high probability.

Rather than trying to keep track of which transactions have already
been discarded or committed, which is very easy prone to mistakes,
make Discard properly safe to call at any point.

While here, make Commit loudly error if called after itself or Discard.
That's definitely a bug that we should surface quickly.

22 of 24 new or added lines in 1 file covered. (91.67%)

14256 of 22920 relevant lines covered (62.2%)

32462.44 hits per line

Jobs
ID Job ID Ran Files Coverage
1 unit - 6616580774.1 23 Oct 2023 05:19PM UTC 0
51.37
GitHub Action Run
2 integration - 6616580774.2 23 Oct 2023 05:19PM UTC 0
51.89
GitHub Action Run
Source Files on build 6616580774
Detailed source file information is not available for this build.
  • Back to Repo
  • d6a9665e on github
  • Prev Build on main (#6616331136)
  • Next Build on main (#6617629935)
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